-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
getCjsExportFromNamespace messes up default exports #491
Comments
Looks like this one should be added to #481 |
Thanks for opening an issue. Citing the issue template:
Please add a reproduction and we'll be happy to triage further. |
@shellscape here is the reproduction: https://repl.it/join/vhpbczoh-veetaha |
bors bot
added a commit
to rust-lang/rust-analyzer
that referenced
this issue
Jul 8, 2020
5262: Workaround rollup messing up default imports r=matklad a=Veetaha Tackles #5257 (comment) Related: rollup/plugins#491 Co-authored-by: Veetaha <veetaha2@gmail.com>
shellscape
added
c³ ⋅ PR welcome
t¹ 🐞 bug
🔌 plugin-commonjs
and removed
💩 no reproduction
labels
Jul 9, 2020
shellscape
changed the title
getCjsExportFromNamespace messes up default exports (how to disable it?)
getCjsExportFromNamespace messes up default exports
Jul 9, 2020
matklad
pushed a commit
to matklad/vscode-rust
that referenced
this issue
Jul 13, 2020
5262: Workaround rollup messing up default imports r=matklad a=Veetaha Tackles rust-lang/rust-analyzer#5257 (comment) Related: rollup/plugins#491 Co-authored-by: Veetaha <veetaha2@gmail.com>
This was referenced Jul 21, 2020
bors bot
added a commit
to rust-lang/rust-analyzer
that referenced
this issue
Dec 8, 2020
6759: Remove workaround & fix fetch$1 is not a function r=lnicola a=kafji Remove workaround for rollup/plugins#491 because it's fixed in 15.0 https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md#v1500. Also fix fetch$1 is not a function error #6757. Co-authored-by: Kafji <k@kafji.net>
Matthias-Fauconneau
pushed a commit
to Matthias-Fauconneau/rust-analyzer
that referenced
this issue
Feb 7, 2021
Remove workaround for rollup/plugins#491 because it's fixed in 15.0 https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md#v1500. Also fix fetch$1 is not a function error rust-lang#6757.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@rollup/plugin-commonjs
13.0.0
2.18.1
12.8.1
How Do We Reproduce?
Link to REPL
Use the following rollup.config.js:
Add
"node-fetch": "^2.6.0"
topackage.json
Write the following code (in reality it is generated by
tsc
as the first step before invoking rollup):When run in node REPL this works fine:
Output
Expected Behavior
When packaged with rollup it must work the same as in node REPL (it must not crash in our production!)
Actual Behavior
It outputs
undefined
.The reason is that the bundle contains the following:
cc @lukastaegert
related: rust-lang/rust-analyzer#5257 (comment)
The text was updated successfully, but these errors were encountered: