Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd20782
commit dd4625a
Showing
27 changed files
with
158 additions
and
27 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
7 changes: 7 additions & 0 deletions
7
...king-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_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: | ||
'avoids empty imports if they do not have side-effects when preserving modules (#3359)', | ||
options: { | ||
preserveModules: true | ||
} | ||
}; |
9 changes: 9 additions & 0 deletions
9
...m/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/amd/a.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 a = 1; | ||
|
||
exports.a = a; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
9 changes: 9 additions & 0 deletions
9
...m/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/amd/b.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 b = 2; | ||
|
||
exports.b = b; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
5 changes: 5 additions & 0 deletions
5
...amples/side-effect-free-dependencies/avoid-imports-preserve-modules/_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(['./a', './one'], function (a, one) { 'use strict'; | ||
|
||
console.log(a.a + one.d); | ||
|
||
}); |
9 changes: 9 additions & 0 deletions
9
...samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/amd/one.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', './b'], function (exports, b) { 'use strict'; | ||
|
||
const d = b.b + 4; | ||
|
||
exports.d = d; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
7 changes: 7 additions & 0 deletions
7
...m/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/cjs/a.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 a = 1; | ||
|
||
exports.a = a; |
7 changes: 7 additions & 0 deletions
7
...m/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/cjs/b.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 b = 2; | ||
|
||
exports.b = b; |
6 changes: 6 additions & 0 deletions
6
...amples/side-effect-free-dependencies/avoid-imports-preserve-modules/_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'; | ||
|
||
var a = require('./a.js'); | ||
var one = require('./one.js'); | ||
|
||
console.log(a.a + one.d); |
9 changes: 9 additions & 0 deletions
9
...samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/cjs/one.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 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
var b = require('./b.js'); | ||
|
||
const d = b.b + 4; | ||
|
||
exports.d = d; |
3 changes: 3 additions & 0 deletions
3
...rm/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/es/a.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 a = 1; | ||
|
||
export { a }; |
3 changes: 3 additions & 0 deletions
3
...rm/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/es/b.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 b = 2; | ||
|
||
export { b }; |
4 changes: 4 additions & 0 deletions
4
...samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_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 { a } from './a.js'; | ||
import { d } from './one.js'; | ||
|
||
console.log(a + d); |
5 changes: 5 additions & 0 deletions
5
.../samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/es/one.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 { b } from './b.js'; | ||
|
||
const d = b + 4; | ||
|
||
export { d }; |
10 changes: 10 additions & 0 deletions
10
...amples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/system/a.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 a = exports('a', 1); | ||
|
||
} | ||
}; | ||
}); |
10 changes: 10 additions & 0 deletions
10
...amples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/system/b.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 b = exports('b', 2); | ||
|
||
} | ||
}; | ||
}); |
16 changes: 16 additions & 0 deletions
16
...les/side-effect-free-dependencies/avoid-imports-preserve-modules/_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,16 @@ | ||
System.register(['./a.js', './one.js'], function () { | ||
'use strict'; | ||
var a, d; | ||
return { | ||
setters: [function (module) { | ||
a = module.a; | ||
}, function (module) { | ||
d = module.d; | ||
}], | ||
execute: function () { | ||
|
||
console.log(a + d); | ||
|
||
} | ||
}; | ||
}); |
14 changes: 14 additions & 0 deletions
14
...ples/side-effect-free-dependencies/avoid-imports-preserve-modules/_expected/system/one.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(['./b.js'], function (exports) { | ||
'use strict'; | ||
var b; | ||
return { | ||
setters: [function (module) { | ||
b = module.b; | ||
}], | ||
execute: function () { | ||
|
||
const d = exports('d', b + 4); | ||
|
||
} | ||
}; | ||
}); |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/a.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 a = 1; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/b.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 b = 2; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/c.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 c = 3; |
3 changes: 3 additions & 0 deletions
3
...unking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/index.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 @@ | ||
export { a } from './a'; | ||
export { b } from './b'; | ||
export { c } from './c'; |
3 changes: 3 additions & 0 deletions
3
...hunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/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 { a } from './index'; | ||
import { d } from './one'; | ||
console.log(a + d); |
2 changes: 2 additions & 0 deletions
2
...chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/one.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 { b } from './index'; | ||
export const d = b + 4; |