rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Feature Request]: prebundle rspack config file by rspack itself for better config extensions support

Open fi3ework opened this issue 2 years ago • 0 comments

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:

  1. A default unmodifiable sane nodejs lib config
  2. Externalize dependencies in node_modules
  3. Support both ESM and CJS output
  4. Hijacking require.extensions to load CJS and use temp file (before --loader landed) for ESM.

fi3ework avatar Mar 14 '23 07:03 fi3ework