-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and improve default export alias logic (#3521)
* Create failing test * Improve default export short-cut handling * Improve names * Improve coverage
- Loading branch information
1 parent
8db16bd
commit e4f4d6a
Showing
114 changed files
with
370 additions
and
252 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
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
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
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
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/chunk-namespace-boundary/_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
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
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
4 changes: 2 additions & 2 deletions
4
test/chunking-form/samples/chunk-namespace-boundary/_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,8 +1,8 @@ | ||
import { c as commonjsGlobal, d } from './generated-shared.js'; | ||
import { c as commonjsGlobal, s as shared } from './generated-shared.js'; | ||
|
||
commonjsGlobal.fn = d => d + 1; | ||
var cjs = commonjsGlobal.fn; | ||
|
||
var main1 = d.map(cjs); | ||
var main1 = shared.map(cjs); | ||
|
||
export default main1; |
4 changes: 2 additions & 2 deletions
4
test/chunking-form/samples/chunk-namespace-boundary/_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,5 +1,5 @@ | ||
import { d } from './generated-shared.js'; | ||
import { s as shared } from './generated-shared.js'; | ||
|
||
var main2 = d.map(d => d + 2); | ||
var main2 = shared.map(d => d + 2); | ||
|
||
export default main2; |
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/chunk-namespace-boundary/_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
6 changes: 3 additions & 3 deletions
6
test/chunking-form/samples/chunk-namespace-boundary/_expected/system/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
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ define(['exports'], function (exports) { 'use strict'; | |
|
||
const foo = {}; | ||
|
||
exports.bar = foo; | ||
exports.foo = foo; | ||
|
||
}); |
4 changes: 2 additions & 2 deletions
4
.../chunking-form/samples/deduplicate-imports-referencing-originals-2/_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(['./generated-proxy2'], function (proxy2) { 'use strict'; | ||
define(['./generated-foo'], function (foo) { 'use strict'; | ||
|
||
console.log(proxy2.bar, proxy2.bar); | ||
console.log(foo.foo, foo.foo); | ||
|
||
}); |
4 changes: 2 additions & 2 deletions
4
.../chunking-form/samples/deduplicate-imports-referencing-originals-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(['./generated-proxy2'], function (proxy2) { 'use strict'; | ||
define(['./generated-foo'], function (foo) { 'use strict'; | ||
|
||
console.log(proxy2.bar, proxy2.bar); | ||
console.log(foo.foo, foo.foo); | ||
|
||
}); |
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 |
---|---|---|
|
@@ -2,5 +2,4 @@ | |
|
||
const foo = {}; | ||
|
||
exports.bar = foo; | ||
exports.foo = foo; |
4 changes: 2 additions & 2 deletions
4
.../chunking-form/samples/deduplicate-imports-referencing-originals-2/_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'; | ||
|
||
var proxy2 = require('./generated-proxy2.js'); | ||
var foo = require('./generated-foo.js'); | ||
|
||
console.log(proxy2.bar, proxy2.bar); | ||
console.log(foo.foo, foo.foo); |
4 changes: 2 additions & 2 deletions
4
.../chunking-form/samples/deduplicate-imports-referencing-originals-2/_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 proxy2 = require('./generated-proxy2.js'); | ||
var foo = require('./generated-foo.js'); | ||
|
||
console.log(proxy2.bar, proxy2.bar); | ||
console.log(foo.foo, foo.foo); |
3 changes: 3 additions & 0 deletions
3
...ng-form/samples/deduplicate-imports-referencing-originals-2/_expected/es/generated-foo.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 = {}; | ||
|
||
export { foo as f }; |
3 changes: 0 additions & 3 deletions
3
...form/samples/deduplicate-imports-referencing-originals-2/_expected/es/generated-proxy2.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.