Skip to content

Add ESM typescript support to plugins via loaders. #1938

@mshima

Description

@mshima

Is your feature request related to a problem? Please describe.
Typescript plugins support in esm projects support is not trivial.
It's needed to add a environment variable to force node to load the typescript loader.

  • Environment variables requires cross-env to be portable
  • When there are lots of scripts, the section will be bloated
  • npx ng ... doesn't work

Describe the solution you'd like
Add a configuration to load side effects before loading plugins:

{
  "import": "jiti/register",
  "plugins": ["./plugins/a.ts"]
}

Describe alternatives you've considered

{
  "plugins": [{ "path": "jiti/register", "sideEffect":  true }]
}

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions