pack: set option correctly for webpack terser plugin
This commit is contained in:
1 parent
60b07da996
commit
365a0bf35d
2 files changed
+4
-2
No files matched your search
@@ -41,13 +41,16 @@ export default {
|
|||||||
libraryTarget: 'commonjs2',
|
libraryTarget: 'commonjs2',
|
||||||
path: path.join(__dirname, '../../dist/electron')
|
path: path.join(__dirname, '../../dist/electron')
|
||||||
},
|
},
|
||||||
|
optimization: {
|
||||||
|
minimize: true,
|
||||||
|
minimizer: [new TerserPlugin()]
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.NoEmitOnErrorsPlugin(),
|
new webpack.NoEmitOnErrorsPlugin(),
|
||||||
new ESLintPlugin({
|
new ESLintPlugin({
|
||||||
extensions: ['js'],
|
extensions: ['js'],
|
||||||
formatter: eslintFriendlyFormatter()
|
formatter: eslintFriendlyFormatter()
|
||||||
}),
|
}),
|
||||||
new TerserPlugin(),
|
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
...IS_DEV_ENV
|
...IS_DEV_ENV
|
||||||
? {
|
? {
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ export default {
|
|||||||
__filename: IS_DEV_ENV
|
__filename: IS_DEV_ENV
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new TerserPlugin(),
|
|
||||||
new VueLoaderPlugin(),
|
new VueLoaderPlugin(),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
filename: 'index.html',
|
filename: 'index.html',
|
||||||
|
|||||||
Reference in new issue
Block a user