-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: basic support for importing external module (#168)
* feat: basic support for importing external module * Rmeove wrong comment * Lint
- Loading branch information
Showing
11 changed files
with
180 additions
and
53 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
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
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
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
21 changes: 21 additions & 0 deletions
21
crates/rolldown/tests/fixtures/external/implicit_import_external/artifacts.snap
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,21 @@ | ||
--- | ||
source: crates/rolldown/tests/common/case.rs | ||
expression: content | ||
input_file: crates/rolldown/tests/fixtures/external/implicit_import_external | ||
--- | ||
# Assets | ||
|
||
## main.mjs | ||
|
||
```js | ||
import * as node_assert_ns from "node:assert"; | ||
import { default as node_assert_default, equal } from "node:assert"; | ||
// main.js | ||
node_assert_default.equal(1, 1) | ||
node_assert_ns.equal(1, 1) | ||
equal(1, 1) | ||
``` |
6 changes: 6 additions & 0 deletions
6
crates/rolldown/tests/fixtures/external/implicit_import_external/main.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,6 @@ | ||
import assert from 'node:assert' | ||
import { equal } from 'node:assert' | ||
import * as assert_star from 'node:assert' | ||
assert.equal(1, 1) | ||
assert_star.equal(1, 1) | ||
equal(1, 1) |
1 change: 1 addition & 0 deletions
1
crates/rolldown/tests/fixtures/external/implicit_import_external/test.config.json
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 @@ | ||
{} |