-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Deno.bundle() generates (calls) function name that is not defined #9055
Comments
cc @kdy1 |
lucacasonato
added
bug
Something isn't working correctly
swc
related to swc (bundling/transpiling)
labels
Jan 9, 2021
15 tasks
Hello! const x = {
n: 123,
t: 'text',
int: '==INT=='
}
const { n, t, int } = x
console.log(n, t, int)
// "deno run x.ts" output (correct):
// 123 text ==INT==
// "deno bundle x.ts" output (incorrect):
// const x = {
// n: 123,
// t: 'text',
// int: '==INT=='
// };
// const { n , t , __int } = x;
// console.log(n, t, __int);
// __int is undefined :( Thank you for your hard work <3 |
kdy1
added a commit
to kdy1/swc
that referenced
this issue
Jan 21, 2021
kdy1
added a commit
to kdy1/swc
that referenced
this issue
Jan 21, 2021
Should be fixed in #9374 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
I have a small module, which has a function named "int". The function is exported and is used in other modules. Deno runs code as expected. But for some reason, Deno.bundle() doesn't generate correct Javascript. In browser I'm getting
Uncaught ReferenceError: __int is not defined
.I dont know when this issue started to happen (what exact Deno version, but i can say that in 1.5.6 it was ok, and now, in 1.6.3, it is not ok). So the issue is:
const __default1 = { int, ... };
)I have attached image that shows the comparison of what is generated.
P.S.: Thank you for your support and work on such awesome project <3
The text was updated successfully, but these errors were encountered: