rspack
rspack copied to clipboard
[Feature Request]: prebundle rspack config file by rspack itself for better config extensions support
What problem does this feature solve?
Support multiple config file extensions, such as mjs ts cjs mts cts, especially ts for better intellisense and type check.
What does the proposed API of configuration look like?
Utilize rspack itself to pre-bundle the config file. The bundling should have the following features:
- A default unmodifiable sane nodejs lib config
- Externalize dependencies in node_modules
- Support both ESM and CJS output
- Hijacking
require.extensionsto load CJS and use temp file (before--loaderlanded) for ESM.