-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(module-tools): alias not working on re-export (#4784)
- Loading branch information
Showing
5 changed files
with
31 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@modern-js/module-tools': patch | ||
--- | ||
|
||
fix: alias not working on re-export | ||
fix: 别名在重导出不生效 |
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
2 changes: 2 additions & 0 deletions
2
tests/integration/module/fixtures/build/redirect/src/alias.ts
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
const alias = true; | ||
|
||
export const a = 42; | ||
export const b = 42; | ||
export default alias; |
14 changes: 12 additions & 2 deletions
14
tests/integration/module/fixtures/build/redirect/src/index.ts
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 |
---|---|---|
@@ -1,5 +1,15 @@ | ||
// css module | ||
import css from './index.module.css'; | ||
|
||
// asset | ||
import svg from './logo.svg'; | ||
import alias from '@/alias'; | ||
|
||
console.log(css, svg, alias); | ||
// alias | ||
import namedImport, { a, b } from '@/alias'; | ||
import * as wildcardImport from '@/alias'; | ||
|
||
export { a, b } from '@/alias'; | ||
export * from '@/alias'; | ||
export * as c from '@/alias'; | ||
|
||
console.log(css, svg, a, b, namedImport, wildcardImport); |