Skip to content

esm: remove CLI flag limitation to programmatic registration#48439

Closed
JakobJingleheimer wants to merge 13 commits intonodejs:mainfrom
JakobJingleheimer:esm/instantiate-worker-on-demand
Closed

esm: remove CLI flag limitation to programmatic registration#48439
JakobJingleheimer wants to merge 13 commits intonodejs:mainfrom
JakobJingleheimer:esm/instantiate-worker-on-demand

Conversation

@JakobJingleheimer
Copy link
Copy Markdown
Member

This is a follow-up to #46826

We see 2 potential approaches here when we detect a user is trying to register a loader and the worker etc have not be set up:

  1. Replace the existing DefaultModuleLoader with a CustomizedModuleLoader
  2. Merge the two ModuleLoaders back together and trigger setups when certain methods are called (eg ModuleLoader::register())

The first seems the simplest. However, it's currently facing an issue where ModuleJob maintains a reference to the loader that instantiated it; in option 1, that reference becomes stale. Further work to be done is to sever their direct connection.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants