8000 First-class support for module loaders · Issue #2364 · cucumber/cucumber-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
First-class support for module loaders #2364
Closed
@davidjgoss

Description

@davidjgoss

🤔 What's the problem you're trying to solve?

Use of ESM loaders without setting the --loader flag from outside the process, which is clunky at the best of times and now discouraged by Node.js in favour of using register() programatically.

✨ What's your proposed solution?

Add a loader option (with a --loader CLI counterpart) for specifying zero or more module loaders to register. Then, do this accordingly before doing any import() of support code. Kinda like requireModule.

This should be done for both serial and parallel runtime flavours.

⛏ Have you considered any alternatives or workarounds?

Leave it as it is and wait for things to be marked stable. This may happen anyway depending on how long it takes us to get to this.

📚 Any additional context?

register() is still marked as experimental so we need to tread carefully.

Relates back to the wider initiative to eventually transition to ESM only.


This text was originally generated from a template, then edited by hand. You can modify the template here.

Metadata

Metadata

Assignees

Labels

✅ acceptedThe core team has agreed that it is a good idea to fix this⚡ enhancementRequest for new functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0