-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly construct namespace when dynamically importing chunks with f…
…acades in default export mode (#3709)
- Loading branch information
1 parent
cd47fcf
commit 3cb3c56
Showing
6 changed files
with
22 additions
and
1 deletion.
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
11 changes: 11 additions & 0 deletions
11
test/function/samples/dynamic-import-default-mode-facade/_config.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,11 @@ | ||
const assert = require('assert'); | ||
|
||
module.exports = { | ||
description: 'handles dynamic imports from facades using default export mode', | ||
options: { | ||
input: ['main', 'foo', 'bar'] | ||
}, | ||
exports(exports) { | ||
return exports.then(exported => assert.deepStrictEqual(exported, { default: 4 })); | ||
} | ||
}; |
3 changes: 3 additions & 0 deletions
3
test/function/samples/dynamic-import-default-mode-facade/bar.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 @@ | ||
import foo from './foo.js'; | ||
import square from './square.js'; | ||
export default square(3) + foo; |
2 changes: 2 additions & 0 deletions
2
test/function/samples/dynamic-import-default-mode-facade/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,2 @@ | ||
import square from './square.js'; | ||
export default square(2); |
1 change: 1 addition & 0 deletions
1
test/function/samples/dynamic-import-default-mode-facade/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 @@ | ||
export default import('./foo.js'); |
1 change: 1 addition & 0 deletions
1
test/function/samples/dynamic-import-default-mode-facade/square.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 x => x * x; |