I am getting an error when trying to use webpack -p. When I change the code to ES5 compatible code it seems to work. Something with the UglifyJS minification and ES6 apparently.
This is my login.es6 file:
"use strict";
let login = (username, pw) => {
if (username !== 'admin' || pw !== 'radical') {
console.log("login incorrect");
}
};
login("admin", "test");
I have exactly the same code as the course mentions. I am using the newer versions of the tools and it seems to be a problem there. When using the versions as provided in the course, There is also no error when only changing babel-core and babel-loader to the versions provided.
My version of devDependencies (with UglifyJS error):
"devDependencies": {
"babel-core": "^6.1.4",
"babel-loader": "^6.1.0",
"jshint": "^2.8.0",
"jshint-loader": "^0.8.3",
"node-libs-browser": "^0.5.3",
"strip-loader": "^0.1.0",
"webpack": "^1.12.4"
}
My partially updated version of devDependencies (without UglifyJS error):
"devDependencies": {
"babel-core": "^5.4.7",
"babel-loader": "^5.1.3",
"jshint": "^2.8.0",
"jshint-loader": "^0.8.3",
"node-libs-browser": "^0.5.3",
"strip-loader": "^0.1.0",
"webpack": "^1.12.4"
}
Does anyone have an idea on how to solve this minification problem while using babel >6?
Thanks!
I am getting an error when trying to use
webpack -p. When I change the code to ES5 compatible code it seems to work. Something with the UglifyJS minification and ES6 apparently.This is my
login.es6file:I have exactly the same code as the course mentions. I am using the newer versions of the tools and it seems to be a problem there. When using the versions as provided in the course, There is also no error when only changing
babel-coreandbabel-loaderto the versions provided.My version of devDependencies (with UglifyJS error):
My partially updated version of devDependencies (without UglifyJS error):
Does anyone have an idea on how to solve this minification problem while using babel >6?
Thanks!