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

[heft] Migrate heft-webpack5-plugin to use webpack-dev-server@4.0.x #2818

Closed
bartvandenende-wm opened this issue Jul 20, 2021 · 4 comments
Closed
Projects

Comments

@bartvandenende-wm
Copy link
Contributor

bartvandenende-wm commented Jul 20, 2021

Summary

heft-webpack5-plugin binds to webpack-dev-server 3.11.x. It looks like 3.11.x currently only provides basic compatibility with webpack 5.0, as open issues are only being addressed in version 4.x.x.

This ticket is a request to consider to update the dependency of webpack-dev-server in heft-webpack5-plugin from @3.11.x to @4.0.x which provides official webpack 5 compatibility.

As 4.x.x. includes breaking changes and just hit the RC.0 status an alternative could be to 'loosen' the semver binding of webpack-dev-server to allow major version overrides on a project/rig basis.

Repro steps

An example of a failure case of webpack-dev-server [3.11.x] is to handle es5 targets properly with HMR:

  1. use a web-application sample project
  2. in the webpack config set target: ['web', 'es5']
  3. notice that HMR is not working

Reference:
webpack/webpack-dev-server#2961

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@rushstack/heft version? ^0.34.7
Operating system? Mac
Would you consider contributing a PR? Yes
Node.js version (node -v)? v12.17.0
@bartvandenende-wm
Copy link
Contributor Author

it looks like @types/webpack-dev-server are not yet available for 4.x so this likely would be blocking the transition, there is some push for back-porting the fixes to 3.x but no clarity on that either per webpack/webpack-dev-server#3271

@iclanton
Copy link
Member

The missing typings might not be a huge issue, unless the API changed in nontrivial ways. Do you know if it changed? Is it enough to just bump the dependency version?

@iclanton iclanton added this to General Discussions in Bug Triage Aug 12, 2021
@bartvandenende-wm
Copy link
Contributor Author

bartvandenende-wm commented Aug 20, 2021

@iclanton looks like there where some breaking changes, below a migration guide:
https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md Though I'm not sure if it impacts the plugin

The stable version just got release 2 days ago, but no type updates yet from DefinitelyTyped

@bartvandenende-wm
Copy link
Contributor Author

this issue is solved

Bug Triage automation moved this from General Discussions to Closed Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Bug Triage
  
Closed
Development

No branches or pull requests

2 participants