-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Provide a warning when export * externals ambiguously capture #1800
Comments
Unfortunately this is a consequence of the way Rollup has to assume external star exports might catch any given export name. So ordering does matter here yes. We could possibly provide options to configure this sort of thing but I get the feeling that tweaking the ordering in the code base is an easier more sensible fix, even if this is a somewhat Rollup-specific scenario. |
Closing, but happy to continue discussion on this. |
I have fixed the issue by changing all of my exports to be explicitly named. Any chance to at least get a warning when this scenario happens? It would've saved me having to dig through the generated code to figure out what caused the issue. |
Reopening to note this should be a warning. |
@lukastaegert is this still an issue in the latest version? |
Yes, it is still an issue. Just to recapitulate for future reference, the issue is that in any situation where an external star re-export overlaps with another star import (external or not), we want to display a warning that the behaviour might not be 100% accurate as Rollup will
|
Having an
export * from "package"
statement seems to cause the generated javascript to export things from the wrong source. I should mention that this code is getting transpiled from typescript, so I'd get an error if any of the exports had name collisions.Error Repro
Similar but working
It seems to me that exporting an entire package is a bad idea anyhow, so I I'm going to go ahead and remove it. I figured I would file a bug anyhow in case there's a better way of handling this situation. I'm unsure of the module semantics around exports, does ordering matter for multiple
export *
statements?The text was updated successfully, but these errors were encountered: