Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include all relevant modules to generate reexports for implicit depen…
…dencies (#3688)
- Loading branch information
1 parent
21cc03d
commit 9f84284
Showing
33 changed files
with
202 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
20 changes: 20 additions & 0 deletions
20
test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/_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,20 @@ | ||
module.exports = { | ||
description: 'handles shared dependencies between implicit chunks without side-effects', | ||
options: { | ||
plugins: { | ||
name: 'test-plugin', | ||
buildStart() { | ||
this.emitFile({ | ||
type: 'chunk', | ||
id: 'core.js', | ||
implicitlyLoadedAfterOneOf: ['main'] | ||
}); | ||
this.emitFile({ | ||
type: 'chunk', | ||
id: 'button.js', | ||
implicitlyLoadedAfterOneOf: ['main'] | ||
}); | ||
} | ||
} | ||
} | ||
}; |
7 changes: 7 additions & 0 deletions
7
.../implicit-dependencies/shared-dependency-no-side-effect/_expected/amd/generated-button.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 @@ | ||
define(['exports', './main'], function (exports, main) { 'use strict'; | ||
|
||
const bar = main.foo + 'bar'; | ||
|
||
exports.bar = bar; | ||
|
||
}); |
7 changes: 7 additions & 0 deletions
7
...es/implicit-dependencies/shared-dependency-no-side-effect/_expected/amd/generated-core.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 @@ | ||
define(['exports', './main'], function (exports, main) { 'use strict'; | ||
|
||
|
||
|
||
exports.foo = main.foo; | ||
|
||
}); |
9 changes: 9 additions & 0 deletions
9
...form/samples/implicit-dependencies/shared-dependency-no-side-effect/_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,9 @@ | ||
define(['exports'], function (exports) { 'use strict'; | ||
|
||
const foo = 'foo'; | ||
|
||
exports.foo = foo; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
7 changes: 7 additions & 0 deletions
7
.../implicit-dependencies/shared-dependency-no-side-effect/_expected/cjs/generated-button.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 main = require('./main.js'); | ||
|
||
const bar = main.foo + 'bar'; | ||
|
||
exports.bar = bar; |
7 changes: 7 additions & 0 deletions
7
...es/implicit-dependencies/shared-dependency-no-side-effect/_expected/cjs/generated-core.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 main = require('./main.js'); | ||
|
||
|
||
|
||
exports.foo = main.foo; |
7 changes: 7 additions & 0 deletions
7
...form/samples/implicit-dependencies/shared-dependency-no-side-effect/_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,7 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
const foo = 'foo'; | ||
|
||
exports.foo = foo; |
5 changes: 5 additions & 0 deletions
5
...s/implicit-dependencies/shared-dependency-no-side-effect/_expected/es/generated-button.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 @@ | ||
import { foo } from './main.js'; | ||
|
||
const bar = foo + 'bar'; | ||
|
||
export { bar }; |
1 change: 1 addition & 0 deletions
1
...les/implicit-dependencies/shared-dependency-no-side-effect/_expected/es/generated-core.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 { foo } from './main.js'; |
3 changes: 3 additions & 0 deletions
3
...-form/samples/implicit-dependencies/shared-dependency-no-side-effect/_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,3 @@ | ||
const foo = 'foo'; | ||
|
||
export { foo }; |
14 changes: 14 additions & 0 deletions
14
...plicit-dependencies/shared-dependency-no-side-effect/_expected/system/generated-button.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,14 @@ | ||
System.register(['./main.js'], function (exports) { | ||
'use strict'; | ||
var foo; | ||
return { | ||
setters: [function (module) { | ||
foo = module.foo; | ||
}], | ||
execute: function () { | ||
|
||
const bar = exports('bar', foo + 'bar'); | ||
|
||
} | ||
}; | ||
}); |
13 changes: 13 additions & 0 deletions
13
...implicit-dependencies/shared-dependency-no-side-effect/_expected/system/generated-core.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,13 @@ | ||
System.register(['./main.js'], function (exports) { | ||
'use strict'; | ||
return { | ||
setters: [function (module) { | ||
exports('foo', module.foo); | ||
}], | ||
execute: function () { | ||
|
||
|
||
|
||
} | ||
}; | ||
}); |
10 changes: 10 additions & 0 deletions
10
...m/samples/implicit-dependencies/shared-dependency-no-side-effect/_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,10 @@ | ||
System.register([], function (exports) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
const foo = exports('foo', 'foo'); | ||
|
||
} | ||
}; | ||
}); |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/button.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 { bar } from './shared/button'; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/core.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 { foo } from './shared/core.js'; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/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 { foo } from './shared/core.js'; |
2 changes: 2 additions & 0 deletions
2
...king-form/samples/implicit-dependencies/shared-dependency-no-side-effect/shared/button.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 { foo } from './core.js'; | ||
export const bar = foo + 'bar'; |
1 change: 1 addition & 0 deletions
1
...unking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/shared/core.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 const foo = 'foo'; |
15 changes: 15 additions & 0 deletions
15
test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/_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,15 @@ | ||
module.exports = { | ||
description: 'handles shared dependencies when there are only reexports', | ||
options: { | ||
plugins: { | ||
name: 'test-plugin', | ||
buildStart() { | ||
this.emitFile({ | ||
type: 'chunk', | ||
id: 'implicit.js', | ||
implicitlyLoadedAfterOneOf: ['main'] | ||
}); | ||
} | ||
} | ||
} | ||
}; |
7 changes: 7 additions & 0 deletions
7
...ples/implicit-dependencies/shared-dependency-reexport/_expected/amd/generated-implicit.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 @@ | ||
define(['exports', './main'], function (exports, main) { 'use strict'; | ||
|
||
|
||
|
||
exports.foo = main.foo; | ||
|
||
}); |
9 changes: 9 additions & 0 deletions
9
...nking-form/samples/implicit-dependencies/shared-dependency-reexport/_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,9 @@ | ||
define(['exports'], function (exports) { 'use strict'; | ||
|
||
const foo = 'shared'; | ||
|
||
exports.foo = foo; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
7 changes: 7 additions & 0 deletions
7
...ples/implicit-dependencies/shared-dependency-reexport/_expected/cjs/generated-implicit.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 main = require('./main.js'); | ||
|
||
|
||
|
||
exports.foo = main.foo; |
7 changes: 7 additions & 0 deletions
7
...nking-form/samples/implicit-dependencies/shared-dependency-reexport/_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,7 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
const foo = 'shared'; | ||
|
||
exports.foo = foo; |
1 change: 1 addition & 0 deletions
1
...mples/implicit-dependencies/shared-dependency-reexport/_expected/es/generated-implicit.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 { foo } from './main.js'; |
3 changes: 3 additions & 0 deletions
3
...unking-form/samples/implicit-dependencies/shared-dependency-reexport/_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,3 @@ | ||
const foo = 'shared'; | ||
|
||
export { foo }; |
13 changes: 13 additions & 0 deletions
13
...s/implicit-dependencies/shared-dependency-reexport/_expected/system/generated-implicit.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,13 @@ | ||
System.register(['./main.js'], function (exports) { | ||
'use strict'; | ||
return { | ||
setters: [function (module) { | ||
exports('foo', module.foo); | ||
}], | ||
execute: function () { | ||
|
||
|
||
|
||
} | ||
}; | ||
}); |
10 changes: 10 additions & 0 deletions
10
...ng-form/samples/implicit-dependencies/shared-dependency-reexport/_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,10 @@ | ||
System.register([], function (exports) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
const foo = exports('foo', 'shared'); | ||
|
||
} | ||
}; | ||
}); |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/implicit.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 * from './shared.js'; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/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 * from './shared.js'; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/shared.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 const foo = 'shared'; |