-
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.
- Loading branch information
1 parent
3b6fb01
commit 3527cd9
Showing
11 changed files
with
35 additions
and
0 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
9 changes: 9 additions & 0 deletions
9
e2e/fixtures/tree-shaking.skip_module.import_double_default_as/expect.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,9 @@ | ||
const assert = require('assert'); | ||
const { parseBuildResult } = require('../../../scripts/test-utils'); | ||
const { files } = parseBuildResult(__dirname); | ||
|
||
const content = files['index.js']; | ||
|
||
assert(!content.includes('src/dep/index.js'), `should skip middle files`); | ||
|
||
assert(content.includes('console.log(_dep.default, _dep.default)'), `should change field name`); |
3 changes: 3 additions & 0 deletions
3
e2e/fixtures/tree-shaking.skip_module.import_double_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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"optimizePackageImports": false | ||
} |
1 change: 1 addition & 0 deletions
1
e2e/fixtures/tree-shaking.skip_module.import_double_default_as/src/dep/dep.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 default 1; |
1 change: 1 addition & 0 deletions
1
e2e/fixtures/tree-shaking.skip_module.import_double_default_as/src/dep/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 @@ | ||
export { default } from './dep.js'; |
3 changes: 3 additions & 0 deletions
3
e2e/fixtures/tree-shaking.skip_module.import_double_default_as/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { default as d1, default as d2 } from './dep/index.js'; | ||
|
||
console.log(d1,d2); |
9 changes: 9 additions & 0 deletions
9
e2e/fixtures/tree-shaking.skip_module.import_double_named_as/expect.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,9 @@ | ||
const assert = require('assert'); | ||
const { parseBuildResult } = require('../../../scripts/test-utils'); | ||
const { files } = parseBuildResult(__dirname); | ||
|
||
const content = files['index.js']; | ||
|
||
assert(!content.includes('src/dep/index.js'), `should skip middle files`); | ||
|
||
assert(content.includes('console.log(_dep.default, _dep.default)'), `should change field name`); |
3 changes: 3 additions & 0 deletions
3
e2e/fixtures/tree-shaking.skip_module.import_double_named_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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"optimizePackageImports": false | ||
} |
1 change: 1 addition & 0 deletions
1
e2e/fixtures/tree-shaking.skip_module.import_double_named_as/src/dep/dep.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 default 1; |
1 change: 1 addition & 0 deletions
1
e2e/fixtures/tree-shaking.skip_module.import_double_named_as/src/dep/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 @@ | ||
export { default as n } from './dep.js'; |
3 changes: 3 additions & 0 deletions
3
e2e/fixtures/tree-shaking.skip_module.import_double_named_as/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { n as d1, n as d2 } from './dep/index.js'; | ||
|
||
console.log(d1,d2); |