-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack error #29
Comments
What node version are you using? There is a |
I am using Node 10.15.2. It looks like webpack 3.12.0 brings uglifyjs-webpack-plugin 0.4.6, which does not like ES6. diff --git a/package.json b/package.json
index f56b462..508f33d 100644
--- a/package.json
+++ b/package.json
@@ -60,6 +60,7 @@
"lint-staged": "^4.2.3",
"postcss-loader": "^2.0.7",
"prettier": "^1.7.4",
- "webpack": "^3.6.0"
+ "webpack": "^3.6.0",
+ "uglifyjs-webpack-plugin": "^1.0.0"
}
}
diff --git a/webpack.config.js b/webpack.config.js
index e3eca58..a689f1a 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -2,18 +2,21 @@ const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const extractCSS = new ExtractTextPlugin('OverPassLayer.css');
+const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const plugins = [extractCSS];
plugins.push(
- new webpack.optimize.UglifyJsPlugin({
- minimize: true,
- mangle: true,
- output: {
- comments: false
- },
- compress: {
- warnings: false
+ new UglifyJSPlugin({
+ uglifyOptions: {
+ minimize: true,
+ mangle: true,
+ output: {
+ comments: false
+ },
+ compress: {
+ warnings: false
+ }
}
})
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When calling
yarn build
on dd1821e, it fails with this error:Edit: I also tried using using npm instead of yarn, but I get the same error.
The text was updated successfully, but these errors were encountered: