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

feat(rspack): dev & build #20067

Closed
wants to merge 7 commits into from
Closed

feat(rspack): dev & build #20067

wants to merge 7 commits into from

Conversation

underfin
Copy link
Contributor

@underfin underfin commented Apr 4, 2023

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codesandbox
Copy link

codesandbox bot commented Apr 4, 2023

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@underfin underfin marked this pull request as draft April 4, 2023 07:12
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)
Copy link
Contributor Author

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)
Copy link
Contributor Author

@underfin underfin Apr 4, 2023

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.

Copy link
Member

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 */
Copy link
Contributor Author

@underfin underfin Apr 4, 2023

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?


// Register devMiddleware on server
// @ts-ignore
Copy link
Contributor Author

@underfin underfin Apr 4, 2023

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...

@danielroe danielroe changed the base branch from feat/rspack to main June 4, 2023 23:17
@HigherOrderLogic
Copy link
Contributor

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants