Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Includes all dependencies from modules with no-treeshake (#4138)
- Loading branch information
1 parent
76dedd6
commit 01e2162
Showing
18 changed files
with
111 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
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
13 changes: 13 additions & 0 deletions
13
test/chunking-form/samples/no-treeshake-imports/_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,13 @@ | ||
module.exports = { | ||
description: 'includes all imports when setting moduleSideEffects to "no-treeshake"', | ||
options: { | ||
input: ['main1', 'main2'], | ||
plugins: { | ||
transform(code, id) { | ||
if (id.includes('main')) { | ||
return { moduleSideEffects: 'no-treeshake' }; | ||
} | ||
} | ||
} | ||
} | ||
}; |
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/no-treeshake-imports/_expected/amd/generated-empty.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'; | ||
|
||
|
||
|
||
}); |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/no-treeshake-imports/_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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
define(['./generated-empty'], function (empty) { 'use strict'; | ||
|
||
console.log('main1'); | ||
const unused = 1; | ||
|
||
}); |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/no-treeshake-imports/_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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
define(['./generated-empty'], function (empty) { 'use strict'; | ||
|
||
console.log('main2'); | ||
const unused = 2; | ||
|
||
}); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/no-treeshake-imports/_expected/cjs/generated-empty.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 @@ | ||
'use strict'; | ||
|
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/no-treeshake-imports/_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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
'use strict'; | ||
|
||
require('./generated-empty.js'); | ||
|
||
console.log('main1'); | ||
const unused = 1; |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/no-treeshake-imports/_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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
'use strict'; | ||
|
||
require('./generated-empty.js'); | ||
|
||
console.log('main2'); | ||
const unused = 2; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/no-treeshake-imports/_expected/es/generated-empty.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 changes: 4 additions & 0 deletions
4
test/chunking-form/samples/no-treeshake-imports/_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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import './generated-empty.js'; | ||
|
||
console.log('main1'); | ||
const unused = 1; |
4 changes: 4 additions & 0 deletions
4
test/chunking-form/samples/no-treeshake-imports/_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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import './generated-empty.js'; | ||
|
||
console.log('main2'); | ||
const unused = 2; |
10 changes: 10 additions & 0 deletions
10
test/chunking-form/samples/no-treeshake-imports/_expected/system/generated-empty.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 () { | ||
|
||
|
||
|
||
} | ||
}; | ||
}); |
12 changes: 12 additions & 0 deletions
12
test/chunking-form/samples/no-treeshake-imports/_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
System.register(['./generated-empty.js'], function () { | ||
'use strict'; | ||
return { | ||
setters: [function () {}], | ||
execute: function () { | ||
|
||
console.log('main1'); | ||
const unused = 1; | ||
|
||
} | ||
}; | ||
}); |
12 changes: 12 additions & 0 deletions
12
test/chunking-form/samples/no-treeshake-imports/_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
System.register(['./generated-empty.js'], function () { | ||
'use strict'; | ||
return { | ||
setters: [function () {}], | ||
execute: function () { | ||
|
||
console.log('main2'); | ||
const unused = 2; | ||
|
||
} | ||
}; | ||
}); |
Empty file.
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 './empty'; | ||
|
||
console.log('main1'); | ||
const unused = 1; |
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 './empty'; | ||
|
||
console.log('main2'); | ||
const unused = 2; |