-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Merge import.meta.require and require to be the same thing #3732
Conversation
5cede54
to
786345d
Compare
❌ @paperdave 1 files with test failures on linux-x64-baseline:
|
❌ @paperdave 1 files with test failures on linux-x64:
|
5cede54
to
706d2cb
Compare
❌ @paperdave 7 files with test failures on bun-darwin-aarch64:
|
❌ @paperdave 11 files with test failures on bun-darwin-x64-baseline:
|
Looks like this breaks plugins because plugins for "real" CommonJS aren't actually implemented yet (that's why plugins + svelte tests are failing) I think that will need to be addressed before this PR can move forward. |
c574f9f
to
31145d1
Compare
We used to implement
require
twice. once forimport.meta.require
and then once in the actualrequire
implementation. This is just old code from before the CJS rewrite.import.meta.require
andcreateRequire
now create an emptyJSCommonJSModule
and return it'srequire
function.Fixes #3724, because the old require implementation would not append
__esModule
to certain case.