-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esm: bypass CJS loader in default load under --default-type=module
#50004
Conversation
Review requested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. I would maybe rephrase the PR description though, I think this more a continued expansion of the behavior of --default-type
to mean “in module
mode, the ESM loader is the only loader in use” which is what we want and was part of the proposal.
}); | ||
}); | ||
|
||
it('should affect CJS .js files', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CJS .js files . . . that are required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that are required, imported, or used as entry point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth spelling that out, I was assuming “CJS .js files” meant .js files required by CommonJS modules, rather than what I now presume you meant, “.js file that is interpreted as CommonJS.”
This allows user to opt-out from using the monkey-patchable CJS loader, even to load CJS modules.
Landed in 0dfc59e |
This allows user to opt-out from using the monkey-patchable CJS loader, even to load CJS modules. PR-URL: #50004 Reviewed-By: Geoffrey Booth <[email protected]>
This allows user to opt-out from using the monkey-patchable CJS loader, even to load CJS modules. PR-URL: #50004 Reviewed-By: Geoffrey Booth <[email protected]>
This allows user to opt-out from using the monkey-patchable CJS loader, even to load CJS modules. PR-URL: #50004 Reviewed-By: Geoffrey Booth <[email protected]>
This allows user to opt-out from using the monkey-patchable CJS loader to load CJS modules.