-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: should not panic if there are accessing on
star as
member (#1730)
<!-- Thank you for contributing! --> ### Description <!-- Please insert your description here and provide especially info about the "what" this PR is solving --> --------- Co-authored-by: IWANABETHATGUY <iwanabethatguy@qq.com>
- Loading branch information
1 parent
cde1203
commit 250c11a
Showing
8 changed files
with
49 additions
and
2 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
7 changes: 7 additions & 0 deletions
7
crates/rolldown/tests/fixtures/tree_shaking/export_star2/_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,7 @@ | ||
{ | ||
"config": { | ||
"treeshake": { | ||
"moduleSideEffects": false | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
crates/rolldown/tests/fixtures/tree_shaking/export_star2/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,20 @@ | ||
--- | ||
source: crates/rolldown_testing/src/integration_test.rs | ||
expression: snapshot | ||
input_file: crates/rolldown/tests/fixtures/tree_shaking/export_star2 | ||
--- | ||
# Assets | ||
|
||
## main.mjs | ||
|
||
```js | ||
//#region foo.js | ||
const foo = 1; | ||
//#endregion | ||
//#region main.js | ||
console.log(foo); | ||
//#endregion | ||
``` |
1 change: 1 addition & 0 deletions
1
crates/rolldown/tests/fixtures/tree_shaking/export_star2/export-star.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 @@ | ||
export * from './export-star2'; |
1 change: 1 addition & 0 deletions
1
crates/rolldown/tests/fixtures/tree_shaking/export_star2/export-star2.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 @@ | ||
export * from './foo'; |
1 change: 1 addition & 0 deletions
1
crates/rolldown/tests/fixtures/tree_shaking/export_star2/foo.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 @@ | ||
export const foo = 1; |
2 changes: 2 additions & 0 deletions
2
crates/rolldown/tests/fixtures/tree_shaking/export_star2/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,2 @@ | ||
import * as star from './export-star'; | ||
console.log(star.foo); |
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