-
Notifications
You must be signed in to change notification settings - Fork 674
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 -p ERROR in common.js from UglifyJs Invalid assignment [common.js:45003,29] #83
Comments
Hey @khorark , I renamed the library to |
@khorark I'm also seeing the same bug--pretty sure it's coming from Uglify not supporting minifying the ES2015 code in the module. You might try removing the Buuut webpack might still transpile them incorrectly. @crabbly So the module would perhaps need to be pretranspiled before publishing? Or maybe there's a workaround somewhere in here: webpack/webpack#2902 |
I use the library in a project with webpack, and I have no errors minifying or compiling. |
@khorark Were you able to fix this issue? |
@crabbly Same problem on our build too. Using create-react-app as is. |
@crabbly No, problem persists. And IE 11 don't work.
My webpack config to library.
|
@khorark have you tried the suggestion offered by @tckastanek , removing the |
@crabbly, yes, I tried. It's no work. |
As already mentioned, uglify won't minify ES6, which is used in this library. Can you give it a try? |
With limited time to work on this library, I won't try to provide a solution for compilers that can't transpile ES6. A PR would be great tho. Thank you. |
Angular CLI 1.5 added support for ES2015 module. |
I ran into the same problem. I use uglifyjs-webpack-plugin instead of webpack.optimize.UglifyJsPlugin and set uglifyOption.ecma to 6, then the problem is solved |
The latest npm package version won't import ES6 code anymore. This should prevent issues for anybody using compilers that do not read ES6. |
Hi. i don't create build with webpack command webpack -p. I have error
But create build with options webpack --env=prod run. I think problem in to compress file.
My webpack config:
const path = require('path');
const webpack = require("webpack");
const srcPath = path.resolve(__dirname, "../src");
const hostPath = path.resolve(__dirname, "developPath.json");
const host = require(hostPath);
module.exports = {
cache: true,
};
The text was updated successfully, but these errors were encountered: