Skip to content
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

Bundler repeat importing issue #8530

Closed
ije opened this issue Nov 28, 2020 · 2 comments · Fixed by #8575
Closed

Bundler repeat importing issue #8530

ije opened this issue Nov 28, 2020 · 2 comments · Fixed by #8575
Labels
bug Something isn't working correctly cli related to cli/ dir swc related to swc (bundling/transpiling)

Comments

@ije
Copy link

ije commented Nov 28, 2020

here is my entry.ts

import Head  from "https://deno.land/x/aleph/head.ts"
import * as Head2 from "https://deno.land/x/aleph/head.ts"
console.log(Head, Head2)

when i run deno bundle entry.ts bundle.js, i got an error:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc_bundler-0.17.1/src/bundler/chunk/merge.rs:128:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

in deno 1.5.4 (bc79d55, release, x86_64-apple-darwin)

ije pushed a commit to alephjs/aleph.js that referenced this issue Nov 28, 2020
@bartlomieju
Copy link
Member

Just tested on latest master, it's still panicking though it's a different error:

thread 'main' panicked at 'assertion failed: `(left != right)`
  left: `[]`,
 right: `[]`: forced_ns should be modified only if a namespace import specifier exist', /Users/biwanczuk/.cargo/registry/src/github.com-1ecc6299db9ec823/swc_bundler-0.17.1/src/bundler/import/mod.rs:315:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@kdy1 could you take a look?

@bartlomieju bartlomieju added bug Something isn't working correctly cli related to cli/ dir labels Nov 29, 2020
@kdy1
Copy link

kdy1 commented Nov 29, 2020

Of course, I'll fix it asap.

@kdy1 kdy1 mentioned this issue Nov 29, 2020
2 tasks
kdy1 added a commit to kdy1/swc that referenced this issue Nov 29, 2020
@lucacasonato lucacasonato added the swc related to swc (bundling/transpiling) label Nov 29, 2020
kdy1 added a commit to swc-project/swc that referenced this issue Nov 30, 2020
swc_ecma_codegen:
 - Fix codegen of unicode escapes. (denoland/deno#8541)

swc_bundler:
 - Allow importing a module multiple time. (denoland/deno#8530)
kdy1 added a commit to swc-project/swc that referenced this issue Dec 27, 2020
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.
divanutq added a commit to divanutq/aleph.js that referenced this issue Aug 1, 2024
citiranom2w added a commit to citiranom2w/aleph.js that referenced this issue Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir swc related to swc (bundling/transpiling)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants