File tree Expand file tree Collapse file tree 1 file changed +22
-20
lines changed
Expand file tree Collapse file tree 1 file changed +22
-20
lines changed Original file line number Diff line number Diff line change 1- const TerserPlugin = require ( 'terser-webpack-plugin' ) ;
1+ const path = require ( "path" ) ;
2+ const TerserPlugin = require ( "terser-webpack-plugin" ) ;
3+ const glob = require ( "glob" ) ;
24
35module . exports = {
4- mode : "production" ,
5- entry : {
6- "bundle.js" : glob . sync ( "build/static/?(js|css)/main.*.?(js|css)" ) . map ( f => path . resolve ( __dirname , f ) ) ,
7- } ,
8- output : {
9- filename : "build/static/js/bundle.min.js" ,
10- } ,
11- module : {
12- rules : [
13- {
14- test : / \. c s s $ / ,
15- use : [ "style-loader" , "css-loader" ] ,
16- } ,
17- ] ,
18- } ,
19- optimization : {
20- minimize : true ,
21- minimizer : [ new TerserPlugin ( ) ] ,
22- }
6+ mode : "production" ,
7+ entry : {
8+ "bundle.js" : glob . sync ( "build/static/?(js|css)/main.*.?(js|css)" ) . map ( f => path . resolve ( __dirname , f ) ) ,
9+ } ,
10+ output : {
11+ filename : "build/static/js/bundle.min.js" ,
12+ } ,
13+ module : {
14+ rules : [
15+ {
16+ test : / \. c s s $ / ,
17+ use : [ "style-loader" , "css-loader" ] ,
18+ } ,
19+ ] ,
20+ } ,
21+ optimization : {
22+ minimize : true ,
23+ minimizer : [ new TerserPlugin ( ) ] ,
24+ } ,
2325} ;
You can’t perform that action at this time.
0 commit comments