Skip to content

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

@fi3ework

Description

@fi3ework

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or requeston hold

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions