-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
Closed
Description
Version
v20.10.0
Platform
No response
Subsystem
seems loader init the esm builtin from cjs, which shown on process because only process module can be accessed before require/import.
What steps will reproduce the bug?
process.default = 1;
require('process');// crashprocess.default = 1;
import('process');// crashrequire('process');
process.default = 1;
require('process');// ok
import('process');// okprocess.x = 1;
import('process').then(processModule => {
console.log('x' in processModule);// true
});How often does it reproduce? Is there a required condition?
every time.
What is the expected behavior? Why is that the expected behavior?
don't crash. and esm version should not use the modified cjs version to init its module names, if I'm right.
What do you see instead?
crash (even not throw).
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels