Skip to content
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

node-resolve does not allow of external returning constant true #959

Closed
StreetStrider opened this issue Jul 26, 2021 · 2 comments
Closed

Comments

@StreetStrider
Copy link
Contributor

  • Rollup Plugin Name: plugin-node-resolve
  • Rollup Plugin Version: 13.0.4 (multiple versions may be affected)
  • Rollup Version: 2.54.0
  • Operating System (or Browser): GNU/Linux
  • Node Version: v14.17.0 (multiple versions affected)
  • Link to reproduction (⚠️ read below): https://replit.com/@StrangeTransist/rollup-plugin-repro

Expected Behavior

No errors.

Actual Behavior

[!] Error: Entry module cannot be external (subdir/entry.js).

Additional Information

This happens only with plugin included.

@shellscape
Copy link
Collaborator

Why is it that you're marking every module as external? node-resolve will explicitly not resolve external modules as can be seen here:

const isExternal = !!(resolvedResolved && resolvedResolved.external);
if (isExternal) {
return false;
}
and was intentional via 3a543df

@StreetStrider
Copy link
Contributor Author

🤔 I think I should re-investigate this issue, so I'll close this in order to not to mess up anyone's mind more.
I was hunting for another issue under this one which re-writes import paths where I don't need them (so I may be experiencing something similar to #609). This is kinda reflected in the same repro. But now I'm not sure this is related to node-resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants