File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 7878 "react-test-renderer" : " ^16.0.0" ,
7979 "sinon" : " ^7.1.0" ,
8080 "styled-components" : " ^4.1.3" ,
81- "uglifyjs-webpack-plugin" : " ^0.4.6" ,
82- "webpack" : " ^4.23.1" ,
81+ "webpack" : " ^4.29.6" ,
8382 "webpack-bundle-analyzer" : " ^2.13.1" ,
8483 "webpack-cli" : " ^3.1.2" ,
8584 "webpack-dev-server" : " ^3.1.10"
Original file line number Diff line number Diff line change 11const path = require ( 'path' ) ;
22const CleanWebpackPlugin = require ( 'clean-webpack-plugin' ) ;
3- const UglifyJsPlugin = require ( 'uglifyjs -webpack-plugin' ) ;
3+ const TerserPlugin = require ( 'terser -webpack-plugin' ) ;
44const { BundleAnalyzerPlugin } = require ( 'webpack-bundle-analyzer' ) ;
55
66module . exports = {
77 mode : 'production' ,
8+ devtool : 'source-map' ,
89 entry : path . resolve ( __dirname , 'lib/index' ) ,
910 externals : {
1011 'styled-components' : 'styled-components' ,
1112 react : 'react'
1213 } ,
14+ optimization : {
15+ minimizer : [
16+ new TerserPlugin ( {
17+ parallel : true ,
18+ sourceMap : true ,
19+ terserOptions : {
20+ output : {
21+ comments : false ,
22+ }
23+ } ,
24+ } ) ,
25+ ]
26+ } ,
1327 output : {
1428 path : path . resolve ( __dirname , 'dist' ) ,
1529 filename : 'react-simple-chatbot.js' ,
@@ -23,10 +37,7 @@ module.exports = {
2337 } ,
2438 plugins : [
2539 new CleanWebpackPlugin ( [ 'dist' ] ) ,
26- new UglifyJsPlugin ( {
27- comments : false
28- } ) ,
29- process . env . BUNDLE_ANALYZE === 'true' ? new BundleAnalyzerPlugin ( ) : ( ) => { }
40+ process . env . BUNDLE_ANALYZE === 'true' ? new BundleAnalyzerPlugin ( ) : ( ) => { }
3041 ] ,
3142 module : {
3243 rules : [
You can’t perform that action at this time.
0 commit comments