-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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(rspack): dev & build #20067
feat(rspack): dev & build #20067
Conversation
Β Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
const cssLoaders = createCssLoadersRule(ctx, options.webpack.loaders.css) | ||
const cssModuleLoaders = createCssLoadersRule(ctx, options.webpack.loaders.cssModules) | ||
// const cssLoaders = createCssLoadersRule(ctx, options.webpack.loaders.css) | ||
// const cssModuleLoaders = createCssLoadersRule(ctx, options.webpack.loaders.cssModules) |
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.
Rspack support MiniCssExtractPlugin
+ CssMinimizerPlugin
+ CssModules
by default.
@@ -36,6 +37,7 @@ export async function bundle (nuxt: Nuxt) { | |||
return getRspackConfig(ctx) | |||
}) | |||
|
|||
// @ts-ignore | |||
await nuxt.callHook('rspack:config', webpackConfigs) |
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.
Here missing some hook key for 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.
If rspack aspires to drop-in compatibility with webpack
, I think we could consider renaming these hooks back to the webpack:*
prefix.
@@ -64,7 +66,7 @@ export async function bundle (nuxt: Nuxt) { | |||
|
|||
// In dev, write files in memory FS | |||
if (nuxt.options.dev) { | |||
compiler.outputFileSystem = mfs as unknown as OutputFileSystem | |||
compiler.outputFileSystem = mfs as any /* as OutputFileSystem */ |
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.
I'm not sure it need at rspack, getRspackMemoryAssets
should work for dev server visit resource. Maybe it used for online editor?
packages/rspack/src/rspack.ts
Outdated
|
||
// Register devMiddleware on server | ||
// @ts-ignore |
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.
The webpackHotMiddleware
is compatiable with rspack, only type issue...
Any update on this? |
π Linked issue
β Type of change
π Description
π Checklist