mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Fix HMR and backtrack for SFC support now that PHPStorm supports them
Of course I wasted forever migrating OUT of SFCs only to go back to them.
This commit is contained in:
@@ -9,6 +9,8 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const ShellPlugin = require('webpack-shell-plugin');
|
||||
const PurgeCssPlugin = require('purgecss-webpack-plugin');
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
const VueLoaderPlugin = require('vue-loader/lib/plugin');
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
|
||||
@@ -27,6 +29,10 @@ let plugins = [
|
||||
integrity: true,
|
||||
integrityHashes: ['sha384'],
|
||||
}),
|
||||
new VueLoaderPlugin(),
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
vue: true,
|
||||
}),
|
||||
];
|
||||
|
||||
if (isProduction) {
|
||||
@@ -72,6 +78,7 @@ const typescriptLoaders = [
|
||||
options: {
|
||||
appendTsSuffixTo: [/\.vue$/],
|
||||
experimentalWatchApi: true,
|
||||
transpileOnly: true,
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -133,6 +140,10 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.vue$/,
|
||||
use: 'vue-loader',
|
||||
},
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /node_modules/,
|
||||
|
||||
Reference in New Issue
Block a user