Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 12ec492

Browse files
committed
Update package.json and webpack.config.js to fix UglifyJs build error
1 parent a07e9ff commit 12ec492

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"babel-loader": "^6.0.0",
3434
"babel-plugin-transform-es2015-destructuring": "^6.19.0",
3535
"babel-plugin-transform-runtime": "^6.22.0",
36-
"babel-preset-es2015": "^6.0.0",
36+
"babel-preset-env": "^1.6.0",
3737
"cross-env": "^3.0.0",
3838
"css-loader": "^0.25.0",
3939
"extract-text-webpack-plugin": "^2.0.0-beta.5",
@@ -43,7 +43,7 @@
4343
"open": "0.0.5",
4444
"sass-loader": "^4.1.1",
4545
"style-loader": "^0.13.1",
46-
"uglify-js": "git://github.com/mishoo/UglifyJS2.git#harmony",
46+
"uglify-js": "^3.0.28",
4747
"vue": "^2.1.0",
4848
"vue-loader": "^10.0.0",
4949
"vue-style-loader": "^1.0.0",

webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var baseConfig = {
1717
use: [{
1818
loader: 'babel-loader',
1919
options: {
20-
"presets": [ [ "es2015" ] ],
20+
"presets": [ [ "env" ] ],
2121
"plugins": [ "transform-es2015-destructuring", "transform-runtime" ]
2222
}
2323
}],
@@ -41,6 +41,7 @@ var baseConfig = {
4141
options: {
4242
loaders: {
4343
'scss': 'vue-style-loader!css-loader!sass-loader',
44+
'js': 'babel-loader?presets[]=env'
4445
}
4546
}
4647
}

0 commit comments

Comments
 (0)