We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
loader.mjs
console.log('loader loaded')
foo.js
console.log('foo loaded')
node --loader=./empty.mjs foo.js
As expected, it will print both loader loaded and foo loaded
loader loaded
foo loaded
-e
node --loader=./empty.mjs -e 'require("./foo.js")'
Only foo loaded is run, whereas I would expect loaded loaded to also be printed.
loaded loaded
node --loader=./empty.mjs -e 'import("./foo.js")'
This also prints only foo loaded, which means that it's not lazy loading of the loader.
Consistently
The loader should be loaded even when using -e.
Loader is not loaded when using -e.
The text was updated successfully, but these errors were encountered:
-e ...
Linking #33435 due to the similarity.
Sorry, something went wrong.
I'm not able to reproduce on the latest version on Node.js. AFAICT loaders are now correctly loaded.
No branches or pull requests
What steps will reproduce the bug?
loader.mjs
:foo.js
to be executed:foo.js
with the loader:As expected, it will print both
loader loaded
andfoo loaded
foo.js
, but using-e
:node --loader=./empty.mjs -e 'require("./foo.js")'
Only
foo loaded
is run, whereas I would expectloaded loaded
to also be printed.node --loader=./empty.mjs -e 'import("./foo.js")'
This also prints only
foo loaded
, which means that it's not lazy loading of the loader.How often does it reproduce? Is there a required condition?
Consistently
What is the expected behavior?
The loader should be loaded even when using
-e
.What do you see instead?
Loader is not loaded when using
-e
.The text was updated successfully, but these errors were encountered: