-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of namespace reexports when preserving modules
- Loading branch information
1 parent
1243370
commit 22283f4
Showing
18 changed files
with
91 additions
and
0 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
8 changes: 8 additions & 0 deletions
8
test/chunking-form/samples/preserve-modules-namespace-reexport-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,8 @@ | ||
module.exports = { | ||
description: 'handles doing a namespace reexport of a reexport', | ||
options: { | ||
output: { | ||
preserveModules: true | ||
} | ||
} | ||
}; |
7 changes: 7 additions & 0 deletions
7
test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_expected/amd/dep.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'], (function (exports) { 'use strict'; | ||
|
||
const value = 'foo'; | ||
|
||
exports.value = value; | ||
|
||
})); |
5 changes: 5 additions & 0 deletions
5
.../chunking-form/samples/preserve-modules-namespace-reexport-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,5 @@ | ||
define(['./reexport', './dep'], (function (reexport, dep) { 'use strict'; | ||
|
||
console.log(dep.value); | ||
|
||
})); |
5 changes: 5 additions & 0 deletions
5
...nking-form/samples/preserve-modules-namespace-reexport-reexport/_expected/amd/reexport.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('reexport'); | ||
|
||
})); |
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_expected/cjs/dep.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 @@ | ||
'use strict'; | ||
|
||
const value = 'foo'; | ||
|
||
exports.value = value; |
6 changes: 6 additions & 0 deletions
6
.../chunking-form/samples/preserve-modules-namespace-reexport-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,6 @@ | ||
'use strict'; | ||
|
||
require('./reexport.js'); | ||
var dep = require('./dep.js'); | ||
|
||
console.log(dep.value); |
3 changes: 3 additions & 0 deletions
3
...nking-form/samples/preserve-modules-namespace-reexport-reexport/_expected/cjs/reexport.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('reexport'); |
3 changes: 3 additions & 0 deletions
3
test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_expected/es/dep.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 value = 'foo'; | ||
|
||
export { value }; |
4 changes: 4 additions & 0 deletions
4
test/chunking-form/samples/preserve-modules-namespace-reexport-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,4 @@ | ||
import './reexport.js'; | ||
import { value } from './dep.js'; | ||
|
||
console.log(value); |
1 change: 1 addition & 0 deletions
1
...unking-form/samples/preserve-modules-namespace-reexport-reexport/_expected/es/reexport.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('reexport'); |
10 changes: 10 additions & 0 deletions
10
...hunking-form/samples/preserve-modules-namespace-reexport-reexport/_expected/system/dep.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 value = exports('value', 'foo'); | ||
|
||
}) | ||
}; | ||
})); |
14 changes: 14 additions & 0 deletions
14
...unking-form/samples/preserve-modules-namespace-reexport-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,14 @@ | ||
System.register(['./reexport.js', './dep.js'], (function () { | ||
'use strict'; | ||
var value; | ||
return { | ||
setters: [null, function (module) { | ||
value = module.value; | ||
}], | ||
execute: (function () { | ||
|
||
console.log(value); | ||
|
||
}) | ||
}; | ||
})); |
10 changes: 10 additions & 0 deletions
10
...ng-form/samples/preserve-modules-namespace-reexport-reexport/_expected/system/reexport.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 () { | ||
'use strict'; | ||
return { | ||
execute: (function () { | ||
|
||
console.log('reexport'); | ||
|
||
}) | ||
}; | ||
})); |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/dep.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 value = 'foo'; |
3 changes: 3 additions & 0 deletions
3
test/chunking-form/samples/preserve-modules-namespace-reexport-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,3 @@ | ||
import { value } from './reexport2'; | ||
|
||
console.log(value); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/reexport.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 @@ | ||
export { value } from './dep.js'; | ||
console.log('reexport'); |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/reexport2.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 './reexport.js'; |