File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 11const path = require ( 'path' ) ;
22const webpack = require ( 'webpack' ) ;
3- const UglifyJsPlugin = require ( 'uglifyjs -webpack-plugin' ) ;
3+ const TerserPlugin = require ( 'terser -webpack-plugin' ) ;
44
55const isProduction = process . env . NODE_ENV === 'production' ;
66const mode = isProduction ? 'production' : 'development' ;
@@ -15,11 +15,11 @@ module.exports = {
1515 } ,
1616 devtool : 'source-map' ,
1717 output : {
18- path : path . resolve ( __dirname , 'dist' ) ,
18+ path : path . join ( __dirname , 'dist' ) ,
19+ library : libraryName ,
20+ libraryTarget : 'umd' ,
1921 filename : '[name].js' ,
20- library : 'Logger' ,
21- umdNamedDefine : true ,
22- globalObject : `(typeof self !== 'undefined' ? self : this)`
22+ globalObject : "typeof self !== 'undefined' ? self : this"
2323 } ,
2424 module : {
2525 rules : [
@@ -37,7 +37,7 @@ module.exports = {
3737 } ,
3838 optimization : {
3939 minimize : true ,
40- minimizer : [ new UglifyJsPlugin ( { include : / \. m i n \. j s $ / } ) ]
40+ minimizer : [ new TerserPlugin ( ) ]
4141 } ,
4242 plugins : [
4343 new webpack . DefinePlugin ( {
You can’t perform that action at this time.
0 commit comments