oliviertassinari / serviceworker-webpack-plugin

Simplifies creation of a service worker to serve your webpack bundles. :recycle:
https://oliviertassinari.github.io/serviceworker-webpack-plugin/
MIT License
458 stars 76 forks source link

Unexpected using UglifyJSPlugin in development mode #76

Closed budarin closed 6 years ago

budarin commented 6 years ago

Webpack 4 I try to use plugin in development mode and got the error:

            throw new RemovedPluginError(errorMessage);
            ^

Error: webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead.
    at Object.get [as UglifyJsPlugin] (D:\Projects\kometa_old\node_modules\webpack\lib\webpack.js:166:10)

ok, let it doesn't work in prod mode due to using deprecated UglifyJs, but why it uses UglifyJs in dev mode?

devCrossNet commented 6 years ago

Hey @budarin, did you have a look at #72 and #65? Maybe this can solve your problems

budarin commented 6 years ago

Thanks for pointing, but it is hard to look through issues for solved solution - could you add this to README

devCrossNet commented 6 years ago

@woutervanvliet I think we could merge it into master now and release a new version on npm. what do you think?