Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle dynamic imports declared in dynamically imported files (
- Loading branch information
1 parent
de89274
commit a7eb784
Showing
32 changed files
with
155 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
description: 'handles dynamic imports containing dynamic imports', | ||
options: { | ||
input: 'main' | ||
} | ||
}; |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/nested-dynamic-imports/_expected/amd/generated-chunk.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,6 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
new Promise(function (resolve, reject) { require(['./generated-chunk2.js'], resolve, reject) }); | ||
console.log('dynamic1'); | ||
|
||
}); |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/nested-dynamic-imports/_expected/amd/generated-chunk2.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,6 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
new Promise(function (resolve, reject) { require(['./generated-chunk3.js'], resolve, reject) }); | ||
console.log('dynamic2'); | ||
|
||
}); |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/nested-dynamic-imports/_expected/amd/generated-chunk3.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,6 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
new Promise(function (resolve, reject) { require(['./generated-chunk4.js'], resolve, reject) }); | ||
console.log('dynamic3'); | ||
|
||
}); |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/nested-dynamic-imports/_expected/amd/generated-chunk4.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,6 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
new Promise(function (resolve, reject) { require(['./generated-chunk5.js'], resolve, reject) }); | ||
console.log('dynamic4'); | ||
|
||
}); |
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/nested-dynamic-imports/_expected/amd/generated-chunk5.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,5 @@ | ||
define(function () { 'use strict'; | ||
|
||
console.log('dynamic5'); | ||
|
||
}); |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/nested-dynamic-imports/_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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
new Promise(function (resolve, reject) { require(['./generated-chunk.js'], resolve, reject) }); | ||
console.log('main'); | ||
|
||
}); |
4 changes: 4 additions & 0 deletions
4
test/chunking-form/samples/nested-dynamic-imports/_expected/cjs/generated-chunk.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'; | ||
|
||
Promise.resolve(require('./generated-chunk2.js')); | ||
console.log('dynamic1'); |
4 changes: 4 additions & 0 deletions
4
test/chunking-form/samples/nested-dynamic-imports/_expected/cjs/generated-chunk2.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'; | ||
|
||
Promise.resolve(require('./generated-chunk3.js')); | ||
console.log('dynamic2'); |
4 changes: 4 additions & 0 deletions
4
test/chunking-form/samples/nested-dynamic-imports/_expected/cjs/generated-chunk3.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'; | ||
|
||
Promise.resolve(require('./generated-chunk4.js')); | ||
console.log('dynamic3'); |
4 changes: 4 additions & 0 deletions
4
test/chunking-form/samples/nested-dynamic-imports/_expected/cjs/generated-chunk4.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'; | ||
|
||
Promise.resolve(require('./generated-chunk5.js')); | ||
console.log('dynamic4'); |
3 changes: 3 additions & 0 deletions
3
test/chunking-form/samples/nested-dynamic-imports/_expected/cjs/generated-chunk5.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 @@ | ||
'use strict'; | ||
|
||
console.log('dynamic5'); |
4 changes: 4 additions & 0 deletions
4
test/chunking-form/samples/nested-dynamic-imports/_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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
'use strict'; | ||
|
||
Promise.resolve(require('./generated-chunk.js')); | ||
console.log('main'); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/nested-dynamic-imports/_expected/es/generated-chunk.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('./generated-chunk2.js'); | ||
console.log('dynamic1'); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/nested-dynamic-imports/_expected/es/generated-chunk2.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('./generated-chunk3.js'); | ||
console.log('dynamic2'); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/nested-dynamic-imports/_expected/es/generated-chunk3.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('./generated-chunk4.js'); | ||
console.log('dynamic3'); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/nested-dynamic-imports/_expected/es/generated-chunk4.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('./generated-chunk5.js'); | ||
console.log('dynamic4'); |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/nested-dynamic-imports/_expected/es/generated-chunk5.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 @@ | ||
console.log('dynamic5'); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/nested-dynamic-imports/_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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import('./generated-chunk.js'); | ||
console.log('main'); |
11 changes: 11 additions & 0 deletions
11
test/chunking-form/samples/nested-dynamic-imports/_expected/system/generated-chunk.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 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
module.import('./generated-chunk2.js'); | ||
console.log('dynamic1'); | ||
|
||
} | ||
}; | ||
}); |
11 changes: 11 additions & 0 deletions
11
test/chunking-form/samples/nested-dynamic-imports/_expected/system/generated-chunk2.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 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
module.import('./generated-chunk3.js'); | ||
console.log('dynamic2'); | ||
|
||
} | ||
}; | ||
}); |
11 changes: 11 additions & 0 deletions
11
test/chunking-form/samples/nested-dynamic-imports/_expected/system/generated-chunk3.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 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
module.import('./generated-chunk4.js'); | ||
console.log('dynamic3'); | ||
|
||
} | ||
}; | ||
}); |
11 changes: 11 additions & 0 deletions
11
test/chunking-form/samples/nested-dynamic-imports/_expected/system/generated-chunk4.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 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
module.import('./generated-chunk5.js'); | ||
console.log('dynamic4'); | ||
|
||
} | ||
}; | ||
}); |
10 changes: 10 additions & 0 deletions
10
test/chunking-form/samples/nested-dynamic-imports/_expected/system/generated-chunk5.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,10 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
console.log('dynamic5'); | ||
|
||
} | ||
}; | ||
}); |
11 changes: 11 additions & 0 deletions
11
test/chunking-form/samples/nested-dynamic-imports/_expected/system/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,11 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
module.import('./generated-chunk.js'); | ||
console.log('main'); | ||
|
||
} | ||
}; | ||
}); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/nested-dynamic-imports/dynamic1.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('./dynamic2.js'); | ||
console.log('dynamic1'); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/nested-dynamic-imports/dynamic2.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('./dynamic3.js'); | ||
console.log('dynamic2'); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/nested-dynamic-imports/dynamic3.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('./dynamic4.js'); | ||
console.log('dynamic3'); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/nested-dynamic-imports/dynamic4.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('./dynamic5.js'); | ||
console.log('dynamic4'); |
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 @@ | ||
console.log('dynamic5'); |
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('./dynamic1.js'); | ||
console.log('main'); |