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
When the target's context is Node
"targets": { "node": { "context": "node" } },
and use dynamic import
// index.js import("./foo").then(foo => console.log(foo))
// foo.js export const foo = "foo";
, then run
parcel watch index.js --no-cache --target node
The generated JS looks like
module.exports = Promise.resolve(require("./foo.da43fb97.js?" + Date.now())).then(()=>module.bundle.root("4Knu0"));
When node ./dist/index.js, it errors out
node ./dist/index.js
Error: Cannot find module './foo.da43fb97.js?1699650105056'
I've created a simple repo to reproduce this problem. In my real world app, foo.js is a node_module, so I cannot remove the dynamic require.
I understand ?1699650105056 is to clear the module cache but node require doesn't seem to accept it.
?1699650105056
Should be able to run node ./dist/index.js
https://github.com/liamqma/reproduce-parcel-bug
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
🐛 bug report
When the target's context is Node
and use dynamic import
, then run
The generated JS looks like
When
node ./dist/index.js
, it errors outI've created a simple repo to reproduce this problem. In my real world app, foo.js is a node_module, so I cannot remove the dynamic require.
🤔 Expected Behavior
I understand
?1699650105056
is to clear the module cache but node require doesn't seem to accept it.😯 Current Behavior
Should be able to run
node ./dist/index.js
💻 Code Sample
https://github.com/liamqma/reproduce-parcel-bug
🌍 Your Environment
The text was updated successfully, but these errors were encountered: