Skip to content

Automatically --disable-interpret on Node 22.18+ #4525

@fregante

Description

@fregante

Feature request

Import webpack.confg.ts with native TS support, without interpreters, by default.

What is motivation or use case for adding/changing the behavior?

Node 22.18+ can read TS just fine, actually it can do so better than webpack's interpreters in some case.

I tried using await import in the config and I bumped into this error:

ERROR: Top-level await is currently not supported with the "cjs" output format

which lead me to realized that I was still using the esbuild interpreter webpack found in node_modules rather than the native "strip ts types" Node.js feature.

How should this be implemented in your opinion?

If native TS support is detected, it should default to --disable-interpret.

Are you willing to work on this yourself?

no

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions