bugsnag / webpack-bugsnag-plugins

Webpack plugins for common BugSnag actions.
MIT License
32 stars 29 forks source link

Webpack 5 compatibility #49

Closed chadrien closed 3 years ago

chadrien commented 3 years ago

Goal

The plugin is not working with Webpack 5

Design

The API for plugins changed a little, and it breaks the current implementation

Changeset

Testing

chadrien commented 3 years ago

I'm not sure what's up the with the node 8 tests for webpack 4 and 5 🤔

bengourley commented 3 years ago

Hi @chadrien thanks so much for the contribution. Webpack 5 support is on our backlog, but it got beaten to the top by other high priority work, so this is a massive help in reducing the scope of the update.

We can see why the tests are failing and it looks like it's not to do with your changes, but rather the version of webpack-cli that gets pulled in not being compatible with Node 8.

We're happy to take it from here, fix the tests, put it through our QA process and get it landed.

Thanks again 🙏

chadrien commented 3 years ago

Yay! That's good to hear 🎉

djskinner commented 3 years ago

Thanks for the contribution @chadrien, this looks great.

According to the migration guide "webpack 5 requires at least Node.js 10.13.0 (LTS)" and according to https://github.com/webpack/webpack-cli/issues/1222 "with webpack-cli v4 we will support only webpack v5 and possibly v4 but not officially, so if there are any problems we suggest to use v3.* if you still want to keep the best compatibility" so I've adjusted the webpack/node version combinations accordingly for CI.

@bengourley I've tested this by upgrading the dashboard project to use webpack 5 and this PR and all works well. Let me know if you'd like to see any further manual testing.