web-infra-dev / rspack

The fast Rust-based web bundler with webpack-compatible API 🦀️
https://rspack.dev
MIT License
9.78k stars 561 forks source link

[Feature]: support contextReplacementPlugin #7474

Closed hardfist closed 1 month ago

hardfist commented 3 months ago

What problem does this feature solve?

docusaurus use https://webpack.js.org/plugins/context-replacement-plugin/#root to optimize primjs bundling

What does the proposed API of configuration look like?

same as webpack

shulaoda commented 2 months ago

This is currently difficult to proceed with, as there are many missing features in ContextModulaFactory and it seems that there are also some implementation issues.

hardfist commented 2 months ago

currently blocks https://github.com/getsentry/sentry/pull/77077 and docusaurs integration, consider prioritize it

hardfist commented 2 months ago

@shulaoda this is high prioritize issue, so @SyMind will continue work on it

shulaoda commented 2 months ago

@shulaoda this is high prioritize issue, so @SyMind will continue work on it

👍