Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Inline dynamic imports that are also imported statically and only use…
…d in a single chunk (#2295)
- Loading branch information
1 parent
e13b552
commit c3228cde9f4358ec08c349bef123b3289e33b8d3
Showing
11 changed files
with
88 additions
and
7 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
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
description: 'Dynamic import inlining for static colouring', | ||
options: { | ||
input: ['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
@@ -0,0 +1,13 @@ | ||
define(['require'], function (require) { 'use strict'; | ||
|
||
var foo = "FOO"; | ||
|
||
var foo$1 = /*#__PURE__*/Object.freeze({ | ||
default: foo | ||
}); | ||
|
||
var main = Promise.resolve().then(function () { return foo$1; }); | ||
|
||
return main; | ||
|
||
}); |
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
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
|
||
var foo = "FOO"; | ||
|
||
var foo$1 = /*#__PURE__*/Object.freeze({ | ||
default: foo | ||
}); | ||
|
||
var main = Promise.resolve().then(function () { return foo$1; }); | ||
|
||
module.exports = main; |
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
@@ -0,0 +1,9 @@ | ||
var foo = "FOO"; | ||
|
||
var foo$1 = /*#__PURE__*/Object.freeze({ | ||
default: foo | ||
}); | ||
|
||
var main = Promise.resolve().then(function () { return foo$1; }); | ||
|
||
export default main; |
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
@@ -0,0 +1,16 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
var foo = "FOO"; | ||
|
||
var foo$1 = /*#__PURE__*/Object.freeze({ | ||
default: foo | ||
}); | ||
|
||
var main = exports('default', Promise.resolve().then(function () { return foo$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
@@ -0,0 +1 @@ | ||
export default "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
@@ -0,0 +1,3 @@ | ||
import foo from "./foo.js"; | ||
|
||
export default import("./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
@@ -5,6 +5,6 @@ var foo$1 = /*#__PURE__*/Object.freeze({ | ||
}); | ||
|
||
const bar = 2; | ||
Promise.resolve().then(function () { return foo; }); | ||
Promise.resolve().then(function () { return foo$1; }); | ||
|
||
export { bar }; |