Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix SystemJS default variable conflict
- Loading branch information
1 parent
6a974a7
commit 4b7173f
Showing
15 changed files
with
80 additions
and
9 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
7 changes: 7 additions & 0 deletions
7
test/chunking-form/samples/deconflict-system-default-export-variable/_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,7 @@ | ||
module.exports = { | ||
description: 'deconflicts SystemJS default export variable with namespace imports', | ||
options: { | ||
external: 'external', | ||
output: { preserveModules: true } | ||
} | ||
}; |
7 changes: 7 additions & 0 deletions
7
test/chunking-form/samples/deconflict-system-default-export-variable/_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,7 @@ | ||
define(['./other'], function (other) { 'use strict'; | ||
|
||
var main = other + "extended"; | ||
|
||
return main; | ||
|
||
}); |
9 changes: 9 additions & 0 deletions
9
test/chunking-form/samples/deconflict-system-default-export-variable/_expected/amd/other.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 = 'bar'; | ||
|
||
exports.foo = foo; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
7 changes: 7 additions & 0 deletions
7
test/chunking-form/samples/deconflict-system-default-export-variable/_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'; | ||
|
||
var other = require('./other.js'); | ||
|
||
var main = other + "extended"; | ||
|
||
module.exports = main; |
7 changes: 7 additions & 0 deletions
7
test/chunking-form/samples/deconflict-system-default-export-variable/_expected/cjs/other.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 = 'bar'; | ||
|
||
exports.foo = foo; |
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/deconflict-system-default-export-variable/_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,5 @@ | ||
import * as other from './other.js'; | ||
|
||
var main = other + "extended"; | ||
|
||
export default main; |
3 changes: 3 additions & 0 deletions
3
test/chunking-form/samples/deconflict-system-default-export-variable/_expected/es/other.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 = 'bar'; | ||
|
||
export { foo }; |
14 changes: 14 additions & 0 deletions
14
.../chunking-form/samples/deconflict-system-default-export-variable/_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,14 @@ | ||
System.register(['./other.js'], function (exports) { | ||
'use strict'; | ||
var other; | ||
return { | ||
setters: [function (module) { | ||
other = module; | ||
}], | ||
execute: function () { | ||
|
||
var main = exports('default', other + "extended"); | ||
|
||
} | ||
}; | ||
}); |
10 changes: 10 additions & 0 deletions
10
...chunking-form/samples/deconflict-system-default-export-variable/_expected/system/other.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', 'bar'); | ||
|
||
} | ||
}; | ||
}); |
3 changes: 3 additions & 0 deletions
3
test/chunking-form/samples/deconflict-system-default-export-variable/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 @@ | ||
import * as main from './other.js'; | ||
|
||
export default main + "extended"; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/deconflict-system-default-export-variable/other.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 = 'bar' |
6 changes: 3 additions & 3 deletions
6
...nking-form/samples/deprecated/preserve-modules-dynamic-namespace/_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
6 changes: 3 additions & 3 deletions
6
test/chunking-form/samples/preserve-modules-dynamic-namespace/_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
Empty file.