Skip to content
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

Error: webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead. #13

Open
xeroneon opened this issue Sep 21, 2018 · 3 comments

Comments

@xeroneon
Copy link

when i try to go live on heroku i get this error, unfortunately i dont know much about webpack yet so i have no clue how to resolve this issue

@frankthoeny
Copy link

I fixed mine. This message is caused by the updated version of UglifyJS. They removed that function. Install this package here. https://github.com/webpack-contrib/uglifyjs-webpack-plugin
Replace the old block of code
Open config/webpack.prod.js
[top]
...
const UglifyJsPlugin = require("uglifyjs-3-webpack-plugin");
...

plugins: [
new UglifyJsPlugin({
uglifyOptions: {
warnings: false,
ie8: false,
output: {
comments: false
}
}
})
]

@PrathamDogra
Copy link

Any update on this?

@dajanvulaj
Copy link

dajanvulaj commented Jul 12, 2019

@PrathamDogra

Optimization
Since version 4 webpack runs optimizations for you depending on the chosen mode, still all optimizations are available for manual configuration and overrides.

To fix this:

module.exports = {
  optimization: {
    minimize: false //Update this to true or false
  }
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants