-
Notifications
You must be signed in to change notification settings - Fork 130
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
feat: upgrade rspack to 0.5 canary #1171
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@ahabhgk I have create an branch for 0.3.0 release, you can merge to this branch: https://github.com/web-infra-dev/rsbuild/tree/dev_0.3.0 |
@@ -77,6 +40,8 @@ export const applyBasicReactSupport = (api: RsbuildPluginAPI) => { | |||
return; | |||
} | |||
|
|||
chain.resolve.alias.set('react-refresh', REACT_REFRESH_DIR_PATH); |
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.
before this alias will be added by rspack, in 0.5 react-refresh will be a peerDependencies of @rspack/core, i'm not sure whether user need to install react-refresh by themselves when using rsbuild, but I saw react-refresh is dependencies of the plugin-react, so I add this alias at here
it's ok to remove this alias if the original intention is let user install react-refresh by themselves
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.
@rsbuild/plugin-react
already provides react-refresh
, usually users do not need to install it 😄
return; | ||
} | ||
|
||
new compiler.webpack.EntryPlugin(compiler.context, reactRefreshEntry, { |
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.
No need, @rspack/plugin-react-refresh will add this
if (swcConfig.jsc?.externalHelpers) { | ||
chain.resolve.alias.set( | ||
'@swc/helpers', | ||
path.dirname(require.resolve('@swc/helpers/package.json')), |
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.
@swc/helpers is a peerDependencies of @rspack/core in 0.5, before the alias is added by rspack
if (usingHMR) { | ||
chain | ||
.plugin(utils.CHAIN_ID.PLUGIN.HMR) | ||
.use(utils.bundler.HotModuleReplacementPlugin); |
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.
devServer is remove from core, now dev-server need to apply HotModuleReplacementPlugin manually
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.
get 👌
@@ -1277,7 +1275,9 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod | |||
"_options": { | |||
"compress": "{"passes":1,"pure_funcs":[],"drop_console":false}", | |||
"exclude": undefined, | |||
"extractComments": "true", | |||
"extractComments": { | |||
"condition": "@preserve|@lic|@cc_on|^/**!", |
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.
> & { | ||
import?: BuiltinsOptions['pluginImport']; | ||
rspackExperiments?: { | ||
relay?: |
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.
Can we import relay / emotion / import options from Rspack?
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.
Let's do it after 0.5 release
Some conflicts needs to be resolved... And I have changed the target branch to |
782a29b
to
9891868
Compare
Excellent work! ❤️ |
Summary
Related Links
Checklist