-
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 regression in both 1.5.4 and 1.6.0 when a module re-exports both * and default #8679
Comments
cc/ @kdy1 |
The problem is that a module exports |
@kdy1 As per the example on MDN |
@nktpro Oh, thanks! I didn't know it. Then fixing it will be much easier. |
swc_bundler: - Reduce binary size by reducing usage of visitor / folders. - Handle `export *` and `export { default }` from same source. (denoland/deno#8530, denoland/deno#8679) - Fix ordering of statements. (denoland/deno#8545) - Sort statements in wrapped modules. (denoland/deno#8211 (comment)) - Exclude default export while handling `export *`. - Exclude `export { default }` and `export { foo as default }` while handling `export *`. - Make statements from same module to be injected together. (denoland/deno#8620) swc_ecma_transforms: - fixer: Handle assignments in the callee of `new` correctly. - fixer: Handle seqence expression in the callee of `new` correctly.
I've managed to narrow this issue down to a bare-minimal reproducer: Given 3 files:
one.ts
two.ts
three.ts
Only deno
1.4.x
would produce a valid bundle forthree.ts
(very verbose output but valid regardless, since we didn't have bundle tree-shaking until1.5.x
)The bundle output of deno
1.5.4
will simply contain a single invalid statement of:The bundle output of deno
1.6.0
is also invalid, in a slightly different way:It's worth noting that the re-exporting pattern in
two.ts
is basically whatskypack.dev
does, so this issue would usually manifest in the wild by importing some libraries via skypack.The text was updated successfully, but these errors were encountered: