-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(skip_modules): find export source terminated when meets default i…
…mport (#862) * chore: 🔧 skip modules default enabled * fix: 🐛 found export source skip default * test: ✅ update testcases * test: ✅ add lodash-es default import * chore: ⬆️ update pnpm-lock * test: ✅ immigrate wepback side-effects test cases * feat: ✨ 支持最终导出符号在 cjs 模块中的 case * test: ✅ ts -> js 方便使用 webpack 编译对比 * chore: 🔧 enable skipModules in with-antd * chore: ➕ add missing @jest/expect * chore: ✏️ binding d.ts upddate
- Loading branch information
1 parent
cb8ce77
commit 705e992
Showing
143 changed files
with
1,668 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
mod import_exports; | ||
|
||
use std::collections::{HashMap, HashSet}; | ||
|
||
use mako_core::swc_common::SyntaxContext; | ||
|
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,4 @@ | ||
mod find_export_source; | ||
pub mod skip_module; | ||
|
||
use std::cell::RefCell; | ||
|
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion
5
e2e/fixtures/tree-shaking.skip_module.reexport_default_as/mako.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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"optimization": { "skipModules": true }, | ||
"optimizePackageImports": false | ||
"optimizePackageImports": false, | ||
"entry":{ | ||
"index": "src/index.js" | ||
} | ||
} |
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
e2e/fixtures/webpack.side-effects.dynamic-reexports/checked-export/dynamic.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 @@ | ||
Object(exports).value = 123; | ||
Object(exports).value2 = 42; |
3 changes: 3 additions & 0 deletions
3
e2e/fixtures/webpack.side-effects.dynamic-reexports/checked-export/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,3 @@ | ||
export { value, value2 } from "./module"; | ||
|
||
throw new Error("Should not be loaded"); |
2 changes: 2 additions & 0 deletions
2
e2e/fixtures/webpack.side-effects.dynamic-reexports/checked-export/module.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 @@ | ||
export const value = 42; | ||
export * from "./dynamic"; |
2 changes: 2 additions & 0 deletions
2
e2e/fixtures/webpack.side-effects.dynamic-reexports/dedupe-target-static/a.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 @@ | ||
export * from "./module"; | ||
export const valueUsed = __webpack_exports_info__.value.used; |
Oops, something went wrong.