Merge branch 'master' into feat-rewrite-wasm

# Conflicts:
#	test/statsCases/aggressive-splitting-entry/expected.txt
#	test/statsCases/aggressive-splitting-on-demand/expected.txt
#	test/statsCases/chunks-development/expected.txt
#	test/statsCases/chunks/expected.txt
#	test/statsCases/import-context-filter/expected.txt
#	test/statsCases/import-weak/expected.txt
#	test/statsCases/limit-chunk-count-plugin/expected.txt
#	test/statsCases/module-assets/expected.txt
#	test/statsCases/named-chunks-plugin-async/expected.txt
#	test/statsCases/optimize-chunks/expected.txt
#	test/statsCases/preset-detailed/expected.txt
#	test/statsCases/preset-normal/expected.txt
#	test/statsCases/preset-verbose/expected.txt
#	test/statsCases/scope-hoisting-bailouts/expected.txt
#	test/statsCases/scope-hoisting-multi/expected.txt
#	yarn.lock
This commit is contained in:
Tobias Koppers 2018-04-27 15:39:12 +02:00
commit f876564b84
293 changed files with 4127 additions and 2438 deletions

View File

@ -43,7 +43,8 @@ module.exports = {
{
files: ["lib/**/*.runtime.js", "buildin/*.js", "hot/*.js"],
env: {
es6: false
es6: false,
browser: true
},
globals: {
Promise: false,
@ -51,6 +52,12 @@ module.exports = {
parserOptions: {
ecmaVersion: 5
}
},
{
files: ["test/**/*.js"],
env: {
mocha: true,
}
}
]
};

1
.gitignore vendored
View File

@ -10,3 +10,4 @@
*.log
.idea
.vscode
package-lock.json

View File

@ -1,3 +1,4 @@
instrumentation:
excludes:
- "**/*.runtime.js"
- ".github/*"

1
.npmrc Normal file
View File

@ -0,0 +1 @@
package-lock=false

View File

@ -11,17 +11,23 @@ Most of the time, if webpack is not working correctly for you it is a simple con
If you are still having difficulty after looking over your configuration carefully, please post
a question to [StackOverflow with the webpack tag](http://stackoverflow.com/tags/webpack). Questions
that include your webpack.config.js and relevant files are more likely to receive responses.
that include your webpack.config.js, relevant files, and the full error message are more likely to receive responses.
**If you have discovered a bug or have a feature suggestion, please [create an issue on GitHub](https://github.com/webpack/webpack/issues/new).**
Do you want to fix an issue? Look at the issues with a tag of [X5: work required (PR / Help Wanted)](https://github.com/webpack/webpack/labels/X5%3A%20work%20required%20%28PR%20%2F%20Help%20Wanted%29). Each issue should be tagged with a difficulty tag -
- D0: My First Commit (Contribution Difficulty)
- D1: Easy (Contribution Difficulty)
- D2: Medium (Contribution Difficulty)
- D3: Hard (Contribution Difficulty)
## Contributing to the webpack ecosystem
If you have created your own loader/plugin please include it on the relevant
documentation pages:
If you have created your own loader/plugin please include it on the relevant documentation pages:
[List of loaders](https://webpack.js.org/loaders/) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#loaders)
[List of plugins](https://webpack.js.org/plugins) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#webpack-plugins)
- [List of loaders](https://webpack.js.org/loaders/) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#loaders)
- [List of plugins](https://webpack.js.org/plugins) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#webpack-plugins)
## Setup
@ -43,7 +49,7 @@ Some things that will increase the chance that your pull request is accepted:
webpack is insanely feature rich and documentation is a huge time sink. We
greatly appreciate any time spent fixing typos or clarifying sections in the
documentation.
documentation. [See a list of issues with the documentation tag.](https://github.com/webpack/webpack/labels/documentation)
## Discussions

View File

@ -60,7 +60,7 @@ or packaging just about any resource or asset.
**TL;DR**
* Bundles [ES Modules](http://www.2ality.com/2014/09/es6-modules-final.html), [CommonJS](http://wiki.commonjs.org/) and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined).
* Bundles [ES Modules](http://www.2ality.com/2014/09/es6-modules-final.html), [CommonJS](http://wiki.commonjs.org/), and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined).
* Can create a single bundle or multiple chunks that are asynchronously loaded at runtime (to reduce initial loading time).
* Dependencies are resolved during compilation, reducing the runtime size.
* Loaders can preprocess files while compiling, e.g. TypeScript to JavaScript, Handlebars strings to compiled functions, images to Base64, etc.
@ -70,6 +70,11 @@ or packaging just about any resource or asset.
Check out webpack's quick [**Get Started**](https://webpack.js.org/get-started/) guide and the [other guides](https://webpack.js.org/guides/).
### Browser Compatibility
webpack supports all browsers that are [ES5-compliant](http://kangax.github.io/compat-table/es5/) (IE8 and below are not supported).
webpack also needs `Promise` for `import()` and `require.ensure()`. If you want to support older browsers, you will need to [load a polyfill](https://webpack.js.org/guides/shimming/) before using these expressions.
<h2 align="center">Concepts</h2>
### [Plugins](https://webpack.js.org/plugins/)
@ -324,18 +329,6 @@ If you have discovered a 🐜 or have a feature suggestion, feel free to create
<br>
<p>Founder of the core team</p>
</td>
<td align="center" valign="top">
<img width="150" height="150" src="https://github.com/bebraw.png?s=150">
<br>
<a href="https://github.com/bebraw">Juho Vepsäläinen</a>
<p>Documentation</p>
<br>
<p>Author</p>
<a href="https://leanpub.com/survivejs-webpack">
<img height="15" src="https://cloud.githubusercontent.com/assets/1365881/20286923/93e325c0-aac9-11e6-964d-cabe218c584c.png">
</a>
<br>
</td>
<td align="center" valign="top">
<img width="150" height="150" src="https://github.com/spacek33z.png?s=150">
<br>

9
SECURITY.md Normal file
View File

@ -0,0 +1,9 @@
# Reporting Security Issues
If you discover a security issue in webpack, please report it by sending an
email to [webpack@opencollective.com](mailto:webpack@opencollective.com).
This will allow us to assess the risk, and make a fix available before we add a
bug report to the GitHub repository.
Thanks for helping make webpack safe for everyone.

View File

@ -1,12 +1,22 @@
# Setup
Setup your local webpack repository
At webpack we use `yarn` to execute commands.
If you already have `yarn` installed, do: `yarn setup`. This will complete all required steps.
If not, do: `npm run setup`, the setup will also install `yarn` for you.
That's all.
## Setup manually
Setup your local webpack repository
```bash
git clone https://github.com/webpack/webpack.git
cd webpack
npm install -g yarn
yarn install
yarn
yarn link
yarn link webpack
```
@ -15,4 +25,4 @@ To run the entire test suite use:
```bash
yarn test
```
```

View File

@ -3,7 +3,8 @@ function runCommand(command, options) {
const cp = require("child_process");
return new Promise((resolve, reject) => {
const executedCommand = cp.spawn(command, options, {
stdio: "inherit"
stdio: "inherit",
shell: true
});
executedCommand.on("error", error => {
@ -43,7 +44,7 @@ if (!webpackCliInstalled) {
const commandToBeRun = `${packageManager} ${options.join(" ")}`;
const question = `Would you like to install webpack-cli? (That will run ${commandToBeRun}) `;
const question = `Would you like to install webpack-cli? (That will run ${commandToBeRun}) (yes/NO)`;
console.error("The CLI moved into a separate package: webpack-cli");
const questionInterface = readLine.createInterface({

View File

@ -1,7 +0,0 @@
{
"env": {
"node": true,
"es6": false,
"browser": true
}
}

53
declarations.d.ts vendored Normal file
View File

@ -0,0 +1,53 @@
declare module "*.json";
declare module "webpack-cli";
// Deprecated NodeJS API usages in Webpack
declare namespace NodeJS {
interface Process {
binding(internalModule: string): any;
}
}
// There are no typings for chrome-trace-event
declare module "chrome-trace-event" {
interface Event {
name: string;
id?: number;
cat: string[];
args?: Object;
}
export class Tracer {
constructor(options: { noStream: boolean });
pipe(stream: NodeJS.WritableStream): void;
instantEvent(event: Event): void;
counter: number;
trace: {
begin(event: Event): void;
end(event: Event): void;
};
}
}
/**
* Global variable declarations
* @todo Once this issue is resolved, remove these globals and add JSDoc onsite instead
* https://github.com/Microsoft/TypeScript/issues/15626
*/
declare const $hash$;
declare const $requestTimeout$;
declare const installedModules;
declare const $require$;
declare const hotDownloadManifest;
declare const hotDownloadUpdateChunk;
declare const hotDisposeChunk;
declare const modules;
declare const installedChunks;
declare const hotAddUpdateChunk;
declare const parentHotUpdateCallback;
declare const $hotChunkFilename$;
declare const $hotMainFilename$;
declare const WebAssembly;
declare const importScripts;
declare const $crossOriginLoading$;
declare const chunkId;

View File

@ -60,7 +60,7 @@ module.exports = {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.chunk.js 5.98 KiB 0 [emitted]
1.chunk.js 405 bytes 1 [emitted]
@ -108,11 +108,11 @@ chunk {4} pageA.bundle.js (pageA) 71 bytes >{0}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.chunk.js 173 bytes 0, 1 [emitted]
1.chunk.js 118 bytes 1 [emitted]
pageC.bundle.js 1.68 KiB 2 [emitted] pageC
pageC.bundle.js 1.67 KiB 2 [emitted] pageC
pageB.bundle.js 1.66 KiB 3 [emitted] pageB
pageA.bundle.js 1.66 KiB 4 [emitted] pageA
Entrypoint pageA = pageA.bundle.js

View File

@ -45,7 +45,7 @@ module.exports = {
<!-- inlined minimized file "runtime~main.[chunkhash].js" -->
<script>
!function(e){function r(r){for(var n,o,i=r[0],c=r[1],s=r[2],p=0,f=[];p<i.length;p++)o=i[p],u[o]&&f.push(u[o][0]),u[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);f.length;)f.shift()();return a.push.apply(a,s||[]),t()}function t(){for(var e,r=0;r<a.length;r++){for(var t=a[r],o=!0,i=1;i<t.length;i++){var c=t[i];0!==u[c]&&(o=!1)}o&&(a.splice(r--,1),e=n(n.s=t[0]))}return e}function n(r){if(o[r])return o[r].exports;var t=o[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var o={},u={2:0},a=[];n.e=function(e){var r=[],t=u[e];if(0!==t)if(t)r.push(t[2]);else{var o=new Promise(function(r,n){t=u[e]=[r,n]});r.push(t[2]=o);var a=document.getElementsByTagName("head")[0],i=document.createElement("script");i.charset="utf-8",i.timeout=12e4,n.nc&&i.setAttribute("nonce",n.nc),i.src=n.p+""+({}[e]||e)+".[chunkhash].js";var c=setTimeout(function(){s({type:"timeout",target:i})},12e4);i.onerror=i.onload=s;function s(r){i.onerror=i.onload=null,clearTimeout(c);var t=u[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src,a=new Error("Loading chunk "+e+" failed.\n("+n+": "+o+")");a.type=n,a.request=o,t[1](a)}u[e]=void 0}}a.appendChild(i)}return Promise.all(r)},n.m=e,n.c=o,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="dist/",n.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var s=0;s<i.length;s++)r(i[s]);var l=c;t()}([]);
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],s=r[2],p=0,f=[];p<i.length;p++)a=i[p],o[a]&&f.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);f.length;)f.shift()();return u.push.apply(u,s||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var c=t[i];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={2:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var u=document.getElementsByTagName("head")[0],i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=a.p+""+({}[e]||e)+".[chunkhash].js";var c=setTimeout(function(){s({type:"timeout",target:i})},12e4);function s(r){i.onerror=i.onload=null,clearTimeout(c);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src,a=new Error("Loading chunk "+e+" failed.\n("+n+": "+u+")");a.type=n,a.request=u,t[1](a)}o[e]=void 0}}i.onerror=i.onload=s,u.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},a.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="dist/",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var s=0;s<i.length;s++)r(i[s]);var l=c;t()}([]);
</script>
<script src="dist/main.[chunkhash].js"></script>
@ -63,7 +63,7 @@ module.exports = {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -168,7 +168,7 @@ module.exports = {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -273,8 +273,8 @@ module.exports = {
/***/ (function(module, exports, __webpack_require__) {
// some module
__webpack_require__.e(/*! import() */ 1).then(function() { var module = __webpack_require__(/*! ./async1 */ 1); return typeof module === "object" && module && module.__esModule ? module : { /* fake namespace object */ "default": module }; });
__webpack_require__.e(/*! import() */ 2).then(function() { var module = __webpack_require__(/*! ./async2 */ 2); return typeof module === "object" && module && module.__esModule ? module : { /* fake namespace object */ "default": module }; });
__webpack_require__.e(/*! import() */ 1).then(function() { var module = __webpack_require__(/*! ./async1 */ 1); return typeof module === "object" && module && module.__esModule ? module : Object.assign({/* fake namespace object */}, typeof module === "object" && module, { "default": module }); });
__webpack_require__.e(/*! import() */ 2).then(function() { var module = __webpack_require__(/*! ./async2 */ 2); return typeof module === "object" && module && module.__esModule ? module : Object.assign({/* fake namespace object */}, typeof module === "object" && module, { "default": module }); });
/***/ })
@ -287,16 +287,16 @@ __webpack_require__.e(/*! import() */ 2).then(function() { var module = __webpac
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
main.[chunkhash].js 768 bytes 0 [emitted] main
main.[chunkhash].js 877 bytes 0 [emitted] main
1.[chunkhash].js 270 bytes 1 [emitted]
2.[chunkhash].js 264 bytes 2 [emitted]
runtime~main.[chunkhash].js 7.49 KiB 3 [emitted] runtime~main
runtime~main.[chunkhash].js 7.48 KiB 3 [emitted] runtime~main
Entrypoint main = runtime~main.[chunkhash].js main.[chunkhash].js
chunk {0} main.[chunkhash].js (main) 58 bytes ={3}= >{1}< >{2}< [initial] [rendered]
chunk {0} main.[chunkhash].js (main) 55 bytes ={3}= >{1}< >{2}< [initial] [rendered]
> ./example main
[0] ./example.js 58 bytes {0} [built]
[0] ./example.js 55 bytes {0} [built]
single entry ./example main
chunk {1} 1.[chunkhash].js 29 bytes <{0}> <{3}> [rendered]
> ./async1 [0] ./example.js 2:0-18
@ -314,12 +314,12 @@ chunk {3} runtime~main.[chunkhash].js (runtime~main) 0 bytes ={0}= >{1}< >{2}
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.[chunkhash].js 77 bytes 0 [emitted]
1.[chunkhash].js 78 bytes 1 [emitted]
runtime~main.[chunkhash].js 1.76 KiB 2 [emitted] runtime~main
main.[chunkhash].js 269 bytes 3 [emitted] main
main.[chunkhash].js 349 bytes 3 [emitted] main
Entrypoint main = runtime~main.[chunkhash].js main.[chunkhash].js
chunk {0} 0.[chunkhash].js 29 bytes <{2}> <{3}> [rendered]
> ./async2 [0] ./example.js 3:0-18
@ -331,8 +331,8 @@ chunk {1} 1.[chunkhash].js 29 bytes <{2}> <{3}> [rendered]
import() ./async1 [0] ./example.js 2:0-18
chunk {2} runtime~main.[chunkhash].js (runtime~main) 0 bytes ={3}= >{0}< >{1}< [entry] [rendered]
> ./example main
chunk {3} main.[chunkhash].js (main) 58 bytes ={2}= >{0}< >{1}< [initial] [rendered]
chunk {3} main.[chunkhash].js (main) 55 bytes ={2}= >{0}< >{1}< [initial] [rendered]
> ./example main
[0] ./example.js 58 bytes {3} [built]
[0] ./example.js 55 bytes {3} [built]
single entry ./example main
```

View File

@ -23,7 +23,7 @@ getTemplate("b", function(b) {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -108,7 +108,7 @@ getTemplate("b", function(b) {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -311,7 +311,7 @@ module.exports = function() {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 1.86 KiB 0 [emitted]
output.js 7.19 KiB 1 [emitted] main
@ -339,7 +339,7 @@ chunk {1} output.js (main) 261 bytes >{0}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 627 bytes 0 [emitted]
output.js 1.75 KiB 1 [emitted] main

View File

@ -23,7 +23,7 @@ getTemplate("b", function(b) {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -108,7 +108,7 @@ getTemplate("b", function(b) {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -311,7 +311,7 @@ module.exports = function() {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 1.86 KiB 0 [emitted]
output.js 7.13 KiB 1 [emitted] main
@ -339,7 +339,7 @@ chunk {1} output.js (main) 276 bytes >{0}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 627 bytes 0 [emitted]
output.js 1.73 KiB 1 [emitted] main

View File

@ -26,7 +26,7 @@ module.exports = "It works";
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -111,7 +111,7 @@ module.exports = "It works";
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -266,7 +266,7 @@ module.exports = "It works";
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 257 bytes 0 [emitted]
output.js 7.56 KiB 1 [emitted] main
@ -287,7 +287,7 @@ chunk {1} output.js (main) 378 bytes >{0}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 98 bytes 0 [emitted]
output.js 1.79 KiB 1 [emitted] main

View File

@ -34,7 +34,7 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -119,7 +119,7 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -248,7 +248,7 @@ function webpackAsyncContext(req) {
}
return __webpack_require__.e(ids[1]).then(function() {
var module = __webpack_require__(ids[0]);
return (typeof module === "object" && module && module.__esModule ? module : /* fake namespace object */ { "default": module });
return (typeof module === "object" && module && module.__esModule ? module : Object.assign({/* fake namespace object */}, typeof module === "object" && module, { "default": module }));
});
}
webpackAsyncContext.keys = function webpackAsyncContextKeys() {
@ -281,7 +281,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var a__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(a__WEBPACK_IMPORTED_MODULE_0__);
__webpack_require__.e(/*! import() */ 2).then(function() { var module = __webpack_require__(/*! b */ 5); return typeof module === "object" && module && module.__esModule ? module : { /* fake namespace object */ "default": module }; }).then(function(b) {
__webpack_require__.e(/*! import() */ 2).then(function() { var module = __webpack_require__(/*! b */ 5); return typeof module === "object" && module && module.__esModule ? module : Object.assign({/* fake namespace object */}, typeof module === "object" && module, { "default": module }); }).then(function(b) {
console.log("b loaded", b);
})
@ -305,12 +305,12 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 275 bytes 0 [emitted]
1.output.js 284 bytes 1 [emitted]
2.output.js 270 bytes 2 [emitted]
output.js 8.74 KiB 3 [emitted] main
output.js 8.84 KiB 3 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 13 bytes <{3}> [rendered]
> ./2 [2] ./node_modules/c lazy ^\.\/.*$ namespace object ./2
@ -337,12 +337,12 @@ chunk {3} output.js (main) 427 bytes >{0}< >{1}< >{2}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 76 bytes 0 [emitted]
1.output.js 77 bytes 1 [emitted]
2.output.js 78 bytes 2 [emitted]
output.js 2.25 KiB 3 [emitted] main
output.js 2.33 KiB 3 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 13 bytes <{3}> [rendered]
> ./2 [2] ./node_modules/c lazy ^\.\/.*$ namespace object ./2

View File

@ -52,7 +52,7 @@ export default foo;
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -137,7 +137,7 @@ export default foo;
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -321,39 +321,39 @@ getTemplate("baz.noimport");
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 436 bytes 0 [emitted]
1.output.js 445 bytes 1 [emitted]
2.output.js 439 bytes 2 [emitted]
output.js 8.22 KiB 3 [emitted] main
0.output.js 433 bytes 0 [emitted]
1.output.js 442 bytes 1 [emitted]
2.output.js 436 bytes 2 [emitted]
output.js 8.21 KiB 3 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 41 bytes <{3}> [rendered]
chunk {0} 0.output.js 38 bytes <{3}> [rendered]
> ./foo [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
> ./foo.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
[0] ./templates/foo.js 41 bytes {0} [optional] [built]
[0] ./templates/foo.js 38 bytes {0} [optional] [built]
[exports: default]
context element ./foo.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
context element ./foo [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
chunk {1} 1.output.js 41 bytes <{3}> [rendered]
chunk {1} 1.output.js 38 bytes <{3}> [rendered]
> ./baz [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
> ./baz.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
[1] ./templates/baz.js 41 bytes {1} [optional] [built]
[1] ./templates/baz.js 38 bytes {1} [optional] [built]
[exports: default]
context element ./baz.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
context element ./baz [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
chunk {2} 2.output.js 41 bytes <{3}> [rendered]
chunk {2} 2.output.js 38 bytes <{3}> [rendered]
> ./bar [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
> ./bar.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
[2] ./templates/bar.js 41 bytes {2} [optional] [built]
[2] ./templates/bar.js 38 bytes {2} [optional] [built]
[exports: default]
context element ./bar.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
context element ./bar [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
chunk {3} output.js (main) 618 bytes >{0}< >{1}< >{2}< [entry] [rendered]
chunk {3} output.js (main) 597 bytes >{0}< >{1}< >{2}< [entry] [rendered]
> .\example.js main
[3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object 160 bytes {3} [optional] [built]
import() context lazy ./templates [4] ./example.js 3:23-7:3
[4] ./example.js 458 bytes {3} [built]
[4] ./example.js 437 bytes {3} [built]
single entry .\example.js main
```
@ -361,38 +361,38 @@ chunk {3} output.js (main) 618 bytes >{0}< >{1}< >{2}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 113 bytes 0 [emitted]
1.output.js 114 bytes 1 [emitted]
2.output.js 115 bytes 2 [emitted]
output.js 2.13 KiB 3 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 41 bytes <{3}> [rendered]
chunk {0} 0.output.js 38 bytes <{3}> [rendered]
> ./foo [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
> ./foo.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
[0] ./templates/foo.js 41 bytes {0} [optional] [built]
[0] ./templates/foo.js 38 bytes {0} [optional] [built]
[exports: default]
context element ./foo.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
context element ./foo [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
chunk {1} 1.output.js 41 bytes <{3}> [rendered]
chunk {1} 1.output.js 38 bytes <{3}> [rendered]
> ./baz [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
> ./baz.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
[1] ./templates/baz.js 41 bytes {1} [optional] [built]
[1] ./templates/baz.js 38 bytes {1} [optional] [built]
[exports: default]
context element ./baz.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
context element ./baz [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
chunk {2} 2.output.js 41 bytes <{3}> [rendered]
chunk {2} 2.output.js 38 bytes <{3}> [rendered]
> ./bar [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
> ./bar.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
[2] ./templates/bar.js 41 bytes {2} [optional] [built]
[2] ./templates/bar.js 38 bytes {2} [optional] [built]
[exports: default]
context element ./bar.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
context element ./bar [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
chunk {3} output.js (main) 618 bytes >{0}< >{1}< >{2}< [entry] [rendered]
chunk {3} output.js (main) 597 bytes >{0}< >{1}< >{2}< [entry] [rendered]
> .\example.js main
[3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object 160 bytes {3} [optional] [built]
import() context lazy ./templates [4] ./example.js 3:23-7:3
[4] ./example.js 458 bytes {3} [built]
[4] ./example.js 437 bytes {3} [built]
single entry .\example.js main
```

View File

@ -41,7 +41,7 @@ export default foo;
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -126,7 +126,7 @@ export default foo;
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -308,7 +308,7 @@ getTemplate("baz");
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 436 bytes 0 [emitted]
1.output.js 445 bytes 1 [emitted]
@ -348,12 +348,12 @@ chunk {3} output.js (main) 456 bytes >{0}< >{1}< >{2}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 113 bytes 0 [emitted]
1.output.js 114 bytes 1 [emitted]
2.output.js 115 bytes 2 [emitted]
output.js 2.1 KiB 3 [emitted] main
output.js 2.09 KiB 3 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 41 bytes <{3}> [rendered]
> ./foo [3] ./templates lazy ^\.\/.*$ namespace object ./foo

View File

@ -41,7 +41,7 @@ export default foo;
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -126,7 +126,7 @@ export default foo;
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -300,7 +300,7 @@ __webpack_require__(3)("./ba" + createContextVar).then(function(bar) {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 445 bytes 0 [emitted] chunk-bar-baz2
1.output.js 439 bytes 1 [emitted] chunk-bar-baz0
@ -340,7 +340,7 @@ chunk {3} output.js (main) 580 bytes >{0}< >{1}< >{2}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 114 bytes 0 [emitted] chunk-bar-baz2
1.output.js 115 bytes 1 [emitted] chunk-bar-baz0

View File

@ -45,7 +45,7 @@ require.ensure(["c"], function(require) {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -130,7 +130,7 @@ require.ensure(["c"], function(require) {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -301,7 +301,7 @@ Minimized
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 490 bytes 0 [emitted]
output.js 7.47 KiB 1 [emitted] main
@ -320,7 +320,7 @@ chunk {1} output.js (main) 166 bytes >{0}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 95 bytes 0 [emitted]
output.js 1.68 KiB 1 [emitted] main

View File

@ -153,7 +153,7 @@ module.exports = 42;
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 3.35 KiB 0 [emitted] main
Entrypoint main = output.js
@ -172,7 +172,7 @@ chunk {0} output.js (main) 206 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 708 bytes 0 [emitted] main
Entrypoint main = output.js

View File

@ -146,7 +146,7 @@ module.exports = "utility3";
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -319,7 +319,7 @@ module.exports = "utility1";
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -478,7 +478,7 @@ module.exports = "pageB";
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -634,10 +634,10 @@ module.exports = "pageC";
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
pageA.js 5.6 KiB 0 [emitted] pageA
pageB.js 5.4 KiB 1 [emitted] pageB
pageA.js 5.59 KiB 0 [emitted] pageA
pageB.js 5.39 KiB 1 [emitted] pageB
pageC.js 5.34 KiB 2 [emitted] pageC
vendor.js 536 bytes 3 [emitted] vendor
commons~pageA~pageB~pageC.js 269 bytes 4 [emitted] commons~pageA~pageB~pageC
@ -645,15 +645,15 @@ commons~pageA~pageB~pageC.js 269 bytes 4 [emitted] commons~pageA~pageB~
Entrypoint pageA = vendor.js commons~pageA~pageB~pageC.js pageA.js
Entrypoint pageB = vendor.js commons~pageA~pageB~pageC.js commons~pageB~pageC.js pageB.js
Entrypoint pageC = commons~pageA~pageB~pageC.js commons~pageB~pageC.js pageC.js
chunk {0} pageA.js (pageA) 170 bytes ={3}= ={4}= [entry] [rendered]
chunk {0} pageA.js (pageA) 165 bytes ={3}= ={4}= [entry] [rendered]
> ./pageA pageA
[0] ./pageA.js 142 bytes {0} [built]
[0] ./pageA.js 137 bytes {0} [built]
single entry ./pageA pageA
[2] ./utility1.js 28 bytes {0} [built]
cjs require ./utility1 [0] ./pageA.js 2:15-36
chunk {1} pageB.js (pageB) 142 bytes ={3}= ={4}= ={5}= [entry] [rendered]
chunk {1} pageB.js (pageB) 137 bytes ={3}= ={4}= ={5}= [entry] [rendered]
> ./pageB pageB
[4] ./pageB.js 142 bytes {1} [built]
[4] ./pageB.js 137 bytes {1} [built]
single entry ./pageB pageB
chunk {2} pageC.js (pageC) 105 bytes ={4}= ={5}= [entry] [rendered]
> ./pageC pageC
@ -683,7 +683,7 @@ chunk {5} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={1}= ={2}= =
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
commons~pageA~pageB~pageC.js 96 bytes 0 [emitted] commons~pageA~pageB~pageC
commons~pageB~pageC.js 97 bytes 1 [emitted] commons~pageB~pageC
@ -716,14 +716,14 @@ chunk {3} pageC.js (pageC) 105 bytes ={0}= ={1}= [entry] [rendered]
> ./pageC pageC
[2] ./pageC.js 105 bytes {3} [built]
single entry ./pageC pageC
chunk {4} pageB.js (pageB) 142 bytes ={0}= ={1}= ={2}= [entry] [rendered]
chunk {4} pageB.js (pageB) 137 bytes ={0}= ={1}= ={2}= [entry] [rendered]
> ./pageB pageB
[4] ./pageB.js 142 bytes {4} [built]
[4] ./pageB.js 137 bytes {4} [built]
single entry ./pageB pageB
chunk {5} pageA.js (pageA) 170 bytes ={0}= ={2}= [entry] [rendered]
chunk {5} pageA.js (pageA) 165 bytes ={0}= ={2}= [entry] [rendered]
> ./pageA pageA
[5] ./utility1.js 28 bytes {5} [built]
cjs require ./utility1 [7] ./pageA.js 2:15-36
[7] ./pageA.js 142 bytes {5} [built]
[7] ./pageA.js 137 bytes {5} [built]
single entry ./pageA pageA
```

View File

@ -113,7 +113,7 @@ module.exports = {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -198,7 +198,7 @@ module.exports = {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -430,7 +430,7 @@ module.exports = function() {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 340 bytes 0 [emitted]
1.output.js 549 bytes 1 [emitted]
@ -468,7 +468,7 @@ chunk {4} output.js (main) 261 bytes >{0}< >{1}< >{2}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 133 bytes 0 [emitted]
1.output.js 198 bytes 1 [emitted]

View File

@ -167,7 +167,7 @@ exports.add = function() {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 3.44 KiB 0 [emitted] main
Entrypoint main = output.js
@ -185,7 +185,7 @@ chunk {0} output.js (main) 329 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 740 bytes 0 [emitted] main
Entrypoint main = output.js

View File

@ -19,14 +19,14 @@ module.exports = {
output: {
filename: "vendor.js", // best use [hash] here too
path: path.resolve(__dirname, "dist"),
library: "vendor_lib_[hash]",
library: "vendor_lib_[hash]"
},
plugins: [
new webpack.DllPlugin({
name: "vendor_lib_[hash]",
path: path.resolve(__dirname, "dist/vendor-manifest.json"),
}),
],
path: path.resolve(__dirname, "dist/vendor-manifest.json")
})
]
};
```
@ -41,7 +41,7 @@ export function square(n) {
# dist/vendor.js
``` javascript
var vendor_lib_9ee2f174307b7ef21301 =
var vendor_lib_bc3751dcff9f91451e0e =
```
<details><summary><code>/******/ (function(modules) { /* webpackBootstrap */ })</code></summary>
@ -157,7 +157,7 @@ function square(n) {
# dist/vendor-manifest.json
``` javascript
{"name":"vendor_lib_9ee2f174307b7ef21301","content":{"../node_modules/example-vendor.js":{"id":1,"buildMeta":{"exportsType":"namespace","providedExports":["square"]}}}}
{"name":"vendor_lib_bc3751dcff9f91451e0e","content":{"../node_modules/example-vendor.js":{"id":1,"buildMeta":{"exportsType":"namespace","providedExports":["square"]}}}}
```
# Info
@ -166,7 +166,7 @@ function square(n) {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
vendor.js 3.32 KiB 0 [emitted] main
Entrypoint main = vendor.js
@ -182,7 +182,7 @@ chunk {0} vendor.js (main) 60 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
vendor.js 704 bytes 0 [emitted] main
Entrypoint main = vendor.js

View File

@ -14,14 +14,14 @@ module.exports = {
entry: "./example-app",
output: {
filename: "app.js",
path: path.resolve(__dirname, "dist"),
path: path.resolve(__dirname, "dist")
},
plugins: [
new webpack.DllReferencePlugin({
context: ".",
manifest: require("../0-vendor/dist/vendor-manifest.json"), // eslint-disable-line
}),
],
manifest: require("../0-vendor/dist/vendor-manifest.json") // eslint-disable-line
})
]
};
```
@ -147,22 +147,22 @@ console.log(new example_vendor__WEBPACK_IMPORTED_MODULE_0__["square"](7));
/***/ }),
/* 1 */
/*!******************************************************************************************************!*\
!*** delegated ../node_modules/example-vendor.js from dll-reference vendor_lib_9ee2f174307b7ef21301 ***!
!*** delegated ../node_modules/example-vendor.js from dll-reference vendor_lib_bc3751dcff9f91451e0e ***!
\******************************************************************************************************/
/*! exports provided: square */
/***/ (function(module, exports, __webpack_require__) {
module.exports = (__webpack_require__(/*! dll-reference vendor_lib_9ee2f174307b7ef21301 */ 2))(1);
module.exports = (__webpack_require__(/*! dll-reference vendor_lib_bc3751dcff9f91451e0e */ 2))(1);
/***/ }),
/* 2 */
/*!**************************************************!*\
!*** external "vendor_lib_9ee2f174307b7ef21301" ***!
!*** external "vendor_lib_bc3751dcff9f91451e0e" ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = vendor_lib_9ee2f174307b7ef21301;
module.exports = vendor_lib_bc3751dcff9f91451e0e;
/***/ })
/******/ ]);
@ -174,7 +174,7 @@ module.exports = vendor_lib_9ee2f174307b7ef21301;
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
app.js 3.9 KiB 0 [emitted] main
Entrypoint main = app.js
@ -183,32 +183,32 @@ chunk {0} app.js (main) 182 bytes [entry] [rendered]
[0] ./example-app.js 98 bytes {0} [built]
[no exports]
single entry ./example-app main
[1] delegated ../node_modules/example-vendor.js from dll-reference vendor_lib_9ee2f174307b7ef21301 42 bytes {0} [built]
[1] delegated ../node_modules/example-vendor.js from dll-reference vendor_lib_bc3751dcff9f91451e0e 42 bytes {0} [built]
[exports: square]
harmony side effect evaluation example-vendor [0] ./example-app.js 1:0-40
harmony import specifier example-vendor [0] ./example-app.js 3:12-18
harmony import specifier example-vendor [0] ./example-app.js 4:16-22
[2] external "vendor_lib_9ee2f174307b7ef21301" 42 bytes {0} [built]
delegated source dll-reference vendor_lib_9ee2f174307b7ef21301 [1] delegated ../node_modules/example-vendor.js from dll-reference vendor_lib_9ee2f174307b7ef21301
[2] external "vendor_lib_bc3751dcff9f91451e0e" 42 bytes {0} [built]
delegated source dll-reference vendor_lib_bc3751dcff9f91451e0e [1] delegated ../node_modules/example-vendor.js from dll-reference vendor_lib_bc3751dcff9f91451e0e
```
## Production mode
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
app.js 736 bytes 0 [emitted] main
Entrypoint main = app.js
chunk {0} app.js (main) 182 bytes [entry] [rendered]
> ./example-app main
[0] delegated ../node_modules/example-vendor.js from dll-reference vendor_lib_9ee2f174307b7ef21301 42 bytes {0} [built]
[0] delegated ../node_modules/example-vendor.js from dll-reference vendor_lib_bc3751dcff9f91451e0e 42 bytes {0} [built]
[exports: square]
harmony side effect evaluation example-vendor [2] ./example-app.js 1:0-40
harmony import specifier example-vendor [2] ./example-app.js 3:12-18
harmony import specifier example-vendor [2] ./example-app.js 4:16-22
[1] external "vendor_lib_9ee2f174307b7ef21301" 42 bytes {0} [built]
delegated source dll-reference vendor_lib_9ee2f174307b7ef21301 [0] delegated ../node_modules/example-vendor.js from dll-reference vendor_lib_9ee2f174307b7ef21301
[1] external "vendor_lib_bc3751dcff9f91451e0e" 42 bytes {0} [built]
delegated source dll-reference vendor_lib_bc3751dcff9f91451e0e [0] delegated ../node_modules/example-vendor.js from dll-reference vendor_lib_bc3751dcff9f91451e0e
[2] ./example-app.js 98 bytes {0} [built]
[no exports]
single entry ./example-app main

View File

@ -140,82 +140,82 @@ console.log(__webpack_require__(/*! module */ 8));
/***/ }),
/* 1 */
/*!**************************************************************************!*\
!*** delegated ./alpha.js from dll-reference alpha_ae937b5d3e880b635a69 ***!
!*** delegated ./alpha.js from dll-reference alpha_53e9c88e69872d1acfd3 ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = (__webpack_require__(/*! dll-reference alpha_ae937b5d3e880b635a69 */ 2))(1);
module.exports = (__webpack_require__(/*! dll-reference alpha_53e9c88e69872d1acfd3 */ 2))(1);
/***/ }),
/* 2 */
/*!*********************************************!*\
!*** external "alpha_ae937b5d3e880b635a69" ***!
!*** external "alpha_53e9c88e69872d1acfd3" ***!
\*********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = alpha_ae937b5d3e880b635a69;
module.exports = alpha_53e9c88e69872d1acfd3;
/***/ }),
/* 3 */
/*!**********************************************************************!*\
!*** delegated ./a.js from dll-reference alpha_ae937b5d3e880b635a69 ***!
!*** delegated ./a.js from dll-reference alpha_53e9c88e69872d1acfd3 ***!
\**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = (__webpack_require__(/*! dll-reference alpha_ae937b5d3e880b635a69 */ 2))(2);
module.exports = (__webpack_require__(/*! dll-reference alpha_53e9c88e69872d1acfd3 */ 2))(2);
/***/ }),
/* 4 */
/*!************************************************************************!*\
!*** delegated ./beta.js from dll-reference beta_ae937b5d3e880b635a69 ***!
!*** delegated ./beta.js from dll-reference beta_53e9c88e69872d1acfd3 ***!
\************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = (__webpack_require__(/*! dll-reference beta_ae937b5d3e880b635a69 */ 5))(5);
module.exports = (__webpack_require__(/*! dll-reference beta_53e9c88e69872d1acfd3 */ 5))(5);
/***/ }),
/* 5 */
/*!********************************************!*\
!*** external "beta_ae937b5d3e880b635a69" ***!
!*** external "beta_53e9c88e69872d1acfd3" ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = beta_ae937b5d3e880b635a69;
module.exports = beta_53e9c88e69872d1acfd3;
/***/ }),
/* 6 */
/*!*********************************************************************!*\
!*** delegated ./b.js from dll-reference beta_ae937b5d3e880b635a69 ***!
!*** delegated ./b.js from dll-reference beta_53e9c88e69872d1acfd3 ***!
\*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = (__webpack_require__(/*! dll-reference beta_ae937b5d3e880b635a69 */ 5))(6);
module.exports = (__webpack_require__(/*! dll-reference beta_53e9c88e69872d1acfd3 */ 5))(6);
/***/ }),
/* 7 */
/*!**********************************************************************!*\
!*** delegated ./c.jsx from dll-reference beta_ae937b5d3e880b635a69 ***!
!*** delegated ./c.jsx from dll-reference beta_53e9c88e69872d1acfd3 ***!
\**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = (__webpack_require__(/*! dll-reference beta_ae937b5d3e880b635a69 */ 5))(7);
module.exports = (__webpack_require__(/*! dll-reference beta_53e9c88e69872d1acfd3 */ 5))(7);
/***/ }),
/* 8 */
/*!*****************************************************************************************!*\
!*** delegated ../node_modules/module.js from dll-reference alpha_ae937b5d3e880b635a69 ***!
!*** delegated ../node_modules/module.js from dll-reference alpha_53e9c88e69872d1acfd3 ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = (__webpack_require__(/*! dll-reference alpha_ae937b5d3e880b635a69 */ 2))(3);
module.exports = (__webpack_require__(/*! dll-reference alpha_53e9c88e69872d1acfd3 */ 2))(3);
/***/ })
/******/ ]);
@ -227,7 +227,7 @@ module.exports = (__webpack_require__(/*! dll-reference alpha_ae937b5d3e880b635a
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 6.19 KiB 0 [emitted] main
Entrypoint main = output.js
@ -235,25 +235,25 @@ chunk {0} output.js (main) 549 bytes [entry] [rendered]
> .\example.js main
[0] ./example.js 213 bytes {0} [built]
single entry .\example.js main
[1] delegated ./alpha.js from dll-reference alpha_ae937b5d3e880b635a69 42 bytes {0} [built]
[1] delegated ./alpha.js from dll-reference alpha_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require ../dll/alpha [0] ./example.js 1:12-35
[2] external "alpha_ae937b5d3e880b635a69" 42 bytes {0} [built]
delegated source dll-reference alpha_ae937b5d3e880b635a69 [1] delegated ./alpha.js from dll-reference alpha_ae937b5d3e880b635a69
delegated source dll-reference alpha_ae937b5d3e880b635a69 [3] delegated ./a.js from dll-reference alpha_ae937b5d3e880b635a69
delegated source dll-reference alpha_ae937b5d3e880b635a69 [8] delegated ../node_modules/module.js from dll-reference alpha_ae937b5d3e880b635a69
[3] delegated ./a.js from dll-reference alpha_ae937b5d3e880b635a69 42 bytes {0} [built]
[2] external "alpha_53e9c88e69872d1acfd3" 42 bytes {0} [built]
delegated source dll-reference alpha_53e9c88e69872d1acfd3 [1] delegated ./alpha.js from dll-reference alpha_53e9c88e69872d1acfd3
delegated source dll-reference alpha_53e9c88e69872d1acfd3 [3] delegated ./a.js from dll-reference alpha_53e9c88e69872d1acfd3
delegated source dll-reference alpha_53e9c88e69872d1acfd3 [8] delegated ../node_modules/module.js from dll-reference alpha_53e9c88e69872d1acfd3
[3] delegated ./a.js from dll-reference alpha_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require ../dll/a [0] ./example.js 2:12-31
[4] delegated ./beta.js from dll-reference beta_ae937b5d3e880b635a69 42 bytes {0} [built]
[4] delegated ./beta.js from dll-reference beta_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require beta/beta [0] ./example.js 4:12-32
[5] external "beta_ae937b5d3e880b635a69" 42 bytes {0} [built]
delegated source dll-reference beta_ae937b5d3e880b635a69 [4] delegated ./beta.js from dll-reference beta_ae937b5d3e880b635a69
delegated source dll-reference beta_ae937b5d3e880b635a69 [6] delegated ./b.js from dll-reference beta_ae937b5d3e880b635a69
delegated source dll-reference beta_ae937b5d3e880b635a69 [7] delegated ./c.jsx from dll-reference beta_ae937b5d3e880b635a69
[6] delegated ./b.js from dll-reference beta_ae937b5d3e880b635a69 42 bytes {0} [built]
[5] external "beta_53e9c88e69872d1acfd3" 42 bytes {0} [built]
delegated source dll-reference beta_53e9c88e69872d1acfd3 [4] delegated ./beta.js from dll-reference beta_53e9c88e69872d1acfd3
delegated source dll-reference beta_53e9c88e69872d1acfd3 [6] delegated ./b.js from dll-reference beta_53e9c88e69872d1acfd3
delegated source dll-reference beta_53e9c88e69872d1acfd3 [7] delegated ./c.jsx from dll-reference beta_53e9c88e69872d1acfd3
[6] delegated ./b.js from dll-reference beta_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require beta/b [0] ./example.js 5:12-29
[7] delegated ./c.jsx from dll-reference beta_ae937b5d3e880b635a69 42 bytes {0} [built]
[7] delegated ./c.jsx from dll-reference beta_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require beta/c [0] ./example.js 6:12-29
[8] delegated ../node_modules/module.js from dll-reference alpha_ae937b5d3e880b635a69 42 bytes {0} [built]
[8] delegated ../node_modules/module.js from dll-reference alpha_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require module [0] ./example.js 8:12-29
```
@ -261,31 +261,31 @@ chunk {0} output.js (main) 549 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 972 bytes 0 [emitted] main
Entrypoint main = output.js
chunk {0} output.js (main) 549 bytes [entry] [rendered]
> .\example.js main
[0] external "beta_ae937b5d3e880b635a69" 42 bytes {0} [built]
delegated source dll-reference beta_ae937b5d3e880b635a69 [3] delegated ./c.jsx from dll-reference beta_ae937b5d3e880b635a69
delegated source dll-reference beta_ae937b5d3e880b635a69 [4] delegated ./b.js from dll-reference beta_ae937b5d3e880b635a69
delegated source dll-reference beta_ae937b5d3e880b635a69 [5] delegated ./beta.js from dll-reference beta_ae937b5d3e880b635a69
[1] external "alpha_ae937b5d3e880b635a69" 42 bytes {0} [built]
delegated source dll-reference alpha_ae937b5d3e880b635a69 [2] delegated ../node_modules/module.js from dll-reference alpha_ae937b5d3e880b635a69
delegated source dll-reference alpha_ae937b5d3e880b635a69 [6] delegated ./a.js from dll-reference alpha_ae937b5d3e880b635a69
delegated source dll-reference alpha_ae937b5d3e880b635a69 [7] delegated ./alpha.js from dll-reference alpha_ae937b5d3e880b635a69
[2] delegated ../node_modules/module.js from dll-reference alpha_ae937b5d3e880b635a69 42 bytes {0} [built]
[0] external "beta_53e9c88e69872d1acfd3" 42 bytes {0} [built]
delegated source dll-reference beta_53e9c88e69872d1acfd3 [3] delegated ./c.jsx from dll-reference beta_53e9c88e69872d1acfd3
delegated source dll-reference beta_53e9c88e69872d1acfd3 [4] delegated ./b.js from dll-reference beta_53e9c88e69872d1acfd3
delegated source dll-reference beta_53e9c88e69872d1acfd3 [5] delegated ./beta.js from dll-reference beta_53e9c88e69872d1acfd3
[1] external "alpha_53e9c88e69872d1acfd3" 42 bytes {0} [built]
delegated source dll-reference alpha_53e9c88e69872d1acfd3 [2] delegated ../node_modules/module.js from dll-reference alpha_53e9c88e69872d1acfd3
delegated source dll-reference alpha_53e9c88e69872d1acfd3 [6] delegated ./a.js from dll-reference alpha_53e9c88e69872d1acfd3
delegated source dll-reference alpha_53e9c88e69872d1acfd3 [7] delegated ./alpha.js from dll-reference alpha_53e9c88e69872d1acfd3
[2] delegated ../node_modules/module.js from dll-reference alpha_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require module [8] ./example.js 8:12-29
[3] delegated ./c.jsx from dll-reference beta_ae937b5d3e880b635a69 42 bytes {0} [built]
[3] delegated ./c.jsx from dll-reference beta_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require beta/c [8] ./example.js 6:12-29
[4] delegated ./b.js from dll-reference beta_ae937b5d3e880b635a69 42 bytes {0} [built]
[4] delegated ./b.js from dll-reference beta_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require beta/b [8] ./example.js 5:12-29
[5] delegated ./beta.js from dll-reference beta_ae937b5d3e880b635a69 42 bytes {0} [built]
[5] delegated ./beta.js from dll-reference beta_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require beta/beta [8] ./example.js 4:12-32
[6] delegated ./a.js from dll-reference alpha_ae937b5d3e880b635a69 42 bytes {0} [built]
[6] delegated ./a.js from dll-reference alpha_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require ../dll/a [8] ./example.js 2:12-31
[7] delegated ./alpha.js from dll-reference alpha_ae937b5d3e880b635a69 42 bytes {0} [built]
[7] delegated ./alpha.js from dll-reference alpha_53e9c88e69872d1acfd3 42 bytes {0} [built]
cjs require ../dll/alpha [8] ./example.js 1:12-35
[8] ./example.js 213 bytes {0} [built]
single entry .\example.js main

View File

@ -36,7 +36,7 @@ module.exports = {
# dist/MyDll.alpha.js
``` javascript
var alpha_ae937b5d3e880b635a69 =
var alpha_53e9c88e69872d1acfd3 =
```
<details><summary><code>/******/ (function(modules) { /* webpackBootstrap */ })</code></summary>
@ -168,7 +168,7 @@ module.exports = "module";
# dist/alpha-manifest.json
``` javascript
{"name":"alpha_ae937b5d3e880b635a69","content":{"./alpha.js":{"id":1,"buildMeta":{"providedExports":true}},"./a.js":{"id":2,"buildMeta":{"providedExports":true}},"../node_modules/module.js":{"id":3,"buildMeta":{"providedExports":true}}}}
{"name":"alpha_53e9c88e69872d1acfd3","content":{"./alpha.js":{"id":1,"buildMeta":{"providedExports":true}},"./a.js":{"id":2,"buildMeta":{"providedExports":true}},"../node_modules/module.js":{"id":3,"buildMeta":{"providedExports":true}}}}
```
# Info
@ -177,7 +177,7 @@ module.exports = "module";
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
MyDll.alpha.js 3.46 KiB 0 [emitted] alpha
MyDll.beta.js 3.43 KiB 1 [emitted] beta
@ -215,7 +215,7 @@ chunk {1} MyDll.beta.js (beta) 80 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
MyDll.beta.js 691 bytes 0 [emitted] beta
MyDll.alpha.js 700 bytes 1 [emitted] alpha

View File

@ -4,7 +4,6 @@
var path = require("path");
var webpack = require("../../");
module.exports = [
{
name: "vendor",
// mode: "development || "production",
@ -41,14 +40,13 @@ module.exports = [
})
]
}
];
```
# dist/vendor.js
``` javascript
var vendor_36000db9190edee14765 =
var vendor_ee007e7c7b39dbafa2cd =
```
<details><summary><code>/******/ (function(modules) { /* webpackBootstrap */ })</code></summary>
@ -254,22 +252,22 @@ module.exports = "pageA";
/***/ }),
/* 1 */
/*!****************************************************************************!*\
!*** delegated ./vendor.js from dll-reference vendor_36000db9190edee14765 ***!
!*** delegated ./vendor.js from dll-reference vendor_ee007e7c7b39dbafa2cd ***!
\****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = (__webpack_require__(/*! dll-reference vendor_36000db9190edee14765 */ 2))(1);
module.exports = (__webpack_require__(/*! dll-reference vendor_ee007e7c7b39dbafa2cd */ 2))(1);
/***/ }),
/* 2 */
/*!**********************************************!*\
!*** external "vendor_36000db9190edee14765" ***!
!*** external "vendor_ee007e7c7b39dbafa2cd" ***!
\**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = vendor_36000db9190edee14765;
module.exports = vendor_ee007e7c7b39dbafa2cd;
/***/ })
/******/ ]);
@ -281,7 +279,7 @@ module.exports = vendor_36000db9190edee14765;
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Child vendor:
Hash: 0a1b2c3d4e5f6a7b8c9d
Asset Size Chunks Chunk Names
@ -311,19 +309,19 @@ Child app:
> ./pageA pageA
[0] ./pageA.js 60 bytes {0} [built]
single entry ./pageA pageA
[1] delegated ./vendor.js from dll-reference vendor_36000db9190edee14765 42 bytes {0} [built]
[1] delegated ./vendor.js from dll-reference vendor_ee007e7c7b39dbafa2cd 42 bytes {0} [built]
cjs require ./vendor [0] ./pageA.js 1:12-31
[2] external "vendor_36000db9190edee14765" 42 bytes {0} {1} [built]
delegated source dll-reference vendor_36000db9190edee14765 [1] delegated ./vendor.js from dll-reference vendor_36000db9190edee14765
delegated source dll-reference vendor_36000db9190edee14765 [4] delegated ./vendor2.js from dll-reference vendor_36000db9190edee14765
[2] external "vendor_ee007e7c7b39dbafa2cd" 42 bytes {0} {1} [built]
delegated source dll-reference vendor_ee007e7c7b39dbafa2cd [1] delegated ./vendor.js from dll-reference vendor_ee007e7c7b39dbafa2cd
delegated source dll-reference vendor_ee007e7c7b39dbafa2cd [4] delegated ./vendor2.js from dll-reference vendor_ee007e7c7b39dbafa2cd
chunk {1} pageB.js (pageB) 145 bytes [entry] [rendered]
> ./pageB pageB
[2] external "vendor_36000db9190edee14765" 42 bytes {0} {1} [built]
delegated source dll-reference vendor_36000db9190edee14765 [1] delegated ./vendor.js from dll-reference vendor_36000db9190edee14765
delegated source dll-reference vendor_36000db9190edee14765 [4] delegated ./vendor2.js from dll-reference vendor_36000db9190edee14765
[2] external "vendor_ee007e7c7b39dbafa2cd" 42 bytes {0} {1} [built]
delegated source dll-reference vendor_ee007e7c7b39dbafa2cd [1] delegated ./vendor.js from dll-reference vendor_ee007e7c7b39dbafa2cd
delegated source dll-reference vendor_ee007e7c7b39dbafa2cd [4] delegated ./vendor2.js from dll-reference vendor_ee007e7c7b39dbafa2cd
[3] ./pageB.js 61 bytes {1} [built]
single entry ./pageB pageB
[4] delegated ./vendor2.js from dll-reference vendor_36000db9190edee14765 42 bytes {1} [built]
[4] delegated ./vendor2.js from dll-reference vendor_ee007e7c7b39dbafa2cd 42 bytes {1} [built]
cjs require ./vendor2 [3] ./pageB.js 1:12-32
chunk {2} pageC.js (pageC) 25 bytes [entry] [rendered]
> ./pageC pageC
@ -335,7 +333,7 @@ Child app:
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Child vendor:
Hash: 0a1b2c3d4e5f6a7b8c9d
Asset Size Chunks Chunk Names
@ -367,19 +365,19 @@ Child app:
single entry ./pageC pageC
chunk {1} pageB.js (pageB) 145 bytes [entry] [rendered]
> ./pageB pageB
[0] external "vendor_bca8264c25e79f49ad09" 42 bytes {1} {2} [built]
delegated source dll-reference vendor_bca8264c25e79f49ad09 [2] delegated ./vendor2.js from dll-reference vendor_bca8264c25e79f49ad09
delegated source dll-reference vendor_bca8264c25e79f49ad09 [4] delegated ./vendor.js from dll-reference vendor_bca8264c25e79f49ad09
[2] delegated ./vendor2.js from dll-reference vendor_bca8264c25e79f49ad09 42 bytes {1} [built]
[0] external "vendor_2e11d1dbfa7fdf7cff54" 42 bytes {1} {2} [built]
delegated source dll-reference vendor_2e11d1dbfa7fdf7cff54 [2] delegated ./vendor2.js from dll-reference vendor_2e11d1dbfa7fdf7cff54
delegated source dll-reference vendor_2e11d1dbfa7fdf7cff54 [4] delegated ./vendor.js from dll-reference vendor_2e11d1dbfa7fdf7cff54
[2] delegated ./vendor2.js from dll-reference vendor_2e11d1dbfa7fdf7cff54 42 bytes {1} [built]
cjs require ./vendor2 [3] ./pageB.js 1:12-32
[3] ./pageB.js 61 bytes {1} [built]
single entry ./pageB pageB
chunk {2} pageA.js (pageA) 144 bytes [entry] [rendered]
> ./pageA pageA
[0] external "vendor_bca8264c25e79f49ad09" 42 bytes {1} {2} [built]
delegated source dll-reference vendor_bca8264c25e79f49ad09 [2] delegated ./vendor2.js from dll-reference vendor_bca8264c25e79f49ad09
delegated source dll-reference vendor_bca8264c25e79f49ad09 [4] delegated ./vendor.js from dll-reference vendor_bca8264c25e79f49ad09
[4] delegated ./vendor.js from dll-reference vendor_bca8264c25e79f49ad09 42 bytes {2} [built]
[0] external "vendor_2e11d1dbfa7fdf7cff54" 42 bytes {1} {2} [built]
delegated source dll-reference vendor_2e11d1dbfa7fdf7cff54 [2] delegated ./vendor2.js from dll-reference vendor_2e11d1dbfa7fdf7cff54
delegated source dll-reference vendor_2e11d1dbfa7fdf7cff54 [4] delegated ./vendor.js from dll-reference vendor_2e11d1dbfa7fdf7cff54
[4] delegated ./vendor.js from dll-reference vendor_2e11d1dbfa7fdf7cff54 42 bytes {2} [built]
cjs require ./vendor [5] ./pageA.js 1:12-31
[5] ./pageA.js 60 bytes {2} [built]
single entry ./pageA pageA

View File

@ -35,7 +35,7 @@ module.exports = {
externals: [
"add",
{
"subtract": {
subtract: {
root: "subtract",
commonjs2: "./subtract",
commonjs: ["./math", "subtract"],
@ -183,7 +183,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 4.17 KiB 0 [emitted] main
Entrypoint main = output.js
@ -201,7 +201,7 @@ chunk {0} output.js (main) 197 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 1.02 KiB 0 [emitted] main
Entrypoint main = output.js

View File

@ -44,7 +44,7 @@ module.exports = {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -129,7 +129,7 @@ module.exports = {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -257,7 +257,7 @@ Promise.all(/*! require.ensure */[__webpack_require__.e(0), __webpack_require__.
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 247 bytes 0 [emitted]
1.output.js 238 bytes 1 [emitted]
@ -317,7 +317,7 @@ chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [r
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 90 bytes 0 [emitted]
1.output.js 89 bytes 1 [emitted]

View File

@ -54,7 +54,7 @@ require.ensure(["./a"], function(require) {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -139,7 +139,7 @@ require.ensure(["./a"], function(require) {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -324,12 +324,12 @@ module.exports = "c";
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 405 bytes 0 [emitted]
1.output.js 241 bytes 1 [emitted]
2.output.js 241 bytes 2 [emitted]
output.js 7.32 KiB 3 [emitted] main
output.js 7.31 KiB 3 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 42 bytes <{3}> ={1}= ={2}= [rendered] split chunk (cache group: default)
> ./a ./b ./c [2] ./example.js 2:0-30
@ -348,9 +348,9 @@ chunk {2} 2.output.js 21 bytes <{3}> ={0}= [rendered]
> ./a ./b ./c [2] ./example.js 2:0-30
[4] ./c.js 21 bytes {2} [built]
amd require ./c [2] ./example.js 2:0-30
chunk {3} output.js (main) 172 bytes >{0}< >{1}< >{2}< [entry] [rendered]
chunk {3} output.js (main) 164 bytes >{0}< >{1}< >{2}< [entry] [rendered]
> .\example.js main
[2] ./example.js 172 bytes {3} [built]
[2] ./example.js 164 bytes {3} [built]
single entry .\example.js main
```
@ -358,7 +358,7 @@ chunk {3} output.js (main) 172 bytes >{0}< >{1}< >{2}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 118 bytes 0 [emitted]
1.output.js 91 bytes 1 [emitted]
@ -382,8 +382,8 @@ chunk {2} 2.output.js 21 bytes <{3}> ={0}= [rendered]
> ./a ./b ./c [2] ./example.js 2:0-30
[4] ./c.js 21 bytes {2} [built]
amd require ./c [2] ./example.js 2:0-30
chunk {3} output.js (main) 172 bytes >{0}< >{1}< >{2}< [entry] [rendered]
chunk {3} output.js (main) 164 bytes >{0}< >{1}< >{2}< [entry] [rendered]
> .\example.js main
[2] ./example.js 172 bytes {3} [built]
[2] ./example.js 164 bytes {3} [built]
single entry .\example.js main
```

View File

@ -260,7 +260,7 @@ var named = "named";
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 6.13 KiB 0 [emitted] main
Entrypoint main = output.js
@ -269,7 +269,7 @@ chunk {0} output.js (main) 1.17 KiB [entry] [rendered]
[0] ./example.js 389 bytes {0} [built]
[no exports]
single entry .\example.js main
[1] ./fs.js 265 bytes {0} [built]
[1] ./fs.js 264 bytes {0} [built]
harmony side effect evaluation ./fs [0] ./example.js 4:0-22
harmony side effect evaluation ./fs [0] ./example.js 5:0-32
harmony side effect evaluation ./fs [0] ./example.js 6:0-28
@ -292,13 +292,13 @@ chunk {0} output.js (main) 1.17 KiB [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 993 bytes 0 [emitted] main
Entrypoint main = output.js
chunk {0} output.js (main) 1.17 KiB [entry] [rendered]
> .\example.js main
[0] ./fs.js 265 bytes {0} [built]
[0] ./fs.js 264 bytes {0} [built]
[only some exports used: default, readFile]
harmony side effect evaluation ./fs [1] ./reexport-commonjs.js 2:0-21
harmony export imported specifier ./fs [1] ./reexport-commonjs.js 2:0-21

View File

@ -137,7 +137,7 @@ function increment() {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
MyLibrary.umd.js 3.56 KiB 0 [emitted] main
Entrypoint main = MyLibrary.umd.js
@ -152,7 +152,7 @@ chunk {0} MyLibrary.umd.js (main) 97 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
MyLibrary.umd.js 926 bytes 0 [emitted] main
Entrypoint main = MyLibrary.umd.js

View File

@ -231,7 +231,7 @@ function c() { console.log("c"); }
# dist/output.js
``` javascript
!function(t){function n(e){if(r[e])return r[e].exports;var u=r[e]={i:e,l:!1,exports:{}};return t[e].call(u.exports,u,u.exports,n),u.l=!0,u.exports}var r={};n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="dist/",n(n.s=3)}([function(t,n,r){"use strict";function e(){for(var t=0,n=0,r=arguments,e=r.length;n<e;)t+=r[n++];return t}function u(){for(var t=1,n=0,r=arguments,e=r.length;n<e;)t*=r[n++];return t}r.d(n,"a",function(){return e}),r.d(n,"b",function(){return u})},function(t,n,r){"use strict"},function(t,n,r){"use strict";r(1);var e=r(0);r.d(n,"a",function(){return e.b})},function(t,n,r){"use strict";r.r(n);var e=r(0),u=r(2);Object(e.a)(1,2),u.a(1,2)}]);
!function(t){var n={};function r(e){if(n[e])return n[e].exports;var u=n[e]={i:e,l:!1,exports:{}};return t[e].call(u.exports,u,u.exports,r),u.l=!0,u.exports}r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="dist/",r(r.s=3)}([function(t,n,r){"use strict";function e(){for(var t=0,n=0,r=arguments,e=r.length;n<e;)t+=r[n++];return t}function u(){for(var t=1,n=0,r=arguments,e=r.length;n<e;)t*=r[n++];return t}r.d(n,"a",function(){return e}),r.d(n,"b",function(){return u})},function(t,n,r){"use strict"},function(t,n,r){"use strict";r(1);var e=r(0);r.d(n,"a",function(){return e.b})},function(t,n,r){"use strict";r.r(n);var e=r(0),u=r(2);Object(e.a)(1,2),u.a(1,2)}]);
```
# Info
@ -240,7 +240,7 @@ function c() { console.log("c"); }
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 5.93 KiB 0 [emitted] main
Entrypoint main = output.js
@ -272,7 +272,7 @@ chunk {0} output.js (main) 726 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 971 bytes 0 [emitted] main
Entrypoint main = output.js

View File

@ -30,7 +30,7 @@ export function increment(val) {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -115,7 +115,7 @@ export function increment(val) {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -274,7 +274,7 @@ __webpack_require__.e(/*! import() */ 0).then(__webpack_require__.bind(null, /*!
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 479 bytes 0 [emitted]
output.js 8.27 KiB 1 [emitted] main
@ -303,10 +303,10 @@ chunk {1} output.js (main) 419 bytes >{0}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 144 bytes 0 [emitted]
output.js 1.75 KiB 1 [emitted] main
output.js 1.73 KiB 1 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 25 bytes <{1}> [rendered]
> ./async-loaded [] 6:0-24

View File

@ -47,68 +47,68 @@ module.exports = {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
aae9c6dac629dd3f112e.js 54.5 KiB 7 [emitted]
07ed7b2dfa6fe5502719.js 34.8 KiB 0 [emitted]
987f929f287f8a6c88ac.js 52.1 KiB 2 [emitted]
bc5ed8b126130fde4f42.js 31.1 KiB 3 [emitted]
511009f3a8f06b7c54cb.js 43 KiB 4 [emitted]
2a784b823ab0da1e0293.js 43.7 KiB 5 [emitted]
0abfd767d2250ac9265a.js 46 KiB 6 [emitted]
3147c249192926fa3521.js 12.6 KiB 1 [emitted]
cd98376ec90f2e366b94.js 36.8 KiB 8 [emitted]
a0f973cb054f411fba45.js 43 KiB 9 [emitted]
ee6461bbec846ab2c762.js 37.6 KiB 10 [emitted]
74249374b007623d16bf.js 41.7 KiB 11 [emitted]
0a6d10836900825087ce.js 44.7 KiB 12 [emitted]
5ec04d5529f6b78241e2.js 51.9 KiB 13 [emitted]
38a6975540caa0156886.js 51.3 KiB 14 [emitted]
Entrypoint main = bc5ed8b126130fde4f42.js 2a784b823ab0da1e0293.js 07ed7b2dfa6fe5502719.js
chunk {0} 07ed7b2dfa6fe5502719.js 28.3 KiB ={3}= ={5}= >{1}< >{10}< >{11}< >{12}< >{13}< >{14}< >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered]
0970c34320caae80c02a.js 54.5 KiB 7 [emitted]
83b274deceed463f2e6b.js 34.8 KiB 0 [emitted]
0e1d917bc78b9875c633.js 52.1 KiB 2 [emitted]
fa360eb6e2345a3f1eb1.js 31.1 KiB 3 [emitted]
e73fa83e75ca1cd02064.js 43 KiB 4 [emitted]
e1fabf154d567040fc9e.js 43.7 KiB 5 [emitted]
c7a944568ed9e97283c6.js 46 KiB 6 [emitted]
2ce24bf0a195b5226f1c.js 12.6 KiB 1 [emitted]
21648f333424392ec94c.js 36.8 KiB 8 [emitted]
fe79c8024bca5a2710e2.js 43 KiB 9 [emitted]
11717dc27d3f6a5dbab8.js 37.6 KiB 10 [emitted]
0c4ce63f0aa44b1872d5.js 41.7 KiB 11 [emitted]
2db10d04d445e62740cf.js 44.7 KiB 12 [emitted]
e5fe5d02d5fea683fb6b.js 51.9 KiB 13 [emitted]
d2aecc6eb6d7ce0cc8bb.js 51.3 KiB 14 [emitted]
Entrypoint main = fa360eb6e2345a3f1eb1.js e1fabf154d567040fc9e.js 83b274deceed463f2e6b.js
chunk {0} 83b274deceed463f2e6b.js 28.3 KiB ={3}= ={5}= >{1}< >{10}< >{11}< >{12}< >{13}< >{14}< >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered]
> ./example main
[0] ./example.js 44 bytes {0} [built]
+ 13 hidden modules
chunk {1} 3147c249192926fa3521.js 24.9 KiB <{0}> <{3}> <{5}> ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered]
chunk {1} 2ce24bf0a195b5226f1c.js 24.9 KiB <{0}> <{3}> <{5}> ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered]
> react-dom [0] ./example.js 2:0-22
3 modules
chunk {2} 987f929f287f8a6c88ac.js 45.7 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {2} 0e1d917bc78b9875c633.js 45.7 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
23 modules
chunk {3} bc5ed8b126130fde4f42.js 37.8 KiB ={0}= ={5}= >{1}< >{10}< >{11}< >{12}< >{13}< >{14}< >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted
chunk {3} fa360eb6e2345a3f1eb1.js 37.8 KiB ={0}= ={5}= >{1}< >{10}< >{11}< >{12}< >{13}< >{14}< >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted
> ./example main
8 modules
chunk {4} 511009f3a8f06b7c54cb.js 46.9 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {4} e73fa83e75ca1cd02064.js 46.9 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
8 modules
chunk {5} 2a784b823ab0da1e0293.js 45.7 KiB ={0}= ={3}= >{1}< >{10}< >{11}< >{12}< >{13}< >{14}< >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted
chunk {5} e1fabf154d567040fc9e.js 45.7 KiB ={0}= ={3}= >{1}< >{10}< >{11}< >{12}< >{13}< >{14}< >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted
> ./example main
9 modules
chunk {6} 0abfd767d2250ac9265a.js 46.3 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {6} c7a944568ed9e97283c6.js 46.3 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
10 modules
chunk {7} aae9c6dac629dd3f112e.js 62.3 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {7} 0970c34320caae80c02a.js 62.3 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
7 modules
chunk {8} cd98376ec90f2e366b94.js 43.3 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={9}= [rendered] [recorded] aggressive splitted
chunk {8} 21648f333424392ec94c.js 43.3 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
3 modules
chunk {9} a0f973cb054f411fba45.js 44.4 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= [rendered] [recorded] aggressive splitted
chunk {9} fe79c8024bca5a2710e2.js 44.4 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
10 modules
chunk {10} ee6461bbec846ab2c762.js 34 KiB <{0}> <{3}> <{5}> ={1}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {10} 11717dc27d3f6a5dbab8.js 34 KiB <{0}> <{3}> <{5}> ={1}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
16 modules
chunk {11} 74249374b007623d16bf.js 48.4 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {11} 0c4ce63f0aa44b1872d5.js 48.4 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
6 modules
chunk {12} 0a6d10836900825087ce.js 46.2 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {12} 2db10d04d445e62740cf.js 46.2 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
9 modules
chunk {13} 5ec04d5529f6b78241e2.js 48.2 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {13} e5fe5d02d5fea683fb6b.js 48.2 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
20 modules
chunk {14} 38a6975540caa0156886.js 46.6 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {14} d2aecc6eb6d7ce0cc8bb.js 46.6 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [0] ./example.js 2:0-22
24 modules
```
@ -117,67 +117,67 @@ chunk {14} 38a6975540caa0156886.js 46.6 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={1
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
7a1ec67d9e4e1019836a.js 14.8 KiB 7 [emitted]
9baaf7bc0364c2600ef8.js 9.7 KiB 0 [emitted]
cf3beff30352265c3fae.js 13.1 KiB 2 [emitted]
0bc9e49d2884c20a78ae.js 7.89 KiB 3 [emitted]
408e20e95f946dedfdd3.js 8.14 KiB 4 [emitted]
5b44ef86854beead5c79.js 10.1 KiB 5 [emitted]
2d761db260e810943d04.js 10.5 KiB 6 [emitted]
148bbb5ef8fd203f5c99.js 9.97 KiB 1 [emitted]
5efec1104bcbe14efad9.js 10.9 KiB 8 [emitted]
050d4b543b70cc78b255.js 9.91 KiB 9 [emitted]
2c42126f0455b98de2d0.js 12 KiB 10 [emitted]
27d8a7d99dbd33243169.js 4.2 KiB 11 [emitted]
f9403b4474b02c436f23.js 10.9 KiB 12 [emitted]
97ad3a6439b7ef8470ec.js 6.41 KiB 13 [emitted]
ed199e2ef66607136e6a.js 5.97 KiB 14 [emitted]
Entrypoint main = 97ad3a6439b7ef8470ec.js f9403b4474b02c436f23.js ed199e2ef66607136e6a.js
chunk {0} 9baaf7bc0364c2600ef8.js 46.6 KiB <{12}> <{13}> <{14}> ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
4941166276f1108dbd9a.js 14.8 KiB 7 [emitted]
fcc3ab7899c5f4f4a804.js 10.2 KiB 0 [emitted]
29f8597a02f052a18ff4.js 13.1 KiB 2 [emitted]
5c24f2f2799de4050656.js 7.86 KiB 3 [emitted]
99b999e1764afa73d5cf.js 8.13 KiB 4 [emitted]
ad7f5d164d185093947d.js 10.1 KiB 5 [emitted]
2e70eaafec9b135ac7a2.js 10.5 KiB 6 [emitted]
f735e07d950832fae165.js 9.96 KiB 1 [emitted]
f774c165bbfd93ad8d92.js 10.9 KiB 8 [emitted]
fed5b1e6468f9d0ac10b.js 9.91 KiB 9 [emitted]
0b2acbe2f173b651f308.js 12 KiB 10 [emitted]
c05b19fbca5fc0562039.js 4.21 KiB 11 [emitted]
ccc891a4461c9dfe6e6c.js 11.1 KiB 12 [emitted]
621a4a2f6b4d2e9c8ed7.js 6.46 KiB 13 [emitted]
3086a73381be557fce8b.js 5.96 KiB 14 [emitted]
Entrypoint main = 621a4a2f6b4d2e9c8ed7.js ccc891a4461c9dfe6e6c.js 3086a73381be557fce8b.js
chunk {0} fcc3ab7899c5f4f4a804.js 46.6 KiB <{12}> <{13}> <{14}> ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
24 modules
chunk {1} 148bbb5ef8fd203f5c99.js 48.2 KiB <{12}> <{13}> <{14}> ={0}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {1} f735e07d950832fae165.js 48.2 KiB <{12}> <{13}> <{14}> ={0}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
20 modules
chunk {2} cf3beff30352265c3fae.js 46.2 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {2} 29f8597a02f052a18ff4.js 46.2 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
9 modules
chunk {3} 0bc9e49d2884c20a78ae.js 48.4 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {3} 5c24f2f2799de4050656.js 48.4 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
6 modules
chunk {4} 408e20e95f946dedfdd3.js 34 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {4} 99b999e1764afa73d5cf.js 34 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
16 modules
chunk {5} 5b44ef86854beead5c79.js 44.4 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {5} ad7f5d164d185093947d.js 44.4 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
10 modules
chunk {6} 2d761db260e810943d04.js 43.3 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {6} 2e70eaafec9b135ac7a2.js 43.3 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
3 modules
chunk {7} 7a1ec67d9e4e1019836a.js 62.3 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {7} 4941166276f1108dbd9a.js 62.3 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
7 modules
chunk {8} 5efec1104bcbe14efad9.js 46.3 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={9}= [rendered] [recorded] aggressive splitted
chunk {8} f774c165bbfd93ad8d92.js 46.3 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
10 modules
chunk {9} 050d4b543b70cc78b255.js 46.9 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= [rendered] [recorded] aggressive splitted
chunk {9} fed5b1e6468f9d0ac10b.js 46.9 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
8 modules
chunk {10} 2c42126f0455b98de2d0.js 45.7 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
chunk {10} 0b2acbe2f173b651f308.js 45.7 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted
> react-dom [30] ./example.js 2:0-22
23 modules
chunk {11} 27d8a7d99dbd33243169.js 24.9 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered]
chunk {11} c05b19fbca5fc0562039.js 24.9 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered]
> react-dom [30] ./example.js 2:0-22
3 modules
chunk {12} f9403b4474b02c436f23.js 45.7 KiB ={13}= ={14}= >{0}< >{1}< >{10}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted
chunk {12} ccc891a4461c9dfe6e6c.js 45.7 KiB ={13}= ={14}= >{0}< >{1}< >{10}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted
> ./example main
9 modules
chunk {13} 97ad3a6439b7ef8470ec.js 37.8 KiB ={12}= ={14}= >{0}< >{1}< >{10}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted
chunk {13} 621a4a2f6b4d2e9c8ed7.js 37.8 KiB ={12}= ={14}= >{0}< >{1}< >{10}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted
> ./example main
8 modules
chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered]
chunk {14} 3086a73381be557fce8b.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered]
> ./example main
[30] ./example.js 44 bytes {14} [built]
+ 13 hidden modules
@ -595,7 +595,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/CSSProperty.js"
],
"size": 46843,
"hash": "987f929f287f8a6c88ac92f1fbcd45be",
"hash": "0e1d917bc78b9875c63333b0e556b853",
"id": 2
},
{
@ -610,7 +610,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/prop-types/factory.js"
],
"size": 38697,
"hash": "bc5ed8b126130fde4f428f05cac600ce",
"hash": "fa360eb6e2345a3f1eb10a9dd972c6ab",
"id": 3
},
{
@ -625,7 +625,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/DOMPropertyOperations.js"
],
"size": 47979,
"hash": "511009f3a8f06b7c54cbbcccac9d6dfb",
"hash": "e73fa83e75ca1cd020645a8ce43df014",
"id": 4
},
{
@ -641,7 +641,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react/lib/ReactDOMFactories.js"
],
"size": 46762,
"hash": "2a784b823ab0da1e02933326e6e3f80f",
"hash": "e1fabf154d567040fc9ee7969ad63ddd",
"id": 5
},
{
@ -658,7 +658,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/KeyEscapeUtils.js"
],
"size": 47455,
"hash": "0abfd767d2250ac9265a7fa790d9e9f5",
"hash": "c7a944568ed9e97283c6ae9fb8c59803",
"id": 6
},
{
@ -672,7 +672,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/ReactCompositeComponent.js"
],
"size": 63814,
"hash": "aae9c6dac629dd3f112ead84c645f3fa",
"hash": "0970c34320caae80c02a9ee83c0bfa96",
"id": 7
},
{
@ -682,7 +682,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/ReactDOMComponentFlags.js"
],
"size": 44366,
"hash": "cd98376ec90f2e366b9425f7247176e1",
"hash": "21648f333424392ec94c88e713f40f89",
"id": 8
},
{
@ -699,7 +699,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/ReactDOMTextComponent.js"
],
"size": 45476,
"hash": "a0f973cb054f411fba45bd946c5bf6e3",
"hash": "fe79c8024bca5a2710e28bfc9f97ce11",
"id": 9
},
{
@ -722,7 +722,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/ReactMarkupChecksum.js"
],
"size": 34770,
"hash": "ee6461bbec846ab2c7626a8d8fd1fb21",
"hash": "11717dc27d3f6a5dbab89e8ba4330998",
"id": 10
},
{
@ -735,7 +735,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/ReactReconcileTransaction.js"
],
"size": 49575,
"hash": "74249374b007623d16bffa559688d7d5",
"hash": "0c4ce63f0aa44b1872d5195e69fd3cb5",
"id": 11
},
{
@ -751,7 +751,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/SelectEventPlugin.js"
],
"size": 47320,
"hash": "0a6d10836900825087ce02acffa0b1c0",
"hash": "2db10d04d445e62740cf5103dd9e5633",
"id": 12
},
{
@ -778,7 +778,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/dangerousStyleValue.js"
],
"size": 49350,
"hash": "5ec04d5529f6b78241e25db6f0254a6f",
"hash": "e5fe5d02d5fea683fb6b8ff14525787b",
"id": 13
},
{
@ -809,7 +809,7 @@ chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >
"../../node_modules/react-dom/lib/traverseAllChildren.js"
],
"size": 47718,
"hash": "38a6975540caa0156886a92323a43231",
"hash": "d2aecc6eb6d7ce0cc8bbf8615d134326",
"id": 14
}
]

View File

@ -8,7 +8,7 @@ module.exports = {
// The entry points for the pages
// They also contains router
pageA: ["./aEntry", "./router"],
pageB: ["./bEntry", "./router"],
pageB: ["./bEntry", "./router"]
},
output: {
path: path.join(__dirname, "dist"),
@ -160,7 +160,7 @@ function webpackAsyncContext(req) {
}
return __webpack_require__.e(ids[1]).then(function() {
var module = __webpack_require__(ids[0]);
return (typeof module === "object" && module && module.__esModule ? module : /* fake namespace object */ { "default": module });
return (typeof module === "object" && module && module.__esModule ? module : Object.assign({/* fake namespace object */}, typeof module === "object" && module, { "default": module }));
});
}
webpackAsyncContext.keys = function webpackAsyncContextKeys() {
@ -182,7 +182,7 @@ module.exports = webpackAsyncContext;
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -287,7 +287,7 @@ module.exports = webpackAsyncContext;
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -437,13 +437,13 @@ module.exports = function() {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
bPage.chunk.js 299 bytes 0 [emitted] bPage
aPage.chunk.js 293 bytes 1 [emitted] aPage
pageA~pageB.chunk.js 2.16 KiB 2 [emitted] pageA~pageB
pageB.bundle.js 8.2 KiB 3 [emitted] pageB
pageA.bundle.js 8.2 KiB 4 [emitted] pageA
pageA~pageB.chunk.js 2.19 KiB 2 [emitted] pageA~pageB
pageB.bundle.js 8.19 KiB 3 [emitted] pageB
pageA.bundle.js 8.19 KiB 4 [emitted] pageA
Entrypoint pageA = pageA~pageB.chunk.js aPage.chunk.js pageA.bundle.js
Entrypoint pageB = pageA~pageB.chunk.js bPage.chunk.js pageB.bundle.js
chunk {0} bPage.chunk.js (bPage) 61 bytes <{1}> <{2}> <{4}> ={2}= ={3}= >{1}< [initial] [rendered] reused as split chunk (cache group: default)
@ -460,14 +460,14 @@ chunk {1} aPage.chunk.js (aPage) 61 bytes <{0}> <{2}> <{3}> ={2}= ={4}= >{0}<
[3] ./aPage.js 61 bytes {1} [built]
context element ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
cjs require ./aPage [7] ./aEntry.js 3:7-25
chunk {2} pageA~pageB.chunk.js (pageA~pageB) 970 bytes ={0}= ={1}= ={3}= ={4}= >{0}< >{1}< [initial] [rendered] split chunk (cache group: default) (name: pageA~pageB)
chunk {2} pageA~pageB.chunk.js (pageA~pageB) 952 bytes ={0}= ={1}= ={3}= ={4}= >{0}< >{1}< [initial] [rendered] split chunk (cache group: default) (name: pageA~pageB)
> pageA
> pageB
[0] ./render.js 60 bytes {2} [built]
cjs require ./render [2] ./router.js 1:13-32
cjs require ./render [4] ./bEntry.js 2:13-32
cjs require ./render [7] ./aEntry.js 2:13-32
[2] ./router.js 750 bytes {2} [built]
[2] ./router.js 732 bytes {2} [built]
single entry ./router [5] multi ./bEntry ./router pageB:100001
single entry ./router [8] multi ./aEntry ./router pageA:100001
[6] . lazy ^\.\/.*Page$ namespace object 160 bytes {2} [built]
@ -490,11 +490,11 @@ chunk {4} pageA.bundle.js (pageA) 129 bytes ={1}= ={2}= >{0}< [entry] [render
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
bPage.chunk.js 122 bytes 0 [emitted] bPage
aPage.chunk.js 123 bytes 1 [emitted] aPage
pageA~pageB.chunk.js 589 bytes 2 [emitted] pageA~pageB
pageA~pageB.chunk.js 629 bytes 2 [emitted] pageA~pageB
pageB.bundle.js 1.85 KiB 3 [emitted] pageB
pageA.bundle.js 1.85 KiB 4 [emitted] pageA
Entrypoint pageA = pageA~pageB.chunk.js aPage.chunk.js pageA.bundle.js
@ -513,14 +513,14 @@ chunk {1} aPage.chunk.js (aPage) 61 bytes <{0}> <{2}> <{3}> ={2}= ={4}= >{0}<
[3] ./aPage.js 61 bytes {1} [built]
context element ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
cjs require ./aPage [7] ./aEntry.js 3:7-25
chunk {2} pageA~pageB.chunk.js (pageA~pageB) 970 bytes ={0}= ={1}= ={3}= ={4}= >{0}< >{1}< [initial] [rendered] split chunk (cache group: default) (name: pageA~pageB)
chunk {2} pageA~pageB.chunk.js (pageA~pageB) 952 bytes ={0}= ={1}= ={3}= ={4}= >{0}< >{1}< [initial] [rendered] split chunk (cache group: default) (name: pageA~pageB)
> pageA
> pageB
[0] ./render.js 60 bytes {2} [built]
cjs require ./render [2] ./router.js 1:13-32
cjs require ./render [4] ./bEntry.js 2:13-32
cjs require ./render [7] ./aEntry.js 2:13-32
[2] ./router.js 750 bytes {2} [built]
[2] ./router.js 732 bytes {2} [built]
single entry ./router [5] multi ./bEntry ./router pageB:100001
single entry ./router [8] multi ./aEntry ./router pageA:100001
[6] . lazy ^\.\/.*Page$ namespace object 160 bytes {2} [built]

View File

@ -18,8 +18,8 @@ console.log(__("Missing Text"));
var path = require("path");
var I18nPlugin = require("i18n-webpack-plugin");
var languages = {
"en": null,
"de": require("./de.json")
en: null,
de: require("./de.json")
};
module.exports = Object.keys(languages).map(function(language) {
return {
@ -30,11 +30,7 @@ module.exports = Object.keys(languages).map(function(language) {
path: path.join(__dirname, "dist"),
filename: language + ".output.js"
},
plugins: [
new I18nPlugin(
languages[language]
)
]
plugins: [new I18nPlugin(languages[language])]
};
});
```
@ -238,7 +234,7 @@ console.log("Missing Text");
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Child en:
Hash: 0a1b2c3d4e5f6a7b8c9d
Asset Size Chunks Chunk Names
@ -266,7 +262,7 @@ Child de:
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Child en:
Hash: 0a1b2c3d4e5f6a7b8c9d
Asset Size Chunks Chunk Names

View File

@ -263,7 +263,7 @@ Prints in node.js (`enhanced-require example.js`) and in browser:
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 6.2 KiB 0 [emitted] main
Entrypoint main = output.js
@ -283,9 +283,9 @@ chunk {0} output.js (main) 2.66 KiB [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 1.53 KiB 0 [emitted] main
output.js 1.52 KiB 0 [emitted] main
Entrypoint main = output.js
chunk {0} output.js (main) 2.66 KiB [entry] [rendered]
> .\example.js main

View File

@ -63,7 +63,7 @@ require(
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -148,7 +148,7 @@ require(
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -409,10 +409,10 @@ module.exports = function() {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 1.87 KiB 0 [emitted]
output.js 9.76 KiB 1 [emitted] main
output.js 9.75 KiB 1 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 439 bytes <{1}> [rendered]
> [3] ./example.js 7:0-14:1
@ -455,7 +455,7 @@ chunk {1} output.js (main) 1.03 KiB >{0}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 606 bytes 0 [emitted]
output.js 2.04 KiB 1 [emitted] main

View File

@ -14,7 +14,6 @@ console.log("Running " + ENV + " build");
var path = require("path");
var webpack = require("../../");
module.exports = [
{
name: "mobile",
// mode: "development || "production",
@ -44,7 +43,6 @@ module.exports = [
})
]
}
];
```
@ -251,7 +249,7 @@ console.log("Running " + "mobile" + " build");
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Child mobile:
Hash: 0a1b2c3d4e5f6a7b8c9d
Asset Size Chunks Chunk Names
@ -278,7 +276,7 @@ Child desktop:
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Child mobile:
Hash: 0a1b2c3d4e5f6a7b8c9d
Asset Size Chunks Chunk Names

View File

@ -245,7 +245,7 @@ module.exports = "beta";
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
MyLibrary.alpha.js 3.16 KiB 0 [emitted] alpha
MyLibrary.beta.js 3.16 KiB 1 [emitted] beta
@ -265,7 +265,7 @@ chunk {1} MyLibrary.beta.js (beta) 24 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
MyLibrary.beta.js 828 bytes 0 [emitted] beta
MyLibrary.alpha.js 832 bytes 1 [emitted] alpha

View File

@ -111,7 +111,7 @@ module.exports = "Common";
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -216,7 +216,7 @@ module.exports = "Common";
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -334,7 +334,7 @@ __webpack_require__.e(/*! AMD require */ 0).then(function() { var __WEBPACK_AMD_
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -439,7 +439,7 @@ __webpack_require__.e(/*! AMD require */ 0).then(function() { var __WEBPACK_AMD_
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -572,11 +572,11 @@ module.exports = function(msg) {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.1
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.js 363 bytes 0 [emitted]
commons.js 267 bytes 1 [emitted] commons
pageB.js 8.02 KiB 2 [emitted] pageB
pageB.js 8.01 KiB 2 [emitted] pageB
pageA.js 8.06 KiB 3 [emitted] pageA
Entrypoint pageA = commons.js pageA.js
Entrypoint pageB = commons.js pageB.js
@ -588,8 +588,8 @@ chunk {0} 0.js 91 bytes <{1}> <{2}> <{3}> [rendered]
cjs require ./shared [2] ./pageB.js 3:14-33
amd require ./shared [3] ./pageA.js 2:0-4:2
chunk {1} commons.js (commons) 26 bytes ={2}= ={3}= >{0}< [initial] [rendered] split chunk (cache group: commons) (name: commons)
> ./pageB pageB
> ./pageA pageA
> ./pageB pageB
[1] ./common.js 26 bytes {1} [built]
cjs require ./common [0] ./shared.js 1:13-32
cjs require ./common [2] ./pageB.js 1:13-32
@ -608,7 +608,7 @@ chunk {3} pageA.js (pageA) 108 bytes ={1}= >{0}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.1
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.js 120 bytes 0 [emitted]
commons.js 95 bytes 1 [emitted] commons
@ -624,8 +624,8 @@ chunk {0} 0.js 91 bytes <{1}> <{2}> <{3}> [rendered]
cjs require ./shared [2] ./pageB.js 3:14-33
amd require ./shared [3] ./pageA.js 2:0-4:2
chunk {1} commons.js (commons) 26 bytes ={2}= ={3}= >{0}< [initial] [rendered] split chunk (cache group: commons) (name: commons)
> ./pageB pageB
> ./pageA pageA
> ./pageB pageB
[1] ./common.js 26 bytes {1} [built]
cjs require ./common [0] ./shared.js 1:13-32
cjs require ./common [2] ./pageB.js 1:13-32

View File

@ -33,7 +33,7 @@ require.ensure(["b"], function(require) {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -118,7 +118,7 @@ require.ensure(["b"], function(require) {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -326,7 +326,7 @@ __webpack_require__.e(/*! require.ensure */ 0).then((function(require) {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 463 bytes 0 [emitted]
1.output.js 677 bytes 1 [emitted] my own chunk
@ -351,11 +351,11 @@ chunk {2} output.js (main) 452 bytes >{0}< >{1}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 92 bytes 0 [emitted]
1.output.js 112 bytes 1, 0 [emitted] my own chunk
output.js 1.82 KiB 2 [emitted] main
output.js 1.81 KiB 2 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 22 bytes <{2}> [rendered]
> [3] ./example.js 17:0-20:2

View File

@ -202,7 +202,7 @@ module.exports = function() {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 4.48 KiB 0 [emitted] main
Entrypoint main = output.js
@ -227,7 +227,7 @@ chunk {0} output.js (main) 613 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 1.16 KiB 0 [emitted] main
Entrypoint main = output.js

View File

@ -146,13 +146,13 @@ module.exports = Math.random();
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 3.26 KiB 0 [emitted] main
Entrypoint main = output.js
chunk {0} output.js (main) 326 bytes [entry] [rendered]
chunk {0} output.js (main) 325 bytes [entry] [rendered]
> .\example.js main
[0] ./example.js 295 bytes {0} [built]
[0] ./example.js 294 bytes {0} [built]
single entry .\example.js main
[1] ./a.js 31 bytes {0} [built]
require.resolve ./a.js [0] ./example.js 4:10-35
@ -164,16 +164,16 @@ chunk {0} output.js (main) 326 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 667 bytes 0 [emitted] main
Entrypoint main = output.js
chunk {0} output.js (main) 326 bytes [entry] [rendered]
chunk {0} output.js (main) 325 bytes [entry] [rendered]
> .\example.js main
[0] ./a.js 31 bytes {0} [built]
require.resolve ./a.js [1] ./example.js 4:10-35
cjs require ./a [1] ./example.js 1:8-22
cjs require ./a [1] ./example.js 10:9-23
[1] ./example.js 295 bytes {0} [built]
[1] ./example.js 294 bytes {0} [built]
single entry .\example.js main
```

View File

@ -123,7 +123,7 @@ module.exports = {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -208,7 +208,7 @@ module.exports = {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -328,7 +328,7 @@ var x = "x";
\********************************/
/*! no exports provided */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/a.js because of ./node_modules/c.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shared.js because of ./node_modules/c.js */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -387,7 +387,8 @@ exports.c = "e";
\*****************************/
/*! exports provided: d, c, x, y */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/c.js because of ./node_modules/shared.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/cjs.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shared.js */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -439,9 +440,9 @@ Minimized
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 1.78 KiB 0 [emitted]
0.output.js 1.87 KiB 0 [emitted]
output.js 8.2 KiB 1 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 286 bytes <{1}> [rendered]
@ -478,7 +479,7 @@ chunk {1} output.js (main) 390 bytes >{0}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 362 bytes 0 [emitted]
output.js 1.8 KiB 1 [emitted] main

View File

@ -298,13 +298,13 @@ const c = "c";
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 7.91 KiB 0 [emitted] main
output.js 7.89 KiB 0 [emitted] main
Entrypoint main = output.js
chunk {0} output.js (main) 443 bytes [entry] [rendered]
chunk {0} output.js (main) 422 bytes [entry] [rendered]
> .\example.js main
[0] ./example.js 149 bytes {0} [built]
[0] ./example.js 140 bytes {0} [built]
[no exports]
single entry .\example.js main
+ 8 hidden modules
@ -314,16 +314,16 @@ chunk {0} output.js (main) 443 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
output.js 600 bytes 0 [emitted] main
Entrypoint main = output.js
chunk {0} output.js (main) 342 bytes [entry] [rendered]
chunk {0} output.js (main) 325 bytes [entry] [rendered]
> .\example.js main
[0] ./example.js + 6 modules 342 bytes {0} [built]
[0] ./example.js + 6 modules 325 bytes {0} [built]
[no exports]
single entry .\example.js main
| ./example.js 149 bytes [built]
| ./example.js 140 bytes [built]
| [no exports]
| single entry .\example.js main
| + 6 hidden modules

View File

@ -31,15 +31,15 @@ module.exports = [
"hidden-source-map",
"inline-source-map",
"nosources-source-map",
"source-map",
"source-map"
].map(devtool => ({
mode: "development",
entry: {
bundle: "coffee-loader!./example.coffee",
bundle: "coffee-loader!./example.coffee"
},
output: {
path: path.join(__dirname, "dist"),
filename: `./[name]-${devtool}.js`,
filename: `./[name]-${devtool}.js`
},
devtool,
optimization: {
@ -171,7 +171,7 @@ race = function() {
/*! no static exports found */
/***/ (function(module, exports) {
eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9leGFtcGxlLmNvZmZlZT85MWU1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBO0VBQUE7O0FBQUEsT0FDRTtFQUFBLE1BQVEsSUFBSSxDQUFDLElBQWI7RUFDQSxRQUFRLE1BRFI7RUFFQSxNQUFRLFNBQUMsQ0FBRDtXQUFPLElBQUksT0FBTyxDQUFQO0VBQVgsQ0FGUjs7O0FBS0YsT0FBTztBQUNMO0VBRE0sdUJBQVE7U0FDZCxNQUFNLE1BQU4sRUFBYyxPQUFkO0FBREsiLCJmaWxlIjoiMC5qcyIsInNvdXJjZXNDb250ZW50IjpbIiMgVGFrZW4gZnJvbSBodHRwOi8vY29mZmVlc2NyaXB0Lm9yZy9cclxuXHJcbiMgT2JqZWN0czpcclxubWF0aCA9XHJcbiAgcm9vdDogICBNYXRoLnNxcnRcclxuICBzcXVhcmU6IHNxdWFyZVxyXG4gIGN1YmU6ICAgKHgpIC0+IHggKiBzcXVhcmUgeFxyXG5cclxuIyBTcGxhdHM6XHJcbnJhY2UgPSAod2lubmVyLCBydW5uZXJzLi4uKSAtPlxyXG4gIHByaW50IHdpbm5lciwgcnVubmVyc1xyXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n");
eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9leGFtcGxlLmNvZmZlZT8yNDE2Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBO0VBQUE7O0FBQUEsT0FDRTtFQUFBLE1BQVEsSUFBSSxDQUFDLElBQWI7RUFDQSxRQUFRLE1BRFI7RUFFQSxNQUFRLFNBQUMsQ0FBRDtXQUFPLElBQUksT0FBTyxDQUFQO0VBQVgsQ0FGUjs7O0FBS0YsT0FBTztBQUNMO0VBRE0sdUJBQVE7U0FDZCxNQUFNLE1BQU4sRUFBYyxPQUFkO0FBREsiLCJmaWxlIjoiMC5qcyIsInNvdXJjZXNDb250ZW50IjpbIiMgVGFrZW4gZnJvbSBodHRwOi8vY29mZmVlc2NyaXB0Lm9yZy9cclxuXHJcbiMgT2JqZWN0czpcclxubWF0aCA9XHJcbiAgcm9vdDogICBNYXRoLnNxcnRcclxuICBzcXVhcmU6IHNxdWFyZVxyXG4gIGN1YmU6ICAgKHgpIC0+IHggKiBzcXVhcmUgeFxyXG5cclxuIyBTcGxhdHM6XHJcbnJhY2UgPSAod2lubmVyLCBydW5uZXJzLi4uKSAtPlxyXG4gIHByaW50IHdpbm5lciwgcnVubmVyc1xyXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n");
/***/ })
],[[0,1]]]);
@ -203,7 +203,7 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq
/*! no static exports found */
/***/ (function(module, exports) {
eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlPzA5MjciXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1hdGgsIHJhY2UsXG4gIHNsaWNlID0gW10uc2xpY2U7XG5cbm1hdGggPSB7XG4gIHJvb3Q6IE1hdGguc3FydCxcbiAgc3F1YXJlOiBzcXVhcmUsXG4gIGN1YmU6IGZ1bmN0aW9uKHgpIHtcbiAgICByZXR1cm4geCAqIHNxdWFyZSh4KTtcbiAgfVxufTtcblxucmFjZSA9IGZ1bmN0aW9uKCkge1xuICB2YXIgcnVubmVycywgd2lubmVyO1xuICB3aW5uZXIgPSBhcmd1bWVudHNbMF0sIHJ1bm5lcnMgPSAyIDw9IGFyZ3VtZW50cy5sZW5ndGggPyBzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkgOiBbXTtcbiAgcmV0dXJuIHByaW50KHdpbm5lciwgcnVubmVycyk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n");
eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlP2MxNzAiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1hdGgsIHJhY2UsXG4gIHNsaWNlID0gW10uc2xpY2U7XG5cbm1hdGggPSB7XG4gIHJvb3Q6IE1hdGguc3FydCxcbiAgc3F1YXJlOiBzcXVhcmUsXG4gIGN1YmU6IGZ1bmN0aW9uKHgpIHtcbiAgICByZXR1cm4geCAqIHNxdWFyZSh4KTtcbiAgfVxufTtcblxucmFjZSA9IGZ1bmN0aW9uKCkge1xuICB2YXIgcnVubmVycywgd2lubmVyO1xuICB3aW5uZXIgPSBhcmd1bWVudHNbMF0sIHJ1bm5lcnMgPSAyIDw9IGFyZ3VtZW50cy5sZW5ndGggPyBzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkgOiBbXTtcbiAgcmV0dXJuIHByaW50KHdpbm5lciwgcnVubmVycyk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n");
/***/ })
],[[0,1]]]);
@ -219,7 +219,7 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq
/*! no static exports found */
/***/ (function(module, exports) {
eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlPzkxZTUiXSwic291cmNlc0NvbnRlbnQiOlsiIyBUYWtlbiBmcm9tIGh0dHA6Ly9jb2ZmZWVzY3JpcHQub3JnL1xyXG5cclxuIyBPYmplY3RzOlxyXG5tYXRoID1cclxuICByb290OiAgIE1hdGguc3FydFxyXG4gIHNxdWFyZTogc3F1YXJlXHJcbiAgY3ViZTogICAoeCkgLT4geCAqIHNxdWFyZSB4XHJcblxyXG4jIFNwbGF0czpcclxucmFjZSA9ICh3aW5uZXIsIHJ1bm5lcnMuLi4pIC0+XHJcbiAgcHJpbnQgd2lubmVyLCBydW5uZXJzXHJcbiJdLCJtYXBwaW5ncyI6IkFBR0E7QUFBQTtBQUNBO0FBREE7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBOzs7QUFHQTtBQUNBO0FBREE7QUFDQTtBQURBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///0\n");
eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlPzI0MTYiXSwic291cmNlc0NvbnRlbnQiOlsiIyBUYWtlbiBmcm9tIGh0dHA6Ly9jb2ZmZWVzY3JpcHQub3JnL1xyXG5cclxuIyBPYmplY3RzOlxyXG5tYXRoID1cclxuICByb290OiAgIE1hdGguc3FydFxyXG4gIHNxdWFyZTogc3F1YXJlXHJcbiAgY3ViZTogICAoeCkgLT4geCAqIHNxdWFyZSB4XHJcblxyXG4jIFNwbGF0czpcclxucmFjZSA9ICh3aW5uZXIsIHJ1bm5lcnMuLi4pIC0+XHJcbiAgcHJpbnQgd2lubmVyLCBydW5uZXJzXHJcbiJdLCJtYXBwaW5ncyI6IkFBR0E7QUFBQTtBQUNBO0FBREE7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBOzs7QUFHQTtBQUNBO0FBREE7QUFDQTtBQURBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///0\n");
/***/ })
],[[0,1]]]);
@ -239,7 +239,7 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Child
Hash: 0a1b2c3d4e5f6a7b8c9d
Asset Size Chunks Chunk Names
@ -270,7 +270,7 @@ Child
./bundle-cheap-module-source-map.js 733 bytes 0 [emitted] bundle
./runtime~bundle-cheap-module-source-map.js 5 KiB 1 [emitted] runtime~bundle
./bundle-cheap-module-source-map.js.map 459 bytes 0 [emitted] bundle
./runtime~bundle-cheap-module-source-map.js.map 4.92 KiB 1 [emitted] runtime~bundle
./runtime~bundle-cheap-module-source-map.js.map 4.91 KiB 1 [emitted] runtime~bundle
Entrypoint bundle = ./runtime~bundle-cheap-module-source-map.js ./runtime~bundle-cheap-module-source-map.js.map ./bundle-cheap-module-source-map.js ./bundle-cheap-module-source-map.js.map
chunk {0} ./bundle-cheap-module-source-map.js, ./bundle-cheap-module-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered]
> coffee-loader!./example.coffee bundle
@ -322,7 +322,7 @@ Child
./bundle-hidden-source-map.js 674 bytes 0 [emitted] bundle
./runtime~bundle-hidden-source-map.js 4.93 KiB 1 [emitted] runtime~bundle
./bundle-hidden-source-map.js.map 556 bytes 0 [emitted] bundle
./runtime~bundle-hidden-source-map.js.map 4.96 KiB 1 [emitted] runtime~bundle
./runtime~bundle-hidden-source-map.js.map 4.95 KiB 1 [emitted] runtime~bundle
Entrypoint bundle = ./runtime~bundle-hidden-source-map.js ./runtime~bundle-hidden-source-map.js.map ./bundle-hidden-source-map.js ./bundle-hidden-source-map.js.map
chunk {0} ./bundle-hidden-source-map.js, ./bundle-hidden-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered]
> coffee-loader!./example.coffee bundle
@ -346,7 +346,7 @@ Child
Hash: 0a1b2c3d4e5f6a7b8c9d
Asset Size Chunks Chunk Names
./bundle-nosources-source-map.js 730 bytes 0 [emitted] bundle
./runtime~bundle-nosources-source-map.js 5 KiB 1 [emitted] runtime~bundle
./runtime~bundle-nosources-source-map.js 4.99 KiB 1 [emitted] runtime~bundle
./bundle-nosources-source-map.js.map 314 bytes 0 [emitted] bundle
./runtime~bundle-nosources-source-map.js.map 838 bytes 1 [emitted] runtime~bundle
Entrypoint bundle = ./runtime~bundle-nosources-source-map.js ./runtime~bundle-nosources-source-map.js.map ./bundle-nosources-source-map.js ./bundle-nosources-source-map.js.map
@ -360,7 +360,7 @@ Child
Hash: 0a1b2c3d4e5f6a7b8c9d
Asset Size Chunks Chunk Names
./bundle-source-map.js 720 bytes 0 [emitted] bundle
./runtime~bundle-source-map.js 4.99 KiB 1 [emitted] runtime~bundle
./runtime~bundle-source-map.js 4.98 KiB 1 [emitted] runtime~bundle
./bundle-source-map.js.map 549 bytes 0 [emitted] bundle
./runtime~bundle-source-map.js.map 4.95 KiB 1 [emitted] runtime~bundle
Entrypoint bundle = ./runtime~bundle-source-map.js ./runtime~bundle-source-map.js.map ./bundle-source-map.js ./bundle-source-map.js.map

View File

@ -373,7 +373,7 @@ __webpack_require__(/*! ./vendor2 */ 3);
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
vendor1.js 2.99 KiB 0 [emitted] vendor1
vendor2.js 3.25 KiB 1 [emitted] vendor2
@ -429,7 +429,7 @@ chunk {4} pageC.js (pageC) 25 bytes [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
pageC.js 569 bytes 0 [emitted] pageC
pageB.js 569 bytes 1 [emitted] pageB

View File

@ -62,7 +62,7 @@ export function fibonacciJavascript(i) {
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/ var moreModules = data[1];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
@ -150,7 +150,7 @@ export function fibonacciJavascript(i) {
/******/ var script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120000;
/******/ script.timeout = 120;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
@ -190,7 +190,7 @@ export function fibonacciJavascript(i) {
/******/
/******/ // a Promise means "currently loading" or "already loaded".
/******/ promises.push(installedWasmModuleData ||
/******/ (installedWasmModules[wasmModuleId] = fetch(__webpack_require__.p + "" + {"1":"9c8c5b45b5c12888e105","3":"62df68d96f4aa17e7b77","4":"e5003c8310987c008228"}[wasmModuleId] + ".wasm").then(function(response) {
/******/ (installedWasmModules[wasmModuleId] = fetch(__webpack_require__.p + "" + {"1":"10451bbb346a73db7ba4","3":"beb1e34c200b5c9a59c2","4":"c5fc17f4396c56397ea0"}[wasmModuleId] + ".wasm").then(function(response) {
/******/ if(WebAssembly.compileStreaming) {
/******/ return WebAssembly.compileStreaming(response);
/******/ } else {
@ -430,23 +430,23 @@ module.exports = instance.exports;
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 2.88 KiB 0 [emitted]
9c8c5b45b5c12888e105.wasm 41 bytes 0, 1 [emitted]
62df68d96f4aa17e7b77.wasm 67 bytes 0 [emitted]
e5003c8310987c008228.wasm 62 bytes 0 [emitted]
0.output.js 2.86 KiB 0 [emitted]
10451bbb346a73db7ba4.wasm 41 bytes 0, 1 [emitted]
beb1e34c200b5c9a59c2.wasm 67 bytes 0 [emitted]
c5fc17f4396c56397ea0.wasm 62 bytes 0 [emitted]
1.output.js 462 bytes 1 [emitted]
output.js 8.91 KiB 2 [emitted] main
output.js 8.88 KiB 2 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js, 9c8c5b45b5c12888e105.wasm, 62df68d96f4aa17e7b77.wasm, e5003c8310987c008228.wasm 585 bytes <{2}> [rendered]
chunk {0} 0.output.js, 10451bbb346a73db7ba4.wasm, beb1e34c200b5c9a59c2.wasm, c5fc17f4396c56397ea0.wasm 570 bytes <{2}> [rendered]
> ./math [0] ./example.js 3:1-17
[1] ./add.wasm 41 bytes {0} {1} [built]
[exports: add]
import() ./add.wasm [0] ./example.js 1:0-20
harmony side effect evaluation ./add.wasm [2] ./math.js 1:0-33
harmony export imported specifier ./add.wasm [2] ./math.js 5:0-37
[2] ./math.js 415 bytes {0} [built]
[2] ./math.js 400 bytes {0} [built]
[exports: add, factorial, fibonacci, factorialJavascript, fibonacciJavascript]
import() ./math [0] ./example.js 3:1-17
[3] ./fibonacci.wasm 67 bytes {0} [built]
@ -457,16 +457,16 @@ chunk {0} 0.output.js, 9c8c5b45b5c12888e105.wasm, 62df68d96f4aa17e7b77.wasm,
[exports: factorial]
harmony side effect evaluation ./factorial.wasm [2] ./math.js 2:0-45
harmony export imported specifier ./factorial.wasm [2] ./math.js 5:0-37
chunk {1} 1.output.js, 9c8c5b45b5c12888e105.wasm 41 bytes <{2}> [rendered]
chunk {1} 1.output.js, 10451bbb346a73db7ba4.wasm 41 bytes <{2}> [rendered]
> ./add.wasm [0] ./example.js 1:0-20
[1] ./add.wasm 41 bytes {0} {1} [built]
[exports: add]
import() ./add.wasm [0] ./example.js 1:0-20
harmony side effect evaluation ./add.wasm [2] ./math.js 1:0-33
harmony export imported specifier ./add.wasm [2] ./math.js 5:0-37
chunk {2} output.js (main) 788 bytes >{0}< >{1}< [entry] [rendered]
chunk {2} output.js (main) 762 bytes >{0}< >{1}< [entry] [rendered]
> .\example.js main
[0] ./example.js 788 bytes {2} [built]
[0] ./example.js 762 bytes {2} [built]
single entry .\example.js main
```
@ -474,23 +474,23 @@ chunk {2} output.js (main) 788 bytes >{0}< >{1}< [entry] [rendered]
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.output.js 722 bytes 0, 1 [emitted]
fb3978ee17c3b5162f77.wasm 41 bytes 0, 1, 1 [emitted]
11be07941949e929b309.wasm 67 bytes 0, 1 [emitted]
e231a41fda9732bd5556.wasm 62 bytes 0, 1 [emitted]
eb1f6af9b64293fb7fc2.wasm 41 bytes 0, 1, 1 [emitted]
b7c936b08f2cdab3e74d.wasm 67 bytes 0, 1 [emitted]
d24ec18257dff3c36d2f.wasm 62 bytes 0, 1 [emitted]
1.output.js 155 bytes 1 [emitted]
output.js 2.52 KiB 2 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js, fb3978ee17c3b5162f77.wasm, 11be07941949e929b309.wasm, e231a41fda9732bd5556.wasm 585 bytes <{2}> [rendered]
chunk {0} 0.output.js, eb1f6af9b64293fb7fc2.wasm, b7c936b08f2cdab3e74d.wasm, d24ec18257dff3c36d2f.wasm 570 bytes <{2}> [rendered]
> ./math [0] ./example.js 3:1-17
[1] ./add.wasm 41 bytes {0} {1} [built]
[exports: add]
import() ./add.wasm [0] ./example.js 1:0-20
harmony side effect evaluation ./add.wasm [2] ./math.js 1:0-33
harmony export imported specifier ./add.wasm [2] ./math.js 5:0-37
[2] ./math.js 415 bytes {0} [built]
[2] ./math.js 400 bytes {0} [built]
[exports: add, factorial, fibonacci, factorialJavascript, fibonacciJavascript]
import() ./math [0] ./example.js 3:1-17
[3] ./fibonacci.wasm 67 bytes {0} [built]
@ -503,15 +503,15 @@ chunk {0} 0.output.js, fb3978ee17c3b5162f77.wasm, 11be07941949e929b309.wasm,
[only some exports used: factorial]
harmony side effect evaluation ./factorial.wasm [2] ./math.js 2:0-45
harmony export imported specifier ./factorial.wasm [2] ./math.js 5:0-37
chunk {1} 1.output.js, fb3978ee17c3b5162f77.wasm 41 bytes <{2}> [rendered]
chunk {1} 1.output.js, eb1f6af9b64293fb7fc2.wasm 41 bytes <{2}> [rendered]
> ./add.wasm [0] ./example.js 1:0-20
[1] ./add.wasm 41 bytes {0} {1} [built]
[exports: add]
import() ./add.wasm [0] ./example.js 1:0-20
harmony side effect evaluation ./add.wasm [2] ./math.js 1:0-33
harmony export imported specifier ./add.wasm [2] ./math.js 5:0-37
chunk {2} output.js (main) 788 bytes >{0}< >{1}< [entry] [rendered]
chunk {2} output.js (main) 762 bytes >{0}< >{1}< [entry] [rendered]
> .\example.js main
[0] ./example.js 788 bytes {2} [built]
[0] ./example.js 762 bytes {2} [built]
single entry .\example.js main
```

View File

@ -343,17 +343,17 @@ module.exports = function() {
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.hash.worker.js 1.82 KiB [emitted]
hash.worker.js 4.02 KiB [emitted]
output.js 3.46 KiB 0 [emitted] main
Entrypoint main = output.js
chunk {0} output.js (main) 332 bytes [entry] [rendered]
chunk {0} output.js (main) 326 bytes [entry] [rendered]
> .\example.js main
[0] (webpack)/node_modules/worker-loader/dist/cjs.js?name=hash.worker.js!./worker.js 97 bytes {0} [not cacheable] [built]
cjs require worker-loader?name=hash.worker.js!./worker [1] ./example.js 1:13-66
[1] ./example.js 235 bytes {0} [built]
[1] ./example.js 229 bytes {0} [built]
single entry .\example.js main
Child worker:
Asset Size Chunks Chunk Names
@ -383,17 +383,17 @@ Child worker:
```
Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 4.0.0-beta.2
Version: webpack 4.5.0
Asset Size Chunks Chunk Names
0.hash.worker.js 594 bytes [emitted]
hash.worker.js 919 bytes [emitted]
output.js 697 bytes 0 [emitted] main
Entrypoint main = output.js
chunk {0} output.js (main) 332 bytes [entry] [rendered]
chunk {0} output.js (main) 326 bytes [entry] [rendered]
> .\example.js main
[0] (webpack)/node_modules/worker-loader/dist/cjs.js?name=hash.worker.js!./worker.js 97 bytes {0} [not cacheable] [built]
cjs require worker-loader?name=hash.worker.js!./worker [1] ./example.js 1:13-66
[1] ./example.js 235 bytes {0} [built]
[1] ./example.js 229 bytes {0} [built]
single entry .\example.js main
Child worker:
Asset Size Chunks Chunk Names

View File

@ -1,8 +0,0 @@
{
"env": {
"node": true
},
"rules": {
"node/exports-style": ["off"]
}
}

View File

@ -6,15 +6,28 @@
const DependenciesBlock = require("./DependenciesBlock");
module.exports = class AsyncDependenciesBlock extends DependenciesBlock {
constructor(name, module, loc, request) {
constructor(groupOptions, module, loc, request) {
super();
this.chunkName = name;
if (typeof groupOptions === "string") {
groupOptions = { name: groupOptions };
} else if (!groupOptions) {
groupOptions = { name: undefined };
}
this.groupOptions = groupOptions;
this.chunkGroup = undefined;
this.module = module;
this.loc = loc;
this.request = request;
}
get chunkName() {
return this.groupOptions.name;
}
set chunkName(value) {
this.groupOptions.name = value;
}
get chunks() {
throw new Error("Moved to AsyncDependenciesBlock.chunkGroup");
}
@ -24,7 +37,7 @@ module.exports = class AsyncDependenciesBlock extends DependenciesBlock {
}
updateHash(hash) {
hash.update(this.chunkName || "");
hash.update(JSON.stringify(this.groupOptions));
hash.update(
(this.chunkGroup &&
this.chunkGroup.chunks

View File

@ -6,6 +6,7 @@
const util = require("util");
const SortableSet = require("./util/SortableSet");
const intersect = require("./util/SetHelpers").intersect;
const GraphHelpers = require("./GraphHelpers");
let debugId = 1000;
const ERR_CHUNK_ENTRY = "Chunk.entry was removed. Use hasRuntime()";
@ -170,8 +171,8 @@ class Chunk {
if (aItem.done) return 0;
const aModuleIdentifier = aItem.value.identifier();
const bModuleIdentifier = bItem.value.identifier();
if (aModuleIdentifier > bModuleIdentifier) return -1;
if (aModuleIdentifier < bModuleIdentifier) return 1;
if (aModuleIdentifier < bModuleIdentifier) return -1;
if (aModuleIdentifier > bModuleIdentifier) return 1;
}
}
@ -321,12 +322,15 @@ class Chunk {
}
getAllAsyncChunks() {
const initialChunks = new Set();
const queue = new Set(this.groupsIterable);
const queue = new Set();
const chunks = new Set();
for (const chunkGroup of queue) {
for (const chunk of chunkGroup.chunks) initialChunks.add(chunk);
const initialChunks = intersect(
Array.from(this.groupsIterable, g => new Set(g.chunks))
);
for (const chunkGroup of this.groupsIterable) {
for (const child of chunkGroup.childrenIterable) queue.add(child);
}
for (const chunkGroup of queue) {
@ -361,6 +365,62 @@ class Chunk {
};
}
getChildIdsByOrders() {
const lists = new Map();
for (const group of this.groupsIterable) {
if (group.chunks[group.chunks.length - 1] === this) {
for (const childGroup of group.childrenIterable) {
// TODO webpack 5 remove this check for options
if (typeof childGroup.options === "object") {
for (const key of Object.keys(childGroup.options)) {
if (key.endsWith("Order")) {
const name = key.substr(0, key.length - "Order".length);
let list = lists.get(name);
if (list === undefined) lists.set(name, (list = []));
list.push({
order: childGroup.options[key],
group: childGroup
});
}
}
}
}
}
}
const result = Object.create(null);
for (const [name, list] of lists) {
list.sort((a, b) => {
const cmp = b.order - a.order;
if (cmp !== 0) return cmp;
// TOOD webpack 5 remove this check of compareTo
if (a.group.compareTo) return a.group.compareTo(b.group);
return 0;
});
result[name] = Array.from(
list.reduce((set, item) => {
for (const chunk of item.group.chunks) set.add(chunk.id);
return set;
}, new Set())
);
}
return result;
}
getChildIdsByOrdersMap() {
const chunkMaps = Object.create(null);
for (const chunk of this.getAllAsyncChunks()) {
const data = chunk.getChildIdsByOrders();
for (const key of Object.keys(data)) {
let chunkMap = chunkMaps[key];
if (chunkMap === undefined)
chunkMaps[key] = chunkMap = Object.create(null);
chunkMap[chunk.id] = data[key];
}
}
return chunkMaps;
}
getChunkModuleMaps(filterFn) {
const chunkModuleIdMap = Object.create(null);
const chunkModuleHashMap = Object.create(null);

View File

@ -26,9 +26,14 @@ const sortOrigin = (a, b) => {
};
class ChunkGroup {
constructor(name) {
constructor(options) {
if (typeof options === "string") {
options = { name: options };
} else if (!options) {
options = { name: undefined };
}
this.groupDebugId = debugId++;
this.name = name;
this.options = options;
this._children = new SortableSet(undefined, sortById);
this._parents = new SortableSet(undefined, sortById);
this._blocks = new SortableSet();
@ -36,6 +41,30 @@ class ChunkGroup {
this.origins = [];
}
addOptions(options) {
for (const key of Object.keys(options)) {
if (this.options[key] === undefined) {
this.options[key] = options[key];
} else if (this.options[key] !== options[key]) {
if (key.endsWith("Order")) {
this.options[key] = Math.max(this.options[key], options[key]);
} else {
throw new Error(
`ChunkGroup.addOptions: No option merge strategy for ${key}`
);
}
}
}
}
get name() {
return this.options.name;
}
set name(value) {
this.options.name = value;
}
/* istanbul ignore next */
get debugId() {
return Array.from(this.chunks, x => x.debugId).join("+");
@ -222,6 +251,18 @@ class ChunkGroup {
return false;
}
getFiles() {
const files = new Set();
for (const chunk of this.chunks) {
for (const file of chunk.files) {
files.add(file);
}
}
return Array.from(files);
}
remove(reason) {
// cleanup parents
for (const parentChunkGroup of this._parents) {
@ -269,6 +310,53 @@ class ChunkGroup {
this._children.sort();
}
compareTo(otherGroup) {
if (this.chunks.length > otherGroup.chunks.length) return -1;
if (this.chunks.length < otherGroup.chunks.length) return 1;
const a = this.chunks[Symbol.iterator]();
const b = otherGroup.chunks[Symbol.iterator]();
// eslint-disable-next-line
while (true) {
const aItem = a.next();
const bItem = b.next();
if (aItem.done) return 0;
const cmp = aItem.value.compareTo(bItem.value);
if (cmp !== 0) return cmp;
}
}
getChildrenByOrders() {
const lists = new Map();
for (const childGroup of this._children) {
// TODO webpack 5 remove this check for options
if (typeof childGroup.options === "object") {
for (const key of Object.keys(childGroup.options)) {
if (key.endsWith("Order")) {
const name = key.substr(0, key.length - "Order".length);
let list = lists.get(name);
if (list === undefined) lists.set(name, (list = []));
list.push({
order: childGroup.options[key],
group: childGroup
});
}
}
}
}
const result = Object.create(null);
for (const [name, list] of lists) {
list.sort((a, b) => {
const cmp = b.order - a.order;
if (cmp !== 0) return cmp;
// TOOD webpack 5 remove this check of compareTo
if (a.group.compareTo) return a.group.compareTo(b.group);
return 0;
});
result[name] = list.map(i => i.group);
}
return result;
}
checkConstraints() {
const chunk = this;
for (const child of chunk._children) {

View File

@ -62,6 +62,14 @@ const byIndexOrIdentifier = (a, b) => {
return 0;
};
const byNameOrHash = (a, b) => {
if (a.name < b.name) return -1;
if (a.name > b.name) return 1;
if (a.fullHash < b.fullHash) return -1;
if (a.fullhash > b.fullHash) return 1;
return 0;
};
const iterationBlockVariable = (variables, fn) => {
for (
let indexVariable = 0;
@ -200,6 +208,7 @@ class Compilation extends Tapable {
break;
}
});
this.name = undefined;
this.compiler = compiler;
this.resolverFactory = compiler.resolverFactory;
this.inputFileSystem = compiler.inputFileSystem;
@ -456,9 +465,8 @@ class Compilation extends Tapable {
recursive,
callback
) {
let _this = this;
const start = _this.profile && Date.now();
const currentProfile = _this.profile && {};
const start = this.profile && Date.now();
const currentProfile = this.profile && {};
asyncLib.forEach(
dependencies,
@ -467,7 +475,7 @@ class Compilation extends Tapable {
const errorAndCallback = err => {
err.origin = module;
_this.errors.push(err);
this.errors.push(err);
if (bail) {
callback(err);
} else {
@ -476,28 +484,24 @@ class Compilation extends Tapable {
};
const warningAndCallback = err => {
err.origin = module;
_this.warnings.push(err);
this.warnings.push(err);
callback();
};
const semaphore = _this.semaphore;
const semaphore = this.semaphore;
semaphore.acquire(() => {
if (_this === null) return semaphore.release();
const factory = item.factory;
factory.create(
{
contextInfo: {
issuer: module.nameForCondition && module.nameForCondition(),
compiler: _this.compiler.name
compiler: this.compiler.name
},
resolveOptions: module.resolveOptions,
context: module.context,
dependencies: dependencies
},
(err, dependentModule) => {
if (_this === null) return semaphore.release();
let afterFactory;
const isOptional = () => {
@ -535,7 +539,7 @@ class Compilation extends Tapable {
}
};
const addModuleResult = _this.addModule(
const addModuleResult = this.addModule(
dependentModule,
cacheGroup
);
@ -549,7 +553,7 @@ class Compilation extends Tapable {
}
if (recursive && addModuleResult.dependencies) {
_this.processModuleDependencies(dependentModule, callback);
this.processModuleDependencies(dependentModule, callback);
} else {
return callback();
}
@ -562,7 +566,7 @@ class Compilation extends Tapable {
dependentModule.issuer = module;
} else {
if (_this.profile) {
if (this.profile) {
if (module.profile) {
const time = Date.now() - start;
if (
@ -576,14 +580,12 @@ class Compilation extends Tapable {
}
if (addModuleResult.build) {
_this.buildModule(
this.buildModule(
dependentModule,
isOptional(),
module,
dependencies,
err => {
if (_this === null) return semaphore.release();
if (err) {
semaphore.release();
return errorOrWarningAndCallback(err);
@ -600,7 +602,7 @@ class Compilation extends Tapable {
);
} else {
semaphore.release();
_this.waitForBuildingFinished(dependentModule, afterBuild);
this.waitForBuildingFinished(dependentModule, afterBuild);
}
}
);
@ -1004,17 +1006,22 @@ class Compilation extends Tapable {
}
}
addChunkInGroup(name, module, loc, request) {
addChunkInGroup(groupOptions, module, loc, request) {
if (typeof groupOptions === "string") {
groupOptions = { name: groupOptions };
}
const name = groupOptions.name;
if (name) {
const chunkGroup = this.namedChunkGroups.get(name);
if (chunkGroup !== undefined) {
chunkGroup.addOptions(groupOptions);
if (module) {
chunkGroup.addOrigin(module, loc, request);
}
return chunkGroup;
}
}
const chunkGroup = new ChunkGroup(name);
const chunkGroup = new ChunkGroup(groupOptions);
if (module) chunkGroup.addOrigin(module, loc, request);
const chunk = this.addChunk(name);
@ -1043,15 +1050,13 @@ class Compilation extends Tapable {
}
assignIndex(module) {
const _this = this;
const assignIndexToModule = module => {
// enter module
if (typeof module.index !== "number") {
module.index = _this.nextFreeModuleIndex++;
module.index = this.nextFreeModuleIndex++;
// leave module
queue.push(() => (module.index2 = _this.nextFreeModuleIndex2++));
queue.push(() => (module.index2 = this.nextFreeModuleIndex2++));
// enter it as block
assignIndexToDependencyBlock(module);
@ -1190,11 +1195,18 @@ class Compilation extends Tapable {
);
c = chunkGroup;
} else {
c = this.addChunkInGroup(b.chunkName, module, b.loc, b.request);
c = this.addChunkInGroup(
b.groupOptions || b.chunkName,
module,
b.loc,
b.request
);
blockChunkGroups.set(b, c);
allCreatedChunkGroups.add(c);
}
} else {
// TODO webpack 5 remove addOptions check
if (c.addOptions) c.addOptions(b.groupOptions);
c.addOrigin(module, b.loc, b.request);
}
@ -1594,6 +1606,7 @@ class Compilation extends Tapable {
this.errors.sort(byMessage);
this.warnings.sort(byMessage);
this.children.sort(byNameOrHash);
}
summarizeDependencies() {
@ -1678,7 +1691,7 @@ class Compilation extends Tapable {
const bEntry = b.hasRuntime();
if (aEntry && !bEntry) return 1;
if (!aEntry && bEntry) return -1;
return 0;
return byId(a, b);
});
for (let i = 0; i < chunks.length; i++) {
const chunk = chunks[i];

View File

@ -74,6 +74,8 @@ class Compiler extends Tapable {
}
});
this.name = undefined;
this.parentCompilation = undefined;
this.outputPath = "";
this.outputFileSystem = null;
this.inputFileSystem = null;

View File

@ -12,7 +12,7 @@ const Template = require("./Template");
class ContextModule extends Module {
// type ContextMode = "sync" | "eager" | "weak" | "async-weak" | "lazy" | "lazy-once"
// type ContextOptions = { resource: string, recursive: boolean, regExp: RegExp, addon?: string, mode?: ContextMode, chunkName?: string, include?: RegExp, exclude?: RegExp }
// type ContextOptions = { resource: string, recursive: boolean, regExp: RegExp, addon?: string, mode?: ContextMode, chunkName?: string, include?: RegExp, exclude?: RegExp, groupOptions?: Object }
// resolveDependencies: (fs: FS, options: ContextOptions, (err: Error?, dependencies: Dependency[]) => void) => void
// options: ContextOptions
constructor(resolveDependencies, options) {
@ -81,6 +81,11 @@ class ContextModule extends Module {
if (this.options.regExp) identifier += ` ${this.options.regExp}`;
if (this.options.include) identifier += ` include: ${this.options.include}`;
if (this.options.exclude) identifier += ` exclude: ${this.options.exclude}`;
if (this.options.groupOptions) {
identifier += ` groupOptions: ${JSON.stringify(
this.options.groupOptions
)}`;
}
if (this.options.namespaceObject === "strict")
identifier += " strict namespace object";
else if (this.options.namespaceObject) identifier += " namespace object";
@ -106,6 +111,11 @@ class ContextModule extends Module {
identifier += ` include: ${this.prettyRegExp(this.options.include + "")}`;
if (this.options.exclude)
identifier += ` exclude: ${this.prettyRegExp(this.options.exclude + "")}`;
if (this.options.groupOptions) {
const groupOptions = this.options.groupOptions;
for (const key of Object.keys(groupOptions))
identifier += ` ${key}: ${groupOptions[key]}`;
}
if (this.options.namespaceObject === "strict")
identifier += " strict namespace object";
else if (this.options.namespaceObject) identifier += " namespace object";
@ -170,7 +180,9 @@ class ContextModule extends Module {
// and add that block to this context
if (dependencies.length > 0) {
const block = new AsyncDependenciesBlock(
this.options.chunkName,
Object.assign({}, this.options.groupOptions, {
name: this.options.chunkName
}),
this
);
for (const dep of dependencies) {
@ -202,7 +214,9 @@ class ContextModule extends Module {
);
}
const block = new AsyncDependenciesBlock(
chunkName,
Object.assign({}, this.options.groupOptions, {
name: chunkName
}),
dep.module,
dep.loc,
dep.userRequest

View File

@ -3,7 +3,9 @@
Author Tobias Koppers @sokra
*/
"use strict";
const compareLocations = require("./compareLocations");
const DependencyReference = require("./dependencies/DependencyReference");
class Dependency {
constructor() {
@ -20,11 +22,7 @@ class Dependency {
// Returns the referenced module and export
getReference() {
if (!this.module) return null;
return {
module: this.module,
weak: this.weak,
importedNames: true // true: full object, false: only sideeffects/no export, array of strings: the exports with this names
};
return new DependencyReference(this.module, true, this.weak);
}
// Returns the exported names

View File

@ -16,18 +16,6 @@ class Entrypoint extends ChunkGroup {
return true;
}
getFiles() {
const files = new Set();
for (const chunk of this.chunks) {
for (const file of chunk.files) {
files.add(file);
}
}
return Array.from(files);
}
setRuntimeChunk(chunk) {
this.runtimeChunk = chunk;
}

View File

@ -6,6 +6,7 @@
const { RawSource } = require("webpack-sources");
const ModuleFilenameHelpers = require("./ModuleFilenameHelpers");
const cache = new WeakMap();
class EvalDevToolModuleTemplatePlugin {

View File

@ -7,6 +7,8 @@
const { RawSource } = require("webpack-sources");
const ModuleFilenameHelpers = require("./ModuleFilenameHelpers");
const cache = new WeakMap();
class EvalSourceMapDevToolModuleTemplatePlugin {
constructor(compilation, options) {
this.compilation = compilation;
@ -29,12 +31,16 @@ class EvalSourceMapDevToolModuleTemplatePlugin {
moduleTemplate.hooks.module.tap(
"EvalSourceMapDevToolModuleTemplatePlugin",
(source, module) => {
if (source.__EvalSourceMapDevToolData)
return source.__EvalSourceMapDevToolData;
const cachedSource = cache.get(source);
if (cachedSource !== undefined) {
return cachedSource;
}
if (!matchModule(module.resource)) {
return source;
}
/** @type {{ [key: string]: any; }} */
let sourceMap;
let content;
if (source.sourceAndMap) {
@ -87,10 +93,14 @@ class EvalSourceMapDevToolModuleTemplatePlugin {
"utf8"
).toString("base64")}`
) + `\n//# sourceURL=webpack-internal:///${module.id}\n`; // workaround for chrome bug
source.__EvalSourceMapDevToolData = new RawSource(
const evalSource = new RawSource(
`eval(${JSON.stringify(content + footer)});`
);
return source.__EvalSourceMapDevToolData;
cache.set(source, evalSource);
return evalSource;
}
);
moduleTemplate.hooks.hash.tap(

View File

@ -7,10 +7,6 @@
const FunctionModuleTemplatePlugin = require("./FunctionModuleTemplatePlugin");
class FunctionModulePlugin {
constructor(options) {
this.options = options;
}
apply(compiler) {
compiler.hooks.compilation.tap("FunctionModulePlugin", compilation => {
new FunctionModuleTemplatePlugin().apply(

View File

@ -0,0 +1,18 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const WebpackError = require("./WebpackError");
module.exports = class HarmonyLinkingError extends WebpackError {
/** @param {string} message Error message */
constructor(message) {
super();
this.name = "HarmonyLinkingError";
this.message = message;
this.hideStack = true;
Error.captureStackTrace(this, this.constructor);
}
};

View File

@ -362,6 +362,7 @@ module.exports = function() {
for (var id in hotUpdate) {
if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
moduleId = toModuleId(id);
/** @type {any} */
var result;
if (hotUpdate[id]) {
result = getAffectedStuff(moduleId);
@ -371,6 +372,7 @@ module.exports = function() {
moduleId: id
};
}
/** @type {Error|false} */
var abortError = false;
var doApply = false;
var doDispose = false;

View File

@ -145,8 +145,8 @@ module.exports = class HotModuleReplacementPlugin {
h: compilation.hash,
c: {}
};
for (let chunkId of Object.keys(records.chunkHashs)) {
chunkId = isNaN(+chunkId) ? chunkId : +chunkId;
for (const key of Object.keys(records.chunkHashs)) {
const chunkId = isNaN(+key) ? key : +key;
const currentChunk = compilation.chunks.find(
chunk => chunk.id === chunkId
);
@ -343,13 +343,17 @@ module.exports = class HotModuleReplacementPlugin {
parser.state.module.addDependency(dep);
requests.push(request);
});
if (expr.arguments.length > 1)
if (expr.arguments.length > 1) {
parser.hooks.hotAcceptCallback.call(
expr.arguments[1],
requests
);
else
parser.walkExpression(expr.arguments[1]); // other args are ignored
return true;
} else {
parser.hooks.hotAcceptWithoutCallback.call(expr, requests);
return true;
}
}
}
});

16
lib/HotUpdateChunk.js Normal file
View File

@ -0,0 +1,16 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Chunk = require("./Chunk");
class HotUpdateChunk extends Chunk {
constructor() {
super();
this.removedModules = undefined;
}
}
module.exports = HotUpdateChunk;

View File

@ -5,7 +5,7 @@
"use strict";
const Template = require("./Template");
const Chunk = require("./Chunk");
const HotUpdateChunk = require("./HotUpdateChunk");
const { Tapable, SyncWaterfallHook, SyncHook } = require("tapable");
module.exports = class HotUpdateChunkTemplate extends Tapable {
@ -41,7 +41,7 @@ module.exports = class HotUpdateChunkTemplate extends Tapable {
moduleTemplate,
dependencyTemplates
) {
const hotUpdateChunk = new Chunk();
const hotUpdateChunk = new HotUpdateChunk();
hotUpdateChunk.id = id;
hotUpdateChunk.setModules(modules);
hotUpdateChunk.removedModules = removedModules;

View File

@ -11,6 +11,10 @@ const ModuleReason = require("./ModuleReason");
const SortableSet = require("./util/SortableSet");
const Template = require("./Template");
/** @typedef {typeof import("./Chunk")} Chunk */
/** @typedef {typeof import("./RequestShortener")} RequestShortener */
const EMPTY_RESOLVE_OPTIONS = {};
let debugId = 1000;
@ -23,51 +27,79 @@ const sortByDebugId = (a, b) => {
return a.debugId - b.debugId;
};
/** @typedef {(requestShortener: RequestShortener) => string} OptimizationBailoutFunction */
class Module extends DependenciesBlock {
constructor(type, context = null) {
super();
/** @type {string} */
this.type = type;
/** @type {string} */
this.context = context;
// Unique Id
/** @type {number} */
this.debugId = debugId++;
// Hash
/** @type {string} */
this.hash = undefined;
/** @type {string} */
this.renderedHash = undefined;
// Info from Factory
/** @type {object} */
this.resolveOptions = EMPTY_RESOLVE_OPTIONS;
/** @type {object} */
this.factoryMeta = {};
// Info from Build
/** @type {Error[]} */
this.warnings = [];
/** @type {Error[]} */
this.errors = [];
/** @type {object} */
this.buildMeta = undefined;
/** @type {object} */
this.buildInfo = undefined;
// Graph (per Compilation)
/** @type {ModuleReason[]} */
this.reasons = [];
/** @type {SortableSet} */
this._chunks = new SortableSet(undefined, sortById);
// Info from Compilation (per Compilation)
/** @type {number | string} */
this.id = null;
/** @type {number} */
this.index = null;
/** @type {number} */
this.index2 = null;
/** @type {number} */
this.depth = null;
/** @type {Module} */
this.issuer = null;
/** @type {undefined | object} */
this.profile = undefined;
/** @type {boolean} */
this.prefetched = false;
/** @type {boolean} */
this.built = false;
// Info from Optimization (per Compilation)
/** @type {null | boolean} */
this.used = null;
/** @type {false | true | string[]} */
this.usedExports = null;
/** @type {(string | OptimizationBailoutFunction)[]} */
this.optimizationBailout = [];
// delayed operations
/** @type {undefined | {oldChunk: Chunk, newChunks: Chunk[]}[] } */
this._rewriteChunkInReasons = undefined;
/** @type {boolean} */
this.useSourceMap = false;
}

View File

@ -61,8 +61,6 @@ class NonErrorEmittedError extends WebpackError {
}
}
const dependencyTemplatesHashMap = new WeakMap();
class NormalModule extends Module {
constructor({
type,
@ -156,7 +154,9 @@ class NormalModule extends Module {
this.errors.push(new ModuleError(this, error));
},
exec: (code, filename) => {
// @ts-ignore Argument of type 'this' is not assignable to parameter of type 'Module'.
const module = new NativeModule(filename, this);
// @ts-ignore _nodeModulePaths is deprecated and undocumented Node.js API
module.paths = NativeModule._nodeModulePaths(this.context);
module.filename = filename;
module._compile(code, filename);
@ -399,7 +399,7 @@ class NormalModule extends Module {
}
getHashDigest(dependencyTemplates) {
let dtHash = dependencyTemplatesHashMap.get("hash");
let dtHash = dependencyTemplates.get("hash");
return `${this.hash}-${dtHash}`;
}

View File

@ -31,19 +31,17 @@ const loaderToIdent = data => {
const identToLoaderRequest = resultString => {
const idx = resultString.indexOf("?");
let options;
if (idx >= 0) {
options = resultString.substr(idx + 1);
resultString = resultString.substr(0, idx);
const loader = resultString.substr(0, idx);
const options = resultString.substr(idx + 1);
return {
loader: resultString,
loader,
options
};
} else {
return {
loader: resultString
loader: resultString,
options: undefined
};
}
};

View File

@ -1060,9 +1060,10 @@ class Parser extends Tapable {
}
walkFunctionDeclaration(statement) {
const wasTopLevel = this.scope.topLevelScope;
this.scope.topLevelScope = false;
for (const param of statement.params) this.walkPattern(param);
this.inScope(statement.params, () => {
this.scope.topLevelScope = false;
if (statement.body.type === "BlockStatement") {
this.detectStrictMode(statement.body.body);
this.prewalkStatement(statement.body);
@ -1071,6 +1072,7 @@ class Parser extends Tapable {
this.walkExpression(statement.body);
}
});
this.scope.topLevelScope = wasTopLevel;
}
prewalkImportDeclaration(statement) {
@ -1465,9 +1467,10 @@ class Parser extends Tapable {
}
walkFunctionExpression(expression) {
const wasTopLevel = this.scope.topLevelScope;
this.scope.topLevelScope = false;
for (const param of expression.params) this.walkPattern(param);
this.inScope(expression.params, () => {
this.scope.topLevelScope = false;
if (expression.body.type === "BlockStatement") {
this.detectStrictMode(expression.body.body);
this.prewalkStatement(expression.body);
@ -1476,6 +1479,7 @@ class Parser extends Tapable {
this.walkExpression(expression.body);
}
});
this.scope.topLevelScope = wasTopLevel;
}
walkArrowFunctionExpression(expression) {
@ -1621,10 +1625,10 @@ class Parser extends Tapable {
}
this.walkExpression(argOrThis);
};
const wasTopLevel = this.scope.topLevelScope;
this.scope.topLevelScope = false;
const params = functionExpression.params;
const renameThis = currentThis
? renameArgOrThis.call(this, currentThis)
: null;
const renameThis = currentThis ? renameArgOrThis(currentThis) : null;
const args = options.map(renameArgOrThis);
this.inScope(params.filter((identifier, idx) => !args[idx]), () => {
if (renameThis) {
@ -1641,6 +1645,7 @@ class Parser extends Tapable {
this.walkStatement(functionExpression.body);
} else this.walkExpression(functionExpression.body);
});
this.scope.topLevelScope = wasTopLevel;
};
if (
expression.callee.type === "MemberExpression" &&
@ -1652,8 +1657,7 @@ class Parser extends Tapable {
expression.arguments.length > 0
) {
// (function(…) { }.call/bind(?, …))
walkIIFE.call(
this,
walkIIFE(
expression.callee.object,
expression.arguments.slice(1),
expression.arguments[0]
@ -1663,7 +1667,7 @@ class Parser extends Tapable {
expression.arguments
) {
// (function(…) { }(…))
walkIIFE.call(this, expression.callee, expression.arguments);
walkIIFE(expression.callee, expression.arguments, null);
} else if (expression.callee.type === "Import") {
result = this.hooks.importCall.call(expression);
if (result === true) return;
@ -1873,7 +1877,8 @@ class Parser extends Tapable {
return {
range: left.range,
value: left.value,
code: true
code: true,
conditional: false
};
} else if (right.code) {
return {
@ -1882,12 +1887,15 @@ class Parser extends Tapable {
right.range ? right.range[1] : left.range[1]
],
value: left.value + right.value,
code: true
code: true,
conditional: false
};
} else {
return {
range: [left.range[0], right.range[1]],
value: left.value + right.value
value: left.value + right.value,
code: false,
conditional: false
};
}
}
@ -1903,6 +1911,7 @@ class Parser extends Tapable {
else if (!alternate.code) items.push(alternate);
else break;
return {
range: undefined,
value: "",
code: true,
conditional: items
@ -1911,12 +1920,16 @@ class Parser extends Tapable {
case "Literal":
return {
range: expression.range,
value: expression.value + ""
value: expression.value + "",
code: false,
conditional: false
};
}
return {
range: undefined,
value: "",
code: true
code: true,
conditional: false
};
}

View File

@ -353,7 +353,8 @@ module.exports = class RuleSet {
};
}
return {
loader: useItemString
loader: useItemString,
options: undefined
};
}

View File

@ -12,6 +12,16 @@ module.exports = class RuntimeTemplate {
this.requestShortener = requestShortener;
}
/**
* Add a comment
* @param {object} options Information content of the comment
* @param {string=} options.request request string used originally
* @param {string=} options.chunkName name of the chunk referenced
* @param {string=} options.chunkReason reason information of the chunk
* @param {string=} options.message additional message
* @param {string=} options.exportName name of the export
* @return {string} comment
*/
comment({ request, chunkName, chunkReason, message, exportName }) {
let content;
if (this.outputOptions.pathinfo) {
@ -195,7 +205,7 @@ module.exports = class RuntimeTemplate {
} else if (originModule.buildMeta.strictHarmonyModule) {
if (exportName) {
return "/* non-default import from non-esm module */undefined";
} else if (!exportName) {
} else {
if (asiSafe) {
return `/*#__PURE__*/{ /* fake namespace object */ "default": ${importVar} }`;
} else {

View File

@ -7,6 +7,10 @@
const SizeFormatHelpers = exports;
SizeFormatHelpers.formatSize = size => {
if (typeof size !== "number" || Number.isNaN(size) === true) {
return "unknown size";
}
if (size <= 0) {
return "0 bytes";
}

View File

@ -53,6 +53,13 @@ class Stats {
});
}
formatFilePath(filePath) {
const OPTIONS_REGEXP = /^(\s|\S)*!/;
return filePath.includes("!")
? `${filePath.replace(OPTIONS_REGEXP, "")} (${filePath})\n`
: `${filePath}\n`;
}
hasWarnings() {
return (
this.compilation.warnings.length > 0 ||
@ -93,7 +100,9 @@ class Stats {
const optionOrLocalFallback = (v, def) =>
typeof v !== "undefined"
? v
: typeof options.all !== "undefined" ? options.all : def;
: typeof options.all !== "undefined"
? options.all
: def;
const testAgainstGivenOption = item => {
if (typeof item === "string") {
@ -128,6 +137,10 @@ class Stats {
const showBuiltAt = optionOrLocalFallback(options.builtAt, true);
const showAssets = optionOrLocalFallback(options.assets, true);
const showEntrypoints = optionOrLocalFallback(options.entrypoints, true);
const showChunkGroups = optionOrLocalFallback(
options.chunkGroups,
!forToString
);
const showChunks = optionOrLocalFallback(options.chunks, !forToString);
const showChunkModules = optionOrLocalFallback(options.chunkModules, true);
const showChunkOrigins = optionOrLocalFallback(
@ -255,7 +268,9 @@ class Stats {
text += `chunk ${e.chunk.name || e.chunk.id}${
e.chunk.hasRuntime()
? " [entry]"
: e.chunk.canBeInitial() ? " [initial]" : ""
: e.chunk.canBeInitial()
? " [initial]"
: ""
}\n`;
}
if (e.file) {
@ -266,7 +281,9 @@ class Stats {
e.module.readableIdentifier &&
typeof e.module.readableIdentifier === "function"
) {
text += `${e.module.readableIdentifier(requestShortener)}\n`;
text += this.formatFilePath(
e.module.readableIdentifier(requestShortener)
);
}
text += e.message;
if (showErrorDetails && e.details) text += `\n${e.details}`;
@ -387,22 +404,59 @@ class Stats {
obj.assets.sort(sortByField(sortAssets));
}
if (showEntrypoints) {
obj.entrypoints = {};
for (const keyValuePair of compilation.entrypoints) {
const fnChunkGroup = groupMap => {
const obj = {};
for (const keyValuePair of groupMap) {
const name = keyValuePair[0];
const ep = keyValuePair[1];
obj.entrypoints[name] = {
chunks: ep.chunks.map(c => c.id),
assets: ep.chunks.reduce(
const cg = keyValuePair[1];
const children = cg.getChildrenByOrders();
obj[name] = {
chunks: cg.chunks.map(c => c.id),
assets: cg.chunks.reduce(
(array, c) => array.concat(c.files || []),
[]
)
),
children: Object.keys(children).reduce((obj, key) => {
const groups = children[key];
obj[key] = groups.map(group => ({
name: group.name,
chunks: group.chunks.map(c => c.id),
assets: group.chunks.reduce(
(array, c) => array.concat(c.files || []),
[]
)
}));
return obj;
}, Object.create(null)),
childAssets: Object.keys(children).reduce((obj, key) => {
const groups = children[key];
obj[key] = Array.from(
groups.reduce((set, group) => {
for (const chunk of group.chunks) {
for (const asset of chunk.files) {
set.add(asset);
}
}
return set;
}, new Set())
);
return obj;
}, Object.create(null))
};
if (showPerformance) {
obj.entrypoints[name].isOverSizeLimit = ep.isOverSizeLimit;
obj[name].isOverSizeLimit = cg.isOverSizeLimit;
}
}
return obj;
};
if (showEntrypoints) {
obj.entrypoints = fnChunkGroup(compilation.entrypoints);
}
if (showChunkGroups) {
obj.namedChunkGroups = fnChunkGroup(compilation.namedChunkGroups);
}
const fnModule = module => {
@ -510,6 +564,7 @@ class Stats {
const parents = new Set();
const children = new Set();
const siblings = new Set();
const childIdByOrder = chunk.getChildIdsByOrders();
for (const chunkGroup of chunk.groupsIterable) {
for (const parentGroup of chunkGroup.parentsIterable) {
for (const chunk of parentGroup.chunks) {
@ -538,7 +593,8 @@ class Stats {
hash: chunk.renderedHash,
siblings: Array.from(siblings).sort(),
parents: Array.from(parents).sort(),
children: Array.from(children).sort()
children: Array.from(children).sort(),
childrenByOrder: childIdByOrder
};
if (showChunkModules) {
obj.modules = chunk
@ -740,7 +796,7 @@ class Stats {
const builtAtDate = new Date(obj.builtAt);
colors.normal("Built at: ");
colors.normal(
builtAtDate.toLocaleDateString({
builtAtDate.toLocaleDateString(undefined, {
day: "2-digit",
month: "2-digit",
year: "numeric"
@ -828,23 +884,54 @@ class Stats {
colors.normal(obj.filteredAssets !== 1 ? " assets" : " asset");
newline();
}
if (obj.entrypoints) {
for (const name of Object.keys(obj.entrypoints)) {
const ep = obj.entrypoints[name];
colors.normal("Entrypoint ");
const processChunkGroups = (namedGroups, prefix) => {
for (const name of Object.keys(namedGroups)) {
const cg = namedGroups[name];
colors.normal(`${prefix} `);
colors.bold(name);
if (ep.isOverSizeLimit) {
if (cg.isOverSizeLimit) {
colors.normal(" ");
colors.yellow("[big]");
}
colors.normal(" =");
for (const asset of ep.assets) {
for (const asset of cg.assets) {
colors.normal(" ");
colors.green(asset);
}
for (const name of Object.keys(cg.childAssets)) {
const assets = cg.childAssets[name];
if (assets && assets.length > 0) {
colors.normal(" ");
colors.magenta(`(${name}:`);
for (const asset of assets) {
colors.normal(" ");
colors.green(asset);
}
colors.magenta(")");
}
}
newline();
}
};
if (obj.entrypoints) {
processChunkGroups(obj.entrypoints, "Entrypoint");
}
if (obj.namedChunkGroups) {
let outputChunkGroups = obj.namedChunkGroups;
if (obj.entrypoints) {
outputChunkGroups = Object.keys(outputChunkGroups)
.filter(name => !obj.entrypoints[name])
.reduce((result, name) => {
result[name] = obj.namedChunkGroups[name];
return result;
}, {});
}
processChunkGroups(outputChunkGroups, "Chunk Group");
}
const modulesByIdentifier = {};
if (obj.modules) {
for (const module of obj.modules) {
@ -913,19 +1000,30 @@ class Stats {
if (module.usedExports !== undefined) {
if (module.usedExports !== true) {
colors.normal(prefix);
if (module.usedExports === null)
if (module.usedExports === null) {
colors.cyan("[used exports unknown]");
else if (module.usedExports === false)
} else if (module.usedExports === false) {
colors.cyan("[no exports used]");
else if (
} else if (
Array.isArray(module.usedExports) &&
module.usedExports.length === 0
)
) {
colors.cyan("[no exports used]");
else if (Array.isArray(module.usedExports))
colors.cyan(
`[only some exports used: ${module.usedExports.join(", ")}]`
);
} else if (Array.isArray(module.usedExports)) {
const providedExportsCount = Array.isArray(module.providedExports)
? module.providedExports.length
: null;
if (
providedExportsCount !== null &&
providedExportsCount === module.usedExports.length
) {
colors.cyan("[all exports used]");
} else {
colors.cyan(
`[only some exports used: ${module.usedExports.join(", ")}]`
);
}
}
newline();
}
}
@ -998,19 +1096,39 @@ class Stats {
const processModulesList = (obj, prefix) => {
if (obj.modules) {
let maxModuleId = 0;
for (const module of obj.modules) {
if (typeof module.id === "number") {
if (maxModuleId < module.id) maxModuleId = module.id;
}
}
let contentPrefix = prefix + " ";
if (maxModuleId >= 10) contentPrefix += " ";
if (maxModuleId >= 100) contentPrefix += " ";
if (maxModuleId >= 1000) contentPrefix += " ";
for (const module of obj.modules) {
colors.normal(prefix);
const name = module.name || module.identifier;
let contentPrefix = prefix + " ";
if (typeof module.id === "string" || typeof module.id === "number") {
contentPrefix += " ";
if (module.id < 1000) colors.normal(" ");
if (module.id < 100) colors.normal(" ");
if (module.id < 10) colors.normal(" ");
colors.normal("[");
colors.normal(module.id);
colors.normal("]");
if (name !== module.id) colors.normal(" ");
if (typeof module.id === "number") {
if (module.id < 1000 && maxModuleId >= 1000) colors.normal(" ");
if (module.id < 100 && maxModuleId >= 100) colors.normal(" ");
if (module.id < 10 && maxModuleId >= 10) colors.normal(" ");
} else {
if (maxModuleId >= 1000) colors.normal(" ");
if (maxModuleId >= 100) colors.normal(" ");
if (maxModuleId >= 10) colors.normal(" ");
}
if (name !== module.id) {
colors.normal("[");
colors.normal(module.id);
colors.normal("]");
colors.normal(" ");
} else {
colors.normal("[");
colors.bold(module.id);
colors.normal("]");
}
}
if (name !== module.id) {
colors.bold(name);
@ -1063,6 +1181,19 @@ class Stats {
colors.yellow(id);
colors.normal("}<");
}
if (chunk.childrenByOrder) {
for (const name of Object.keys(chunk.childrenByOrder)) {
const children = chunk.childrenByOrder[name];
colors.normal(" ");
colors.magenta(`(${name}:`);
for (const id of children) {
colors.normal(" {");
colors.yellow(id);
colors.normal("}");
}
colors.magenta(")");
}
}
if (chunk.entry) {
colors.yellow(" [entry]");
} else if (chunk.initial) {
@ -1166,6 +1297,7 @@ class Stats {
case "verbose":
return {
entrypoints: true,
chunkGroups: true,
modules: false,
chunks: true,
chunkModules: true,
@ -1184,6 +1316,7 @@ class Stats {
case "detailed":
return {
entrypoints: true,
chunkGroups: true,
chunks: true,
chunkModules: false,
chunkOrigins: true,

View File

@ -5,6 +5,14 @@
"use strict";
module.exports = class WebpackError extends Error {
constructor(message) {
super(message);
this.details = undefined;
Error.captureStackTrace(this, this.constructor);
}
inspect() {
return this.stack + (this.details ? `\n${this.details}` : "");
}

View File

@ -85,9 +85,9 @@ class WebpackOptionsApply extends OptionsApply {
JsonpTemplatePlugin = require("./web/JsonpTemplatePlugin");
FetchCompileWasmTemplatePlugin = require("./web/FetchCompileWasmTemplatePlugin");
NodeSourcePlugin = require("./node/NodeSourcePlugin");
new JsonpTemplatePlugin(options.output).apply(compiler);
new FetchCompileWasmTemplatePlugin(options.output).apply(compiler);
new FunctionModulePlugin(options.output).apply(compiler);
new JsonpTemplatePlugin().apply(compiler);
new FetchCompileWasmTemplatePlugin().apply(compiler);
new FunctionModulePlugin().apply(compiler);
new NodeSourcePlugin(options.node).apply(compiler);
new LoaderTargetPlugin(options.target).apply(compiler);
break;
@ -96,8 +96,8 @@ class WebpackOptionsApply extends OptionsApply {
FetchCompileWasmTemplatePlugin = require("./web/FetchCompileWasmTemplatePlugin");
NodeSourcePlugin = require("./node/NodeSourcePlugin");
new WebWorkerTemplatePlugin().apply(compiler);
new FetchCompileWasmTemplatePlugin(options.output).apply(compiler);
new FunctionModulePlugin(options.output).apply(compiler);
new FetchCompileWasmTemplatePlugin().apply(compiler);
new FunctionModulePlugin().apply(compiler);
new NodeSourcePlugin(options.node).apply(compiler);
new LoaderTargetPlugin(options.target).apply(compiler);
break;
@ -110,8 +110,8 @@ class WebpackOptionsApply extends OptionsApply {
new NodeTemplatePlugin({
asyncChunkLoading: options.target === "async-node"
}).apply(compiler);
new ReadFileCompileWasmTemplatePlugin(options.output).apply(compiler);
new FunctionModulePlugin(options.output).apply(compiler);
new ReadFileCompileWasmTemplatePlugin().apply(compiler);
new FunctionModulePlugin().apply(compiler);
new NodeTargetPlugin().apply(compiler);
new LoaderTargetPlugin("node").apply(compiler);
break;
@ -119,8 +119,8 @@ class WebpackOptionsApply extends OptionsApply {
JsonpTemplatePlugin = require("./web/JsonpTemplatePlugin");
NodeTargetPlugin = require("./node/NodeTargetPlugin");
ExternalsPlugin = require("./ExternalsPlugin");
new JsonpTemplatePlugin(options.output).apply(compiler);
new FunctionModulePlugin(options.output).apply(compiler);
new JsonpTemplatePlugin().apply(compiler);
new FunctionModulePlugin().apply(compiler);
new NodeTargetPlugin().apply(compiler);
new ExternalsPlugin("commonjs", "nw.gui").apply(compiler);
new LoaderTargetPlugin(options.target).apply(compiler);
@ -132,7 +132,7 @@ class WebpackOptionsApply extends OptionsApply {
new NodeTemplatePlugin({
asyncChunkLoading: true
}).apply(compiler);
new FunctionModulePlugin(options.output).apply(compiler);
new FunctionModulePlugin().apply(compiler);
new NodeTargetPlugin().apply(compiler);
new ExternalsPlugin("commonjs", [
"app",
@ -165,8 +165,8 @@ class WebpackOptionsApply extends OptionsApply {
JsonpTemplatePlugin = require("./web/JsonpTemplatePlugin");
NodeTargetPlugin = require("./node/NodeTargetPlugin");
ExternalsPlugin = require("./ExternalsPlugin");
new JsonpTemplatePlugin(options.output).apply(compiler);
new FunctionModulePlugin(options.output).apply(compiler);
new JsonpTemplatePlugin().apply(compiler);
new FunctionModulePlugin().apply(compiler);
new NodeTargetPlugin().apply(compiler);
new ExternalsPlugin("commonjs", [
"clipboard",
@ -235,7 +235,9 @@ class WebpackOptionsApply extends OptionsApply {
"MappingURL=[url]\n*/"
: legacy
? "\n/*\n//@ source" + "MappingURL=[url]\n*/"
: modern ? "\n//# source" + "MappingURL=[url]" : null;
: modern
? "\n//# source" + "MappingURL=[url]"
: null;
let Plugin = evalWrapped
? EvalSourceMapDevToolPlugin
: SourceMapDevToolPlugin;
@ -259,7 +261,9 @@ class WebpackOptionsApply extends OptionsApply {
? "\n//@ sourceURL=[url]\n//# sourceURL=[url]"
: legacy
? "\n//@ sourceURL=[url]"
: modern ? "\n//# sourceURL=[url]" : null;
: modern
? "\n//# sourceURL=[url]"
: null;
new EvalDevToolModulePlugin({
sourceUrlComment: comment,
moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,

View File

@ -123,12 +123,12 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
switch (options.target) {
case "web":
case "electron-renderer":
case "node-webkit":
return "window";
case "webworker":
return "self";
case "node":
case "async-node":
case "node-webkit":
case "electron-main":
return "global";
default:
@ -193,6 +193,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
options => (isProductionLikeMode(options) ? "warning" : false)
);
this.set("optimization", "call", value => Object.assign({}, value));
this.set("optimization.removeAvailableModules", true);
this.set("optimization.removeEmptyChunks", true);
this.set("optimization.mergeDuplicateChunks", true);

View File

@ -141,7 +141,7 @@ class WebpackOptionsValidationError extends WebpackError {
if (schema.anyOf) return schema.anyOf.map(formatInnerSchema).join(" | ");
if (schema.enum)
return schema.enum.map(item => JSON.stringify(item)).join(" | ");
return JSON.stringify(schema, 0, 2);
return JSON.stringify(schema, null, 2);
}
static formatValidationError(err) {
@ -306,7 +306,7 @@ class WebpackOptionsValidationError extends WebpackError {
// eslint-disable-line no-fallthrough
return `${dataPath} ${err.message} (${JSON.stringify(
err,
0,
null,
2
)}).\n${getSchemaPartText(err.parentSchema)}`;
}

View File

@ -320,10 +320,15 @@ const makeInterceptorFor = (instance, tracer) => hookName => ({
}
});
/** @typedef {(...args: any[]) => void | Promise<any>} PluginFunction */
/**
* @param {string} hookName Name of the hook to profile.
* @param {{counter: number, trace: *, profiler: *}} tracer Instance of tracer.
* @param {{name: string, type: string, fn: Function}} opts Options for the profiled fn.
* @param {Tracer} tracer Instance of tracer.
* @param {object} options Options for the profiled fn.
* @param {string} options.name Plugin name
* @param {string} options.type Plugin type (sync | async | promise)
* @param {PluginFunction} options.fn Plugin function
* @returns {*} Chainable hooked function.
*/
const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => {
@ -339,7 +344,8 @@ const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => {
id,
cat: defaultCategory
});
return fn(...args).then(r => {
const promise = /** @type {Promise<*>} */ (fn(...args));
return promise.then(r => {
tracer.trace.end({
name,
id,

View File

@ -13,6 +13,7 @@ class AMDDefineDependency extends NullDependency {
this.functionRange = functionRange;
this.objectRange = objectRange;
this.namedModule = namedModule;
this.localModule = null;
}
get type() {

View File

@ -81,7 +81,7 @@ class AMDDefineDependencyParserPlugin {
))
) {
// eslint-disable-line no-cond-assign
dep = new LocalModuleDependency(localModule);
dep = new LocalModuleDependency(localModule, undefined, false);
dep.loc = expr.loc;
parser.state.current.addDependency(dep);
} else {
@ -122,7 +122,7 @@ class AMDDefineDependencyParserPlugin {
))
) {
// eslint-disable-line no-cond-assign
dep = new LocalModuleDependency(localModule, param.range);
dep = new LocalModuleDependency(localModule, param.range, false);
} else {
dep = this.newRequireItemDependency(param.string, param.range);
}
@ -223,9 +223,8 @@ class AMDDefineDependencyParserPlugin {
}
}
let fnRenames = parser.scope.renames.createChild();
let identifiers;
if (array) {
identifiers = {};
const identifiers = {};
const param = parser.evaluateExpression(array);
const result = this.processArray(
parser,
@ -244,7 +243,7 @@ class AMDDefineDependencyParserPlugin {
return true;
});
} else {
identifiers = ["require", "exports", "module"];
const identifiers = ["require", "exports", "module"];
if (fnParams)
fnParams = fnParams.slice(fnParamsOffset).filter((param, idx) => {
if (identifiers[idx]) {

View File

@ -20,7 +20,9 @@ module.exports = class AMDRequireDependenciesBlock extends AsyncDependenciesBloc
this.expr = expr;
this.outerRange = expr.range;
this.arrayRange = arrayRange;
this.functionBindThis = false;
this.functionRange = functionRange;
this.errorCallbackBindThis = false;
this.errorCallbackRange = errorCallbackRange;
this.bindThis = true;
if (arrayRange && functionRange && errorCallbackRange) {

View File

@ -78,7 +78,7 @@ class AMDRequireDependenciesBlockParserPlugin {
))
) {
// eslint-disable-line no-cond-assign
dep = new LocalModuleDependency(localModule);
dep = new LocalModuleDependency(localModule, undefined, false);
dep.loc = expr.loc;
parser.state.current.addDependency(dep);
} else {
@ -126,7 +126,7 @@ class AMDRequireDependenciesBlockParserPlugin {
))
) {
// eslint-disable-line no-cond-assign
dep = new LocalModuleDependency(localModule, param.range);
dep = new LocalModuleDependency(localModule, param.range, false);
} else {
dep = this.newRequireItemDependency(param.string, param.range);
}

View File

@ -73,53 +73,58 @@ class CommonJsRequireDependencyParserPlugin {
parser.state.current.addDependency(dep);
return true;
});
parser.hooks.call
.for("require")
.tap("CommonJsRequireDependencyParserPlugin", expr => {
if (expr.arguments.length !== 1) return;
let localModule;
const param = parser.evaluateExpression(expr.arguments[0]);
if (param.isConditional()) {
let isExpression = false;
const prevLength = parser.state.current.dependencies.length;
const createHandler = callNew => expr => {
if (expr.arguments.length !== 1) return;
let localModule;
const param = parser.evaluateExpression(expr.arguments[0]);
if (param.isConditional()) {
let isExpression = false;
const prevLength = parser.state.current.dependencies.length;
const dep = new RequireHeaderDependency(expr.callee.range);
dep.loc = expr.loc;
parser.state.current.addDependency(dep);
for (const p of param.options) {
const result = processItem(expr, p);
if (result === undefined) {
isExpression = true;
}
}
if (isExpression) {
parser.state.current.dependencies.length = prevLength;
} else {
return true;
}
}
if (
param.isString() &&
(localModule = LocalModulesHelpers.getLocalModule(
parser.state,
param.string
))
) {
const dep = new LocalModuleDependency(localModule, expr.range, callNew);
dep.loc = expr.loc;
parser.state.current.addDependency(dep);
return true;
} else {
const result = processItem(expr, param);
if (result === undefined) {
processContext(expr, param);
} else {
const dep = new RequireHeaderDependency(expr.callee.range);
dep.loc = expr.loc;
parser.state.current.addDependency(dep);
for (const p of param.options) {
const result = processItem(expr, p);
if (result === undefined) {
isExpression = true;
}
}
if (isExpression) {
parser.state.current.dependencies.length = prevLength;
} else {
return true;
}
}
if (
param.isString() &&
(localModule = LocalModulesHelpers.getLocalModule(
parser.state,
param.string
))
) {
const dep = new LocalModuleDependency(localModule, expr.range);
dep.loc = expr.loc;
parser.state.current.addDependency(dep);
return true;
} else {
const result = processItem(expr, param);
if (result === undefined) {
processContext(expr, param);
} else {
const dep = new RequireHeaderDependency(expr.callee.range);
dep.loc = expr.loc;
parser.state.current.addDependency(dep);
}
return true;
}
});
return true;
}
};
parser.hooks.call
.for("require")
.tap("CommonJsRequireDependencyParserPlugin", createHandler(false));
parser.hooks.new
.for("require")
.tap("CommonJsRequireDependencyParserPlugin", createHandler(true));
}
}
module.exports = CommonJsRequireDependencyParserPlugin;

View File

@ -9,11 +9,13 @@ const CriticalDependencyWarning = require("./CriticalDependencyWarning");
const regExpToString = r => (r ? r + "" : "");
class ContextDependency extends Dependency {
// options: { request, recursive, regExp, include, exclude, mode, chunkName }
// options: { request, recursive, regExp, include, exclude, mode, chunkName, groupOptions }
constructor(options) {
super();
this.options = options;
this.userRequest = this.options.request;
/** @type {false | string} */
this.critical = false;
this.hadGlobalOrStickyRegExp = false;
if (this.options.regExp.global || this.options.regExp.sticky) {
this.options.regExp = null;
@ -27,7 +29,8 @@ class ContextDependency extends Dependency {
`${regExpToString(this.options.regExp)} ${regExpToString(
this.options.include
)} ${regExpToString(this.options.exclude)} ` +
`${this.options.mode} ${this.options.chunkName}`
`${this.options.mode} ${this.options.chunkName} ` +
`${JSON.stringify(this.options.groupOptions)}`
);
}
@ -47,6 +50,7 @@ class ContextDependency extends Dependency {
}
}
// TODO remove in webpack 5
Object.defineProperty(ContextDependency.prototype, "async", {
configurable: false,
get() {

View File

@ -3,6 +3,8 @@
Author Tobias Koppers @sokra
*/
"use strict";
const DependencyReference = require("./DependencyReference");
const NullDependency = require("./NullDependency");
class DelegatedExportsDependency extends NullDependency {
@ -17,15 +19,13 @@ class DelegatedExportsDependency extends NullDependency {
}
getReference() {
return {
module: this.originModule,
importedNames: true
};
return new DependencyReference(this.originModule, true, false);
}
getExports() {
return {
exports: this.exports
exports: this.exports,
dependencies: undefined
};
}
}

View File

@ -0,0 +1,18 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Florent Cailhol @ooflorent
*/
"use strict";
class DependencyReference {
constructor(module, importedNames, weak) {
this.module = module;
// true: full object
// false: only sideeffects/no export
// array of strings: the exports with this names
this.importedNames = importedNames;
this.weak = weak;
}
}
module.exports = DependencyReference;

View File

@ -16,7 +16,7 @@ class HarmonyAcceptImportDependency extends HarmonyImportDependency {
}
}
HarmonyAcceptImportDependency.Template = class HarmonyAcceptImportDependencyTemplate {
HarmonyAcceptImportDependency.Template = class HarmonyAcceptImportDependencyTemplate extends HarmonyImportDependency.Template {
apply(dep, source, runtime) {}
};

View File

@ -19,7 +19,8 @@ class HarmonyExportExpressionDependency extends NullDependency {
getExports() {
return {
exports: ["default"]
exports: ["default"],
dependencies: undefined
};
}
}

View File

@ -3,8 +3,25 @@
Author Tobias Koppers @sokra
*/
"use strict";
const DependencyReference = require("./DependencyReference");
const HarmonyImportDependency = require("./HarmonyImportDependency");
const Template = require("../Template");
const HarmonyLinkingError = require("../HarmonyLinkingError");
const EMPTY_MAP = new Map();
class ExportMode {
constructor(type) {
this.type = type;
this.name = null;
this.map = EMPTY_MAP;
this.module = null;
this.userRequest = null;
}
}
const EMPTY_STAR_MODE = new ExportMode("empty-star");
class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
constructor(
@ -37,81 +54,64 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
const importedModule = this.module;
if (!importedModule) {
return {
type: "missing",
userRequest: this.userRequest
};
const mode = new ExportMode("missing");
mode.userRequest = this.userRequest;
return mode;
}
if (
!ignoreUnused &&
(name ? !used : this.originModule.usedExports === false)
) {
return {
type: "unused",
name: name || "*"
};
const mode = new ExportMode("unused");
mode.name = name || "*";
return mode;
}
const strictHarmonyModule = this.originModule.buildMeta.strictHarmonyModule;
if (name && id === "default" && importedModule.buildMeta) {
if (!importedModule.buildMeta.exportsType) {
if (strictHarmonyModule) {
return {
type: "reexport-non-harmony-default-strict",
module: importedModule,
name
};
} else {
return {
type: "reexport-non-harmony-default",
module: importedModule,
name
};
}
const mode = new ExportMode(
strictHarmonyModule
? "reexport-non-harmony-default-strict"
: "reexport-non-harmony-default"
);
mode.name = name;
mode.module = importedModule;
return mode;
} else if (importedModule.buildMeta.exportsType === "named") {
return {
type: "reexport-named-default",
module: importedModule,
name
};
const mode = new ExportMode("reexport-named-default");
mode.name = name;
mode.module = importedModule;
return mode;
}
}
const isNotAHarmonyModule =
importedModule.buildMeta && !importedModule.buildMeta.exportsType;
if (name) {
// export { name as name }
let mode;
if (id) {
// export { name as name }
if (isNotAHarmonyModule && strictHarmonyModule) {
return {
type: "rexport-non-harmony-undefined",
module: importedModule,
name
};
mode = new ExportMode("rexport-non-harmony-undefined");
mode.name = name;
} else {
return {
type: "safe-reexport",
module: importedModule,
map: new Map([[name, id]])
};
mode = new ExportMode("safe-reexport");
mode.map = new Map([[name, id]]);
}
} else {
// export { * as name }
if (isNotAHarmonyModule && strictHarmonyModule) {
mode = new ExportMode("reexport-fake-namespace-object");
mode.name = name;
} else {
mode = new ExportMode("reexport-namespace-object");
mode.name = name;
}
}
// export { * as name }
if (isNotAHarmonyModule && strictHarmonyModule) {
return {
type: "reexport-fake-namespace-object",
module: importedModule,
name
};
} else {
return {
type: "reexport-namespace-object",
module: importedModule,
name
};
}
mode.module = importedModule;
return mode;
}
const hasUsedExports = Array.isArray(this.originModule.usedExports);
@ -138,16 +138,13 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
);
if (map.size === 0) {
return {
type: "empty-star"
};
return EMPTY_STAR_MODE;
}
return {
type: "safe-reexport",
module: importedModule,
map
};
const mode = new ExportMode("safe-reexport");
mode.module = importedModule;
mode.map = map;
return mode;
}
const map = new Map(
@ -163,16 +160,13 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
);
if (map.size === 0) {
return {
type: "empty-star"
};
return EMPTY_STAR_MODE;
}
return {
type: "checked-reexport",
module: importedModule,
map
};
const mode = new ExportMode("checked-reexport");
mode.module = importedModule;
mode.map = map;
return mode;
}
if (hasProvidedExports) {
@ -189,26 +183,22 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
);
if (map.size === 0) {
return {
type: "empty-star"
};
return EMPTY_STAR_MODE;
}
return {
type: "safe-reexport",
module: importedModule,
map
};
const mode = new ExportMode("safe-reexport");
mode.module = importedModule;
mode.map = map;
return mode;
}
return {
type: "dynamic-reexport",
module: importedModule
};
const mode = new ExportMode("dynamic-reexport");
mode.module = importedModule;
return mode;
}
getReference() {
const mode = this.getMode();
const mode = this.getMode(false);
switch (mode.type) {
case "missing":
@ -218,32 +208,24 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
case "reexport-non-harmony-default":
case "reexport-named-default":
return {
module: mode.module,
importedNames: ["default"]
};
return new DependencyReference(mode.module, ["default"], false);
case "reexport-namespace-object":
case "reexport-non-harmony-default-strict":
case "reexport-fake-namespace-object":
case "rexport-non-harmony-undefined":
return {
module: mode.module,
importedNames: true
};
return new DependencyReference(mode.module, true, false);
case "safe-reexport":
case "checked-reexport":
return {
module: mode.module,
importedNames: Array.from(mode.map.values())
};
return new DependencyReference(
mode.module,
Array.from(mode.map.values()),
false
);
case "dynamic-reexport":
return {
module: mode.module,
importedNames: true
};
return new DependencyReference(mode.module, true, false);
default:
throw new Error(`Unknown mode ${mode.type}`);
@ -270,7 +252,8 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
getExports() {
if (this.name) {
return {
exports: [this.name]
exports: [this.name],
dependencies: undefined
};
}
@ -279,7 +262,8 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
if (!importedModule) {
// no imported module available
return {
exports: null
exports: null,
dependencies: undefined
};
}
@ -294,7 +278,8 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
if (importedModule.buildMeta.providedExports) {
return {
exports: true
exports: true,
dependencies: undefined
};
}
@ -340,11 +325,11 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
const exportName = this.id
? `the named export '${this.id}'`
: "the namespace object";
const err = new Error(
`Can't reexport ${exportName} from non EcmaScript module (only default export is available)`
);
err.hideStack = true;
return [err];
return [
new HarmonyLinkingError(
`Can't reexport ${exportName} from non EcmaScript module (only default export is available)`
)
];
}
return;
}
@ -364,9 +349,7 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
const errorMessage = `"export '${
this.id
}'${idIsNotNameMessage} was not found in '${this.userRequest}'`;
const err = new Error(errorMessage);
err.hideStack = true;
return [err];
return [new HarmonyLinkingError(errorMessage)];
}
updateHash(hash) {
@ -439,7 +422,7 @@ HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedS
}
getContent(dep) {
const mode = dep.getMode();
const mode = dep.getMode(false);
const module = dep.originModule;
const importedModule = dep.module;
const importVar = dep.getImportVar();
@ -567,10 +550,10 @@ HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedS
// Filter out exports which are defined by other exports
// and filter out default export because it cannot be reexported with *
if (activeExports.length > 0)
if (activeExports.size > 0)
content +=
"if(" +
JSON.stringify(activeExports.concat("default")) +
JSON.stringify(Array.from(activeExports).concat("default")) +
".indexOf(__WEBPACK_IMPORT_KEY__) < 0) ";
else content += "if(__WEBPACK_IMPORT_KEY__ !== 'default') ";
const exportsName = dep.originModule.exportsArgument;

View File

@ -19,7 +19,8 @@ class HarmonyExportSpecifierDependency extends NullDependency {
getExports() {
return {
exports: [this.name]
exports: [this.name],
dependencies: undefined
};
}
}

View File

@ -3,6 +3,8 @@
Author Tobias Koppers @sokra
*/
"use strict";
const DependencyReference = require("./DependencyReference");
const ModuleDependency = require("./ModuleDependency");
const Template = require("../Template");
@ -16,12 +18,7 @@ class HarmonyImportDependency extends ModuleDependency {
getReference() {
if (!this.module) return null;
return {
module: this.module,
importedNames: false,
weak: this.weak
};
return new DependencyReference(this.module, false, this.weak);
}
getImportVar() {
@ -63,7 +60,9 @@ module.exports = HarmonyImportDependency;
const importEmittedMap = new WeakMap();
HarmonyImportDependency.Template = class HarmonyImportDependencyTemplate {
apply() {}
apply(dep, source, runtime) {
// no-op
}
getHarmonyInitOrder(dep) {
return dep.sourceOrder;
@ -76,7 +75,7 @@ HarmonyImportDependency.Template = class HarmonyImportDependencyTemplate {
return key && sourceInfo.emittedImports.get(key);
}
harmonyInit(dep, source, runtime) {
harmonyInit(dep, source, runtime, dependencyTemplates) {
let sourceInfo = importEmittedMap.get(source);
if (!sourceInfo) {
importEmittedMap.set(

View File

@ -3,7 +3,10 @@
Author Tobias Koppers @sokra
*/
"use strict";
const DependencyReference = require("./DependencyReference");
const HarmonyImportDependency = require("./HarmonyImportDependency");
const HarmonyLinkingError = require("../HarmonyLinkingError");
class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
constructor(
@ -25,6 +28,7 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
this.callArgs = undefined;
this.call = undefined;
this.directImport = undefined;
this.shorthand = undefined;
}
get type() {
@ -33,11 +37,11 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
getReference() {
if (!this.module) return null;
return {
module: this.module,
importedNames:
this.id && !this.namespaceObjectAsContext ? [this.id] : true
};
return new DependencyReference(
this.module,
this.id && !this.namespaceObjectAsContext ? [this.id] : true,
false
);
}
getWarnings() {
@ -76,11 +80,11 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
const exportName = this.id
? `the named export '${this.id}'`
: "the namespace object";
const err = new Error(
`Can't import ${exportName} from non EcmaScript module (only default export is available)`
);
err.hideStack = true;
return [err];
return [
new HarmonyLinkingError(
`Can't import ${exportName} from non EcmaScript module (only default export is available)`
)
];
}
return;
}
@ -100,9 +104,7 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
const errorMessage = `"export '${
this.id
}'${idIsNotNameMessage} was not found in '${this.userRequest}'`;
const err = new Error(errorMessage);
err.hideStack = true;
return [err];
return [new HarmonyLinkingError(errorMessage)];
}
// implement this method to allow the occurrence order plugin to count correctly

View File

@ -7,8 +7,9 @@ const AsyncDependenciesBlock = require("../AsyncDependenciesBlock");
const ImportDependency = require("./ImportDependency");
module.exports = class ImportDependenciesBlock extends AsyncDependenciesBlock {
constructor(request, range, chunkName, module, loc, originModule) {
super(chunkName, module, loc, request);
// TODO webpack 5 reorganize arguments
constructor(request, range, groupOptions, module, loc, originModule) {
super(groupOptions, module, loc, request);
this.range = range;
const dep = new ImportDependency(request, originModule, this);
dep.loc = loc;

View File

@ -29,11 +29,29 @@ class ImportParserPlugin {
let mode = "lazy";
let include = null;
let exclude = null;
const groupOptions = {};
const importOptions = parser.getCommentOptions(expr.range);
if (importOptions) {
if (typeof importOptions.webpackIgnore !== "undefined") {
if (typeof importOptions.webpackIgnore !== "boolean") {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
`\`webpackIgnore\` expected a boolean, but received: ${
importOptions.webpackIgnore
}.`
)
);
} else {
// Do not instrument `import()` is `webpackIgnore` is `true`
if (importOptions.webpackIgnore) {
return false;
}
}
}
if (typeof importOptions.webpackChunkName !== "undefined") {
if (typeof importOptions.webpackChunkName !== "string")
if (typeof importOptions.webpackChunkName !== "string") {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
@ -42,10 +60,12 @@ class ImportParserPlugin {
}.`
)
);
else chunkName = importOptions.webpackChunkName;
} else {
chunkName = importOptions.webpackChunkName;
}
}
if (typeof importOptions.webpackMode !== "undefined") {
if (typeof importOptions.webpackMode !== "string")
if (typeof importOptions.webpackMode !== "string") {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
@ -54,7 +74,41 @@ class ImportParserPlugin {
}.`
)
);
else mode = importOptions.webpackMode;
} else {
mode = importOptions.webpackMode;
}
}
if (typeof importOptions.webpackPrefetch !== "undefined") {
if (importOptions.webpackPrefetch === true) {
groupOptions.prefetchOrder = 0;
} else if (typeof importOptions.webpackPrefetch === "number") {
groupOptions.prefetchOrder = importOptions.webpackPrefetch;
} else {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
`\`webpackPrefetch\` expected true or a number, but received: ${
importOptions.webpackPrefetch
}.`
)
);
}
}
if (typeof importOptions.webpackPreload !== "undefined") {
if (importOptions.webpackPreload === true) {
groupOptions.preloadOrder = 0;
} else if (typeof importOptions.webpackPreload === "number") {
groupOptions.preloadOrder = importOptions.webpackPreload;
} else {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
`\`webpackPreload\` expected true or a number, but received: ${
importOptions.webpackPreload
}.`
)
);
}
}
if (typeof importOptions.webpackInclude !== "undefined") {
if (
@ -120,7 +174,9 @@ class ImportParserPlugin {
const depBlock = new ImportDependenciesBlock(
param.string,
expr.range,
chunkName,
Object.assign(groupOptions, {
name: chunkName
}),
parser.state.module,
expr.loc,
parser.state.module
@ -155,6 +211,7 @@ class ImportParserPlugin {
this.options,
{
chunkName,
groupOptions,
include,
exclude,
mode,

Some files were not shown because too many files have changed in this diff Show More