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
[commonjs] named export missing with v13 + dynamic imports #467
Comments
Probably similar to #451 |
The weird thing is if I add a dummy static import at the top the dynamic one works again and provides the named export. |
I think it is different from #451 and might be actually a bug in Rollup itself, specifically in how synthetic named exports interact with dynamic imports. Will need to investigate. |
There will be a fix in Rollup, see rollup/rollup#3648. I will put it into the next patch release. This should fix this bug without necessary changes to this plugin. |
Fixed in Rollup@2.18.1 |
Thank you! edit: also confirming that things work again with 2.18.1 :) |
@lukastaegert it seems still to be broken with 2.25 Pls check the demo repo: https://github.com/desmap/project-refs When you run it you get:
The dynamic import is in
You need to run it with It works with a static CC @lazka |
I'd suggest you open a new issue for this. |
@lazka I can do this but why a second issue about the exact same thing? It's again about named export[s] missing with v13 + dynamic imports.. Maybe it doesn't work because I used a top-level await but this shouldn't be the reason (hopefully)... whatever it's not working. |
@lukastaegert let me know if you want a new issue about the my post above |
(Please remember to use the "Edit" feature for successive replies to help cut down on notification noise.) |
Yes please, because even though the symptom is the same, the cause obviously isn't. This helps me with book-keeping and adds visibility so that others notice this issue and can have a look as well. |
(For completeness sake I've tested my reproducer and it still works correctly with the latest versions of everything) |
In this case it was on purpose. Github does not notify users added in an edit. Besides, pls be aware that your post creates unnecessary noise as well and is not welcoming. |
Thanks for checking it out again. Did you test it with a top-level await? |
No. I just want to rule out that this is a regression. |
@desmap I asked politely. Please heed the requests of maintainers. Locking as resolved to prevent further superfluous comments. If this becomes an issue for anyone else in the future, please create a new issue. |
How Do We Reproduce?
I'm including fabricjs via dynamic imports and the update from v12 to v13 removed the named export. Static imports still work though.
This works though
I've created a small reproducer: https://github.com/lazka/rollup-bug-dynamic-import-exports
Expected Behavior
Named exports work the same with dynamic imports as with non-dynamic ones
Actual Behavior
They are missing in the dynamic case.
The text was updated successfully, but these errors were encountered: