Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13757 from webpack/feature/module-runtime-chunk
add support for import chunk loading with runtime chunk
- Loading branch information
Showing
7 changed files
with
213 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
MIT License http://www.opensource.org/licenses/mit-license.php | ||
*/ | ||
|
||
"use strict"; | ||
|
||
const RuntimeModule = require("../RuntimeModule"); | ||
|
||
class ExportWebpackRequireRuntimeModule extends RuntimeModule { | ||
constructor() { | ||
super("export webpack runtime", RuntimeModule.STAGE_ATTACH); | ||
} | ||
|
||
/** | ||
* @returns {boolean} true, if the runtime module should get it's own scope | ||
*/ | ||
shouldIsolate() { | ||
return false; | ||
} | ||
|
||
/** | ||
* @returns {string} runtime code | ||
*/ | ||
generate() { | ||
return "export default __webpack_require__;"; | ||
} | ||
} | ||
|
||
module.exports = ExportWebpackRequireRuntimeModule; |
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