Skip to content

feat(esm): leverage loaders when resolving subsequent loaders#43772

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
arcanis:mael/loaders-subsequent-resolution
Dec 17, 2022
Merged

feat(esm): leverage loaders when resolving subsequent loaders#43772
nodejs-github-bot merged 1 commit intonodejs:mainfrom
arcanis:mael/loaders-subsequent-resolution

Conversation

@arcanis
Copy link
Contributor

@arcanis arcanis commented Jul 11, 2022

“Notable change” summary by @GeoffreyBooth:

Loaders now apply to subsequent loaders, for example: --experimental-loader ts-node --experimental-loader loader-written-in-typescript.


Original introduction by @arcanis:

This PR is a follow-up to the Ambient Loaders proposal. Since in the last meetings we weren’t too sure whether “ambient loaders” shouldn’t just be the default loaders behaviour, I implemented it this way (but can change it later if needed).

I left a few assets to quickly try the system; without this PR, the second --loader would fail because xxx/* wouldn’t be resolvable:

cd dev_fixtures_do_not_merge
../node –loader ./loader-a.mjs –loader xxx/loader-b.mjs ./index.mjs

cc @nodejs/loaders @cspotcode

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

Labels

esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders notable-change PRs with changes that should be highlighted in changelogs. process Issues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.