File tree Expand file tree Collapse file tree 5 files changed +436
-5
lines changed Expand file tree Collapse file tree 5 files changed +436
-5
lines changed Original file line number Diff line number Diff line change 1
1
const path = require ( 'path' )
2
2
const webpack = require ( 'webpack' )
3
3
const CopyWebpackPlugin = require ( 'copy-webpack-plugin' )
4
+ const JsonMinimizerPlugin = require ( 'json-minimizer-webpack-plugin' )
4
5
5
6
const { productName } = require ( '../package.json' )
6
7
@@ -30,6 +31,13 @@ const config = {
30
31
} ,
31
32
] ,
32
33
} ,
34
+ // webpack defaults to only optimising the production builds, so having this here is fine
35
+ optimization : {
36
+ minimizer : [
37
+ '...' , // extend webpack's list instead of overwriting it
38
+ new JsonMinimizerPlugin ( )
39
+ ]
40
+ } ,
33
41
node : {
34
42
__dirname : isDevMode ,
35
43
__filename : isDevMode ,
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ const webpack = require('webpack')
3
3
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' )
4
4
const VueLoaderPlugin = require ( 'vue-loader/lib/plugin' )
5
5
const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' )
6
+ const CssMinimizerPlugin = require ( 'css-minimizer-webpack-plugin' )
6
7
7
8
const { productName } = require ( '../package.json' )
8
9
@@ -97,6 +98,13 @@ const config = {
97
98
} ,
98
99
] ,
99
100
} ,
101
+ // webpack defaults to only optimising the production builds, so having this here is fine
102
+ optimization : {
103
+ minimizer : [
104
+ '...' , // extend webpack's list instead of overwriting it
105
+ new CssMinimizerPlugin ( )
106
+ ]
107
+ } ,
100
108
node : {
101
109
__dirname : isDevMode ,
102
110
__filename : isDevMode ,
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ const HtmlWebpackPlugin = require('html-webpack-plugin')
4
4
const VueLoaderPlugin = require ( 'vue-loader/lib/plugin' )
5
5
const CopyWebpackPlugin = require ( 'copy-webpack-plugin' )
6
6
const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' )
7
+ const JsonMinimizerPlugin = require ( 'json-minimizer-webpack-plugin' )
8
+ const CssMinimizerPlugin = require ( 'css-minimizer-webpack-plugin' )
7
9
8
10
const { productName } = require ( '../package.json' )
9
11
@@ -97,6 +99,14 @@ const config = {
97
99
} ,
98
100
] ,
99
101
} ,
102
+ // webpack defaults to only optimising the production builds, so having this here is fine
103
+ optimization : {
104
+ minimizer : [
105
+ '...' , // extend webpack's list instead of overwriting it
106
+ new JsonMinimizerPlugin ( ) ,
107
+ new CssMinimizerPlugin ( )
108
+ ]
109
+ } ,
100
110
node : {
101
111
__dirname : isDevMode ,
102
112
__filename : isDevMode ,
Original file line number Diff line number Diff line change 92
92
"babel-loader" : " ^8.2.5" ,
93
93
"copy-webpack-plugin" : " ^11.0.0" ,
94
94
"css-loader" : " 5.2.6" ,
95
+ "css-minimizer-webpack-plugin" : " ^4.1.0" ,
95
96
"electron" : " ^20.1.2" ,
96
97
"electron-builder" : " ^23.3.3" ,
97
98
"electron-debug" : " ^3.2.0" ,
106
107
"eslint-plugin-vue" : " ^7.17.0" ,
107
108
"file-loader" : " ^6.2.0" ,
108
109
"html-webpack-plugin" : " ^5.3.2" ,
110
+ "json-minimizer-webpack-plugin" : " ^4.0.0" ,
109
111
"mini-css-extract-plugin" : " ^2.2.2" ,
110
112
"node-loader" : " ^2.0.0" ,
111
113
"npm-run-all" : " ^4.1.5" ,
You can’t perform that action at this time.
0 commit comments