Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use facade module id as [name] for dynamic imports
- Loading branch information
1 parent
4d38d14
commit 30bb092
Showing
247 changed files
with
311 additions
and
224 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
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
test/chunking-form/samples/aliasing-extensions/_expected/amd/main1.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
console.log('main1'); | ||
new Promise(function (resolve, reject) { require(['./generated-chunk'], resolve, reject) }); | ||
new Promise(function (resolve, reject) { require(['./generated-chunk2'], resolve, reject) }); | ||
new Promise(function (resolve, reject) { require(['./generated-main4.dynamic'], resolve, reject) }); | ||
new Promise(function (resolve, reject) { require(['./generated-main5'], resolve, reject) }); | ||
|
||
}); |
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
test/chunking-form/samples/aliasing-extensions/_expected/cjs/main1.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
'use strict'; | ||
|
||
console.log('main1'); | ||
Promise.resolve(require('./generated-chunk.js')); | ||
Promise.resolve(require('./generated-chunk2.js')); | ||
Promise.resolve(require('./generated-main4.dynamic.js')); | ||
Promise.resolve(require('./generated-main5.js')); |
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
test/chunking-form/samples/aliasing-extensions/_expected/es/main1.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
console.log('main1'); | ||
import('./generated-chunk.js'); | ||
import('./generated-chunk2.js'); | ||
import('./generated-main4.dynamic.js'); | ||
import('./generated-main5.js'); |
File renamed without changes.
File renamed without changes.
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: 1 addition & 1 deletion
2
...chained/_expected/amd/generated-chunk2.js → ...t-chained/_expected/amd/generated-dep1.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
console.log('dep1'); | ||
new Promise(function (resolve, reject) { require(['./generated-chunk'], resolve, reject) }); | ||
new Promise(function (resolve, reject) { require(['./generated-dep2'], resolve, reject) }); | ||
|
||
}); |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-chained/_expected/amd/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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
console.log('main'); | ||
new Promise(function (resolve, reject) { require(['./generated-chunk2'], resolve, reject) }); | ||
new Promise(function (resolve, reject) { require(['./generated-dep1'], resolve, reject) }); | ||
|
||
}); |
4 changes: 0 additions & 4 deletions
4
test/chunking-form/samples/dynamic-import-chained/_expected/cjs/generated-chunk2.js
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
test/chunking-form/samples/dynamic-import-chained/_expected/cjs/generated-dep1.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,4 @@ | ||
'use strict'; | ||
|
||
console.log('dep1'); | ||
Promise.resolve(require('./generated-dep2.js')); |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-chained/_expected/cjs/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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
'use strict'; | ||
|
||
console.log('main'); | ||
Promise.resolve(require('./generated-chunk2.js')); | ||
Promise.resolve(require('./generated-dep1.js')); |
2 changes: 0 additions & 2 deletions
2
test/chunking-form/samples/dynamic-import-chained/_expected/es/generated-chunk2.js
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/dynamic-import-chained/_expected/es/generated-dep1.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 @@ | ||
console.log('dep1'); | ||
import('./generated-dep2.js'); |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-chained/_expected/es/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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
console.log('main'); | ||
import('./generated-chunk2.js'); | ||
import('./generated-dep1.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
File renamed without changes.
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.
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.
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.
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.
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
4 changes: 2 additions & 2 deletions
4
...-facade/_expected/amd/generated-chunk2.js → ...facade/_expected/amd/generated-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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
define(['exports', './generated-chunk'], function (exports, dynamic_js) { 'use strict'; | ||
define(['exports', './generated-chunk'], function (exports, dynamic) { 'use strict'; | ||
|
||
|
||
|
||
exports.dynamic = dynamic_js.dynamic; | ||
exports.dynamic = dynamic.dynamic; | ||
|
||
}); |
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-facade/_expected/amd/main1.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
new Promise(function (resolve, reject) { require(['./generated-chunk2'], resolve, reject) }).then(({dynamic}) => console.log('main1', dynamic)); | ||
new Promise(function (resolve, reject) { require(['./generated-dynamic'], resolve, reject) }).then(({dynamic}) => console.log('main1', dynamic)); | ||
|
||
}); |
4 changes: 2 additions & 2 deletions
4
test/chunking-form/samples/dynamic-import-facade/_expected/amd/main2.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
define(['./generated-chunk'], function (dynamic_js) { 'use strict'; | ||
define(['./generated-chunk'], function (dynamic) { 'use strict'; | ||
|
||
console.log('main2', dynamic_js.dynamic, dynamic_js.dep); | ||
console.log('main2', dynamic.dynamic, dynamic.dep); | ||
|
||
}); |
7 changes: 0 additions & 7 deletions
7
test/chunking-form/samples/dynamic-import-facade/_expected/cjs/generated-chunk2.js
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
test/chunking-form/samples/dynamic-import-facade/_expected/cjs/generated-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,7 @@ | ||
'use strict'; | ||
|
||
var dynamic = require('./generated-chunk.js'); | ||
|
||
|
||
|
||
exports.dynamic = dynamic.dynamic; |
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-facade/_expected/cjs/main1.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
'use strict'; | ||
|
||
Promise.resolve(require('./generated-chunk2.js')).then(({dynamic}) => console.log('main1', dynamic)); | ||
Promise.resolve(require('./generated-dynamic.js')).then(({dynamic}) => console.log('main1', dynamic)); |
4 changes: 2 additions & 2 deletions
4
test/chunking-form/samples/dynamic-import-facade/_expected/cjs/main2.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
'use strict'; | ||
|
||
var dynamic_js = require('./generated-chunk.js'); | ||
var dynamic = require('./generated-chunk.js'); | ||
|
||
console.log('main2', dynamic_js.dynamic, dynamic_js.dep); | ||
console.log('main2', dynamic.dynamic, dynamic.dep); |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-facade/_expected/es/main1.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 |
---|---|---|
@@ -1 +1 @@ | ||
import('./generated-chunk2.js').then(({dynamic}) => console.log('main1', dynamic)); | ||
import('./generated-dynamic.js').then(({dynamic}) => console.log('main1', dynamic)); |
File renamed without changes.
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.
6 changes: 3 additions & 3 deletions
6
test/chunking-form/samples/dynamic-import-inline-colouring/_expected/amd/main1.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-inline-colouring/_expected/amd/main2.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
File renamed without changes.
File renamed without changes.
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.
8 changes: 4 additions & 4 deletions
8
test/chunking-form/samples/dynamic-import-inline-colouring/_expected/es/main1.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import './generated-chunk.js'; | ||
import './generated-chunk2.js'; | ||
import './generated-inlined.js'; | ||
import './generated-separate.js'; | ||
|
||
const inlined = import('./generated-chunk.js'); | ||
const separate = import('./generated-chunk2.js'); | ||
const inlined = import('./generated-inlined.js'); | ||
const separate = import('./generated-separate.js'); | ||
|
||
export { inlined, separate }; |
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-inline-colouring/_expected/es/main2.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const separate = import('./generated-chunk2.js'); | ||
const separate = import('./generated-separate.js'); | ||
|
||
export { separate }; |
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
test/chunking-form/samples/dynamic-import-inline-colouring/_expected/system/main1.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
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.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-only-reexports/_expected/amd/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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
new Promise(function (resolve, reject) { require(['./generated-chunk'], resolve, reject) }).then(({ value }) => console.log(value)); | ||
new Promise(function (resolve, reject) { require(['./generated-dynamic'], resolve, reject) }).then(({ value }) => console.log(value)); | ||
|
||
}); |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-only-reexports/_expected/cjs/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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
'use strict'; | ||
|
||
Promise.resolve(require('./generated-chunk.js')).then(({ value }) => console.log(value)); | ||
Promise.resolve(require('./generated-dynamic.js')).then(({ value }) => console.log(value)); |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-only-reexports/_expected/es/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 |
---|---|---|
@@ -1 +1 @@ | ||
import('./generated-chunk.js').then(({ value }) => console.log(value)); | ||
import('./generated-dynamic.js').then(({ value }) => console.log(value)); |
File renamed without changes.
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
4 changes: 2 additions & 2 deletions
4
...orted-2/_expected/amd/generated-chunk2.js → ...mported-2/_expected/amd/generated-dep1.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
define(['exports', './generated-chunk'], function (exports, dep1_js) { 'use strict'; | ||
define(['exports', './generated-chunk'], function (exports, dep1) { 'use strict'; | ||
|
||
|
||
|
||
exports.bar = dep1_js.bar; | ||
exports.bar = dep1.bar; | ||
|
||
}); |
4 changes: 2 additions & 2 deletions
4
test/chunking-form/samples/dynamic-import-statically-imported-2/_expected/amd/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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
define(['./generated-chunk'], function (dep1_js) { 'use strict'; | ||
define(['./generated-chunk'], function (dep1) { 'use strict'; | ||
|
||
console.log(dep1_js.foo(), dep1_js.bar()); | ||
console.log(dep1.foo(), dep1.bar()); | ||
|
||
}); |
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/dynamic-import-statically-imported-2/_expected/amd/main2.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
new Promise(function (resolve, reject) { require(['./generated-chunk2'], resolve, reject) }).then(({ bar }) => console.log(bar())); | ||
new Promise(function (resolve, reject) { require(['./generated-dep1'], resolve, reject) }).then(({ bar }) => console.log(bar())); | ||
|
||
}); |
7 changes: 0 additions & 7 deletions
7
...nking-form/samples/dynamic-import-statically-imported-2/_expected/cjs/generated-chunk2.js
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...hunking-form/samples/dynamic-import-statically-imported-2/_expected/cjs/generated-dep1.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,7 @@ | ||
'use strict'; | ||
|
||
var dep1 = require('./generated-chunk.js'); | ||
|
||
|
||
|
||
exports.bar = dep1.bar; |
Oops, something went wrong.