Skip to content

feat(rspack): dev & build#20067

Closed
underfin wants to merge 7 commits intonuxt:mainfrom
underfin:feat/rspack
Closed

feat(rspack): dev & build#20067
underfin wants to merge 7 commits intonuxt:mainfrom
underfin:feat/rspack

Conversation

@underfin
Copy link
Copy Markdown
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
Copy Markdown

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

})

// @ts-ignore
await nuxt.callHook('rspack:config', webpackConfigs)
Copy link
Copy Markdown
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
Copy Markdown
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.

// 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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