Skip to content

Add support for terser-webpack-plugin (webpack@4.26.0+) #426

@pleunv

Description

@pleunv

Webpack 4.26.0 switched from using uglifyjs-webpack-plugin to terser-webpack-plugin. Since OfflinePlugin seems to partly piggyback off webpack's minifier but also contains uglifyjs-specific code this is now throwing up the following error:

OfflinePlugin: uglifyjs-webpack-plugin is required to preform a minification

Messed around a little bit myself but adding terser support while maintaining uglifyjs support for < webpack@4.26.0 involves a bit more than updating the import, unfortunately.

Those running into this issue can meanwhile explicitly add uglifyjs-webpack-plugin to the dev dependencies until this is resolved.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions