Skip to content

Challenges migrating from --experimental-specifier-resolution=node to custom loader --loader #4736

Answered by aduh95
vscheuber asked this question in Q&A
Discussion options

You must be logged in to vote

The easiest workaround would be to use --loader frodo/loader (or frodo/dist/loader.mjs or similar if you're not using exports map) which would point to a file that does export * from 'commonjs-extension-resolution-loader'; (assuming commonjs-extension-resolution-loader is listed in the deps of your npm package). IIRC, frodo installed globally means that Node.js should be able to resolve frodo/loader from anywhere, but maybe that's wrong, I don't know, I never use globally installed packages.

Another way is to use a data: URL that contains the whole loader, but that's not very practical.

Replies: 0 comments 10 replies

Comment options

You must be logged in to vote
9 replies
@aduh95
Comment options

@vscheuber
Comment options

@vscheuber
Comment options

@aduh95
Comment options

@vscheuber
Comment options

Answer selected by vscheuber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants