-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(turbopack-ecmascript): use direct namespace re-export (#7963)
### Description Also has a fix for async modules with `__turbopack_export_namespace__`. Could still break if `__turbopack_export_namespace__` is called before an `await`. Closes PACK-2962
- Loading branch information
1 parent
95fdcaa
commit 984a635
Showing
9 changed files
with
43 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
crates/turbopack-tests/tests/execution/turbopack/async-modules/esm-external/input/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { a, b, default as def } from "esm-external/package"; | ||
|
||
it(`should reexport all exports from an external esm module`, async () => { | ||
expect(def).toBe("default"); | ||
|
||
expect(a).toBe("a"); | ||
expect(b).toBe("b"); | ||
}); |
4 changes: 4 additions & 0 deletions
4
...tests/tests/execution/turbopack/async-modules/esm-external/node_modules/package/index.mjs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...ts/tests/execution/turbopack/async-modules/esm-external/node_modules/package/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 6 additions & 2 deletions
8
...urbopack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 5 additions & 5 deletions
10
...pack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 6 additions & 2 deletions
8
...ut/79fb1_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_40d141.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
...9fb1_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_40d141.js.map
Large diffs are not rendered by default.
Oops, something went wrong.