-
-
Notifications
You must be signed in to change notification settings - Fork 561
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
fix(dev-server): prebundle webpack-dev-server and pin webpack-dev-middleware #7788
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@alexander-akait is it acceptable that we add rspack compat tests in webpack-dev-server and webpack-dev-middleware repos or any other suggestions? |
fb9e987
to
581188b
Compare
ffba9b6
to
26aabe8
Compare
26aabe8
to
eda093a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require.resolve
is not modified by tsc-alias
clientImplementation = require.resolve( |
need to resolve require.resolve
issue
Co-authored-by: neverland <chenjiahan.jait@bytedance.com>
3539292
to
8def56d
Compare
close since this is too complex and hacky, waiting for rspack-dev-server refactor |
@hardfist what is broken, I think we can fix them |
@alexander-akait thanks, it' broken cause rspack-dev-server use some private api https://github.com/web-infra-dev/rspack/blob/main/packages/rspack-dev-server/src/server.ts#L159-L174 of webpack-dev-server(we're refactoring the rspack-dev-server to use the public api only #7794), so it's actually nothing wrong with webpack-dev-server itself, but it would be nice if we can test the new version of webpack-dev-server compat before users are hitting the problems. |
@hardfist I am fine with adding cross tests 👍 |
Summary
related to #7782 and #7676
new published webpack-dev-server and webpack-dev-middleware can easily break rspack-cli cause there're no tests in webpack-dev-server & webpack-dev-middle repo and rspack-dev-server use some internal apis of these two packages.
so we need to pin webpack-dev-server & webpack-dev-middleware version to avoid accidentally breaking,
but since webpack-dev-middleware is indirect dependency of webpack-dev-server, there're no easy way to pin it without bundling webpack-dev-server.
This pr is a temporarily solution, and the long term solutions is refactor rspack-dev-server implementation and maybe add tests in webpack-dev-server and webpack-dev-middleware about rspack compatibility
Checklist