|
1 | | -letwebpack=require("webpack"); |
2 | | -letBundleAnalyzerPlugin=require("webpack-bundle-analyzer") |
3 | | -.BundleAnalyzerPlugin; |
4 | | - |
5 | | -module.exports=(env,argv)=>{ |
6 | | -letmode_env=argv.mode||"development"; |
7 | | - |
8 | | -return{ |
9 | | -devtool:"source-map", |
10 | | -entry:{ |
11 | | -main:"./lib/index", |
12 | | -}, |
13 | | - |
14 | | -output:{ |
15 | | -library:"redux-dynamic-modules", |
16 | | -libraryTarget:"umd", |
17 | | -filename: |
18 | | -mode_env==="production" |
19 | | - ?"redux-dynamic-modules-react.min.js" |
20 | | - :"redux-dynamic-modules-react.js", |
21 | | -path:__dirname+"/dist/", |
22 | | -}, |
23 | | - |
24 | | -externals:{ |
25 | | -"prop-types":"prop-types", |
26 | | -react:"react", |
27 | | -redux:"redux", |
28 | | -"react-redux":"react-redux", |
29 | | -"redux-saga":"redux-saga", |
30 | | -}, |
31 | | -plugins:[ |
32 | | -newBundleAnalyzerPlugin({ |
33 | | -analyzerMode:"static", |
34 | | -reportFilename:`react-redux-module.stats.html`, |
35 | | -openAnalyzer:false, |
36 | | -}), |
37 | | -], |
38 | | -}; |
39 | | -}; |
| 1 | +letwebpack=require("webpack"); |
| 2 | +letBundleAnalyzerPlugin=require("webpack-bundle-analyzer") |
| 3 | +.BundleAnalyzerPlugin; |
| 4 | + |
| 5 | +module.exports=(env,argv)=>{ |
| 6 | +letmode_env=argv.mode||"development"; |
| 7 | + |
| 8 | +return{ |
| 9 | +devtool:"source-map", |
| 10 | +entry:{ |
| 11 | +main:"./lib/index", |
| 12 | +}, |
| 13 | + |
| 14 | +output:{ |
| 15 | +library:"redux-dynamic-modules-react", |
| 16 | +libraryTarget:"umd", |
| 17 | +filename: |
| 18 | +mode_env==="production" |
| 19 | + ?"redux-dynamic-modules-react.min.js" |
| 20 | + :"redux-dynamic-modules-react.js", |
| 21 | +path:__dirname+"/dist/", |
| 22 | +}, |
| 23 | + |
| 24 | +externals:{ |
| 25 | +"prop-types":"prop-types", |
| 26 | +react:"react", |
| 27 | +redux:"redux", |
| 28 | +"react-redux":"react-redux", |
| 29 | +"redux-saga":"redux-saga", |
| 30 | +}, |
| 31 | +plugins:[ |
| 32 | +newBundleAnalyzerPlugin({ |
| 33 | +analyzerMode:"static", |
| 34 | +reportFilename:`react-redux-module.stats.html`, |
| 35 | +openAnalyzer:false, |
| 36 | +}), |
| 37 | +], |
| 38 | +}; |
| 39 | +}; |