Merge branch 'v4-beta3' into jest
# Conflicts: # test/BenchmarkTestCases.benchmark.js # test/CachePlugin.unittest.js # test/HotTestCases.test.js # test/NormalModule.unittest.js # test/ProfilingPlugin.unittest.js # test/TestCases.test.js # test/configCases/parsing/harmony-this/index.js # test/configCases/plugins/profiling-plugin/index.js # test/configCases/plugins/profiling-plugin/webpack.config.js # test/watchCases/runtime/static-import/0/index.js # yarn.lock
This commit is contained in:
commit
7b5c3516f6
|
@ -19,4 +19,4 @@
|
||||||
|
|
||||||
**If this is a feature request, what is motivation or use case for changing the behavior?**
|
**If this is a feature request, what is motivation or use case for changing the behavior?**
|
||||||
|
|
||||||
**Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.**
|
**Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.**
|
||||||
|
|
|
@ -13,7 +13,7 @@ If you are still having difficulty after looking over your configuration careful
|
||||||
a question to [StackOverflow with the webpack tag](http://stackoverflow.com/tags/webpack). Questions
|
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 and relevant files are more likely to receive responses.
|
||||||
|
|
||||||
**If you have discovered a bug or have a feature suggestion, feel free to create an issue on Github.**
|
**If you have discovered a bug or have a feature suggestion, please [create an issue on GitHub](https://github.com/webpack/webpack/issues/new).**
|
||||||
|
|
||||||
## Contributing to the webpack ecosystem
|
## Contributing to the webpack ecosystem
|
||||||
|
|
||||||
|
@ -60,4 +60,4 @@ documentation.
|
||||||
|
|
||||||
## Discussions
|
## Discussions
|
||||||
|
|
||||||
Gitters is only for small questions. To discuss in long a subject, please send on gitters a link to your forum or blog.
|
Gitter is only for small questions. To discuss a subject in detail, please send a link to your forum or blog in the Gitter chat.
|
||||||
|
|
|
@ -52,7 +52,7 @@ yarn add webpack --dev
|
||||||
|
|
||||||
<h2 align="center">Introduction</h2>
|
<h2 align="center">Introduction</h2>
|
||||||
|
|
||||||
> This README reflects Webpack v2.x and v3.x. The Webpack v1.x [documentation can be found here](https://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=top).
|
> This README reflects Webpack v2.x and v3.x. The Webpack v1.x documentation has been deprecated and deleted.
|
||||||
|
|
||||||
webpack is a bundler for modules. The main purpose is to bundle JavaScript
|
webpack is a bundler for modules. The main purpose is to bundle JavaScript
|
||||||
files for usage in a browser, yet it is also capable of transforming, bundling,
|
files for usage in a browser, yet it is also capable of transforming, bundling,
|
||||||
|
@ -217,14 +217,14 @@ or are automatically applied via regex from your webpack configuration.
|
||||||
|Name|Status|Description|
|
|Name|Status|Description|
|
||||||
|:--:|:----:|:----------|
|
|:--:|:----:|:----------|
|
||||||
|<a href="https://github.com/vuejs/vue-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/vue-9.svg"></a>|![vue-npm]|Loads and compiles Vue Components|
|
|<a href="https://github.com/vuejs/vue-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/vue-9.svg"></a>|![vue-npm]|Loads and compiles Vue Components|
|
||||||
|<a href="https://github.com/JonDum/polymer-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/polymer.svg"></a>|![polymer-npm]|Process HTML & CSS with preprocessor of choice and `require()` Web Components like first-class modules|
|
|<a href="https://github.com/webpack-contrib/polymer-webpack-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/polymer.svg"></a>|![polymer-npm]|Process HTML & CSS with preprocessor of choice and `require()` Web Components like first-class modules|
|
||||||
|<a href="https://github.com/TheLarkInn/angular2-template-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/angular-icon-1.svg"></a>|![angular-npm]| Loads and compiles Angular 2 Components|
|
|<a href="https://github.com/TheLarkInn/angular2-template-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/angular-icon-1.svg"></a>|![angular-npm]| Loads and compiles Angular 2 Components|
|
||||||
|<a href="https://github.com/riot/tag-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/riot.svg"></a>|![riot-npm]| Riot official webpack loader|
|
|<a href="https://github.com/riot/tag-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/riot.svg"></a>|![riot-npm]| Riot official webpack loader|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[vue-npm]: https://img.shields.io/npm/v/vue-loader.svg
|
[vue-npm]: https://img.shields.io/npm/v/vue-loader.svg
|
||||||
[polymer-npm]: https://img.shields.io/npm/v/polymer-loader.svg
|
[polymer-npm]: https://img.shields.io/npm/v/polymer-webpack-loader.svg
|
||||||
[angular-npm]: https://img.shields.io/npm/v/angular2-template-loader.svg
|
[angular-npm]: https://img.shields.io/npm/v/angular2-template-loader.svg
|
||||||
[riot-npm]: https://img.shields.io/npm/v/riot-tag-loader.svg
|
[riot-npm]: https://img.shields.io/npm/v/riot-tag-loader.svg
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>
|
||||||
|
|
||||||
<h2 align="center">Silver Sponsors</h2>
|
<h2 align="center">Silver Sponsors</h2>
|
||||||
|
|
||||||
[Become a sliver sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on Github with a link to your site.
|
[Become a silver sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on Github with a link to your site.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ const benchmarkOptions = {
|
||||||
|
|
||||||
function runTimes(compiler, times, deferred) {
|
function runTimes(compiler, times, deferred) {
|
||||||
fs.writeFileSync(path.join(fixtures, "0.js"), "module.exports = " + Math.random(), "utf-8");
|
fs.writeFileSync(path.join(fixtures, "0.js"), "module.exports = " + Math.random(), "utf-8");
|
||||||
compiler.run((err, stats) => {
|
compiler.run(err => {
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
if(times === 1)
|
if(times === 1)
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
|
@ -30,12 +30,12 @@ const tests = {
|
||||||
(size, deferred) => {
|
(size, deferred) => {
|
||||||
webpack({
|
webpack({
|
||||||
context: fixtures,
|
context: fixtures,
|
||||||
entry: "./" + size + ".js",
|
entry: `./${size}.js`,
|
||||||
output: {
|
output: {
|
||||||
path: outputPath,
|
path: outputPath,
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
}
|
}
|
||||||
}, (err, stats) => {
|
}, err => {
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
});
|
});
|
||||||
|
@ -46,16 +46,16 @@ const tests = {
|
||||||
(size, deferred) => {
|
(size, deferred) => {
|
||||||
webpack({
|
webpack({
|
||||||
context: fixtures,
|
context: fixtures,
|
||||||
entry: "./" + size + ".big.js",
|
entry: `./${size}.big.js`,
|
||||||
output: {
|
output: {
|
||||||
path: outputPath,
|
path: outputPath,
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
},
|
},
|
||||||
devtool: "eval"
|
devtool: "eval"
|
||||||
}, (err, stats) => {
|
}, err => {
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sourcemap build": [
|
"sourcemap build": [
|
||||||
|
@ -63,16 +63,16 @@ const tests = {
|
||||||
(size, deferred) => {
|
(size, deferred) => {
|
||||||
webpack({
|
webpack({
|
||||||
context: fixtures,
|
context: fixtures,
|
||||||
entry: "./" + size + ".big.js",
|
entry: `./${size}.big.js`,
|
||||||
output: {
|
output: {
|
||||||
path: outputPath,
|
path: outputPath,
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
},
|
},
|
||||||
devtool: "source-map"
|
devtool: "source-map"
|
||||||
}, (err, stats) => {
|
}, err => {
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"cheap sourcemap build": [
|
"cheap sourcemap build": [
|
||||||
|
@ -80,16 +80,32 @@ const tests = {
|
||||||
(size, deferred) => {
|
(size, deferred) => {
|
||||||
webpack({
|
webpack({
|
||||||
context: fixtures,
|
context: fixtures,
|
||||||
entry: "./" + size + ".big.js",
|
entry: `./${size}.big.js`,
|
||||||
output: {
|
output: {
|
||||||
path: outputPath,
|
path: outputPath,
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
},
|
},
|
||||||
devtool: "cheap-source-map"
|
devtool: "cheap-source-map"
|
||||||
}, function(err, stats) {
|
}, err => {
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
})
|
});
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"build w/ chunks": [
|
||||||
|
[0, 1, 5, 10, 50, 100, 200],
|
||||||
|
(size, deferred) => {
|
||||||
|
webpack({
|
||||||
|
context: fixtures,
|
||||||
|
entry: `./${size}.async.js`,
|
||||||
|
output: {
|
||||||
|
path: outputPath,
|
||||||
|
filename: "bundle.js"
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
if(err) throw err;
|
||||||
|
deferred.resolve();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"build w/ chunks": [
|
"build w/ chunks": [
|
||||||
|
@ -102,26 +118,10 @@ const tests = {
|
||||||
path: outputPath,
|
path: outputPath,
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
}
|
}
|
||||||
}, function(err, stats) {
|
}, err => {
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
})
|
});
|
||||||
}
|
|
||||||
],
|
|
||||||
"build w/ chunks": [
|
|
||||||
[0, 1, 5, 10, 50, 100, 200],
|
|
||||||
(size, deferred) => {
|
|
||||||
webpack({
|
|
||||||
context: fixtures,
|
|
||||||
entry: "./" + size + ".async.js",
|
|
||||||
output: {
|
|
||||||
path: outputPath,
|
|
||||||
filename: "bundle.js"
|
|
||||||
}
|
|
||||||
}, function(err, stats) {
|
|
||||||
if(err) throw err;
|
|
||||||
deferred.resolve();
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"incremental": [
|
"incremental": [
|
||||||
|
@ -161,7 +161,7 @@ const tests = {
|
||||||
var compiler = webpack({
|
var compiler = webpack({
|
||||||
cache: true,
|
cache: true,
|
||||||
context: fixtures,
|
context: fixtures,
|
||||||
entry: "./" + size + ".js",
|
entry: `./${size}.js`,
|
||||||
output: {
|
output: {
|
||||||
path: outputPath,
|
path: outputPath,
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
|
@ -176,7 +176,7 @@ const tests = {
|
||||||
var compiler = webpack({
|
var compiler = webpack({
|
||||||
cache: true,
|
cache: true,
|
||||||
context: fixtures,
|
context: fixtures,
|
||||||
entry: "./" + size + ".js",
|
entry: `./${size}.js`,
|
||||||
output: {
|
output: {
|
||||||
path: outputPath,
|
path: outputPath,
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
|
@ -191,7 +191,7 @@ const tests = {
|
||||||
var compiler = webpack({
|
var compiler = webpack({
|
||||||
cache: true,
|
cache: true,
|
||||||
context: fixtures,
|
context: fixtures,
|
||||||
entry: "./" + size + ".js",
|
entry: `./${size}.js`,
|
||||||
output: {
|
output: {
|
||||||
path: outputPath,
|
path: outputPath,
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
|
@ -204,17 +204,17 @@ const tests = {
|
||||||
|
|
||||||
const suite = new Benchmark.Suite;
|
const suite = new Benchmark.Suite;
|
||||||
|
|
||||||
Object.keys(tests).filter((name) => (process.argv.length > 2) ? name.indexOf(process.argv[2]) >= 0 : true)
|
Object.keys(tests).filter(name => process.argv.length > 2 ? name.includes(process.argv[2]) : true)
|
||||||
.forEach((name) => {
|
.forEach(name => {
|
||||||
const test = tests[name];
|
const test = tests[name];
|
||||||
test[0].forEach((size) => {
|
test[0].forEach(size => {
|
||||||
suite.add(name + " " + size, (deferred) => {
|
suite.add(`${name} ${size}`, deferred => {
|
||||||
test[1](size, deferred);
|
test[1](size, deferred);
|
||||||
}, benchmarkOptions);
|
}, benchmarkOptions);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
suite.on("cycle", (event) => {
|
suite.on("cycle", event => {
|
||||||
process.stderr.write("\n");
|
process.stderr.write("\n");
|
||||||
const b = event.target;
|
const b = event.target;
|
||||||
console.log(b.name + "\t" + Math.floor(1000 * (b.stats.mean - b.stats.moe)) + "\t" + Math.floor(1000 * (b.stats.mean + b.stats.moe)));
|
console.log(b.name + "\t" + Math.floor(1000 * (b.stats.mean - b.stats.moe)) + "\t" + Math.floor(1000 * (b.stats.mean + b.stats.moe)));
|
||||||
|
|
|
@ -7,16 +7,21 @@ try {
|
||||||
fs.mkdirSync(fixtures);
|
fs.mkdirSync(fixtures);
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
|
|
||||||
|
function generateRequireString(conditional, suffix) {
|
||||||
|
const prefixedSuffix = suffix ? `.${suffix}` : "";
|
||||||
|
return `require(${JSON.stringify(`./${conditional}${prefixedSuffix}.js`)});`;
|
||||||
|
}
|
||||||
|
|
||||||
for(let i = 0; i < 10000; i++) {
|
for(let i = 0; i < 10000; i++) {
|
||||||
const source = [];
|
const source = [];
|
||||||
if(i > 8)
|
if(i > 8)
|
||||||
source.push("require(" + JSON.stringify("./" + (i / 8 | 0) + ".js") + ");");
|
source.push(generateRequireString((i / 8 | 0)));
|
||||||
if(i > 4)
|
if(i > 4)
|
||||||
source.push("require(" + JSON.stringify("./" + (i / 4 | 0) + ".js") + ");");
|
source.push(generateRequireString((i / 4 | 0)));
|
||||||
if(i > 2)
|
if(i > 2)
|
||||||
source.push("require(" + JSON.stringify("./" + (i / 2 | 0) + ".js") + ");");
|
source.push(generateRequireString((i / 2 | 0)));
|
||||||
if(i > 0)
|
if(i > 0)
|
||||||
source.push("require(" + JSON.stringify("./" + (i - 1) + ".js") + ");");
|
source.push(generateRequireString((i - 1)));
|
||||||
source.push("module.exports = " + i + ";");
|
source.push("module.exports = " + i + ";");
|
||||||
fs.writeFileSync(path.join(fixtures, i + ".js"), source.join("\n"), "utf-8");
|
fs.writeFileSync(path.join(fixtures, i + ".js"), source.join("\n"), "utf-8");
|
||||||
}
|
}
|
||||||
|
@ -25,13 +30,13 @@ for(let i = 0; i < 10000; i++) {
|
||||||
const source = [];
|
const source = [];
|
||||||
source.push("require.ensure([], function(require) {");
|
source.push("require.ensure([], function(require) {");
|
||||||
if(i > 8)
|
if(i > 8)
|
||||||
source.push("require(" + JSON.stringify("./" + (i / 8 | 0) + ".async.js") + ");");
|
source.push(generateRequireString((i / 8 | 0), "async"));
|
||||||
if(i > 4)
|
if(i > 4)
|
||||||
source.push("require(" + JSON.stringify("./" + (i / 4 | 0) + ".async.js") + ");");
|
source.push(generateRequireString((i / 4 | 0), "async"));
|
||||||
if(i > 2)
|
if(i > 2)
|
||||||
source.push("require(" + JSON.stringify("./" + (i / 2 | 0) + ".async.js") + ");");
|
source.push(generateRequireString((i / 2 | 0), "async"));
|
||||||
if(i > 0)
|
if(i > 0)
|
||||||
source.push("require(" + JSON.stringify("./" + (i - 1) + ".async.js") + ");");
|
source.push(generateRequireString((i - 1), "async"));
|
||||||
source.push("});");
|
source.push("});");
|
||||||
source.push("module.exports = " + i + ";");
|
source.push("module.exports = " + i + ";");
|
||||||
fs.writeFileSync(path.join(fixtures, i + ".async.js"), source.join("\n"), "utf-8");
|
fs.writeFileSync(path.join(fixtures, i + ".async.js"), source.join("\n"), "utf-8");
|
||||||
|
@ -40,13 +45,13 @@ for(let i = 0; i < 10000; i++) {
|
||||||
for(let i = 0; i < 100; i++) {
|
for(let i = 0; i < 100; i++) {
|
||||||
const source = [];
|
const source = [];
|
||||||
if(i > 8)
|
if(i > 8)
|
||||||
source.push("require(" + JSON.stringify("./" + (i / 8 | 0) + ".big.js") + ");");
|
source.push(generateRequireString((i / 8 | 0), "big"));
|
||||||
if(i > 4)
|
if(i > 4)
|
||||||
source.push("require(" + JSON.stringify("./" + (i / 4 | 0) + ".big.js") + ");");
|
source.push(generateRequireString((i / 4 | 0), "big"));
|
||||||
if(i > 2)
|
if(i > 2)
|
||||||
source.push("require(" + JSON.stringify("./" + (i / 2 | 0) + ".big.js") + ");");
|
source.push(generateRequireString((i / 2 | 0), "big"));
|
||||||
if(i > 0)
|
if(i > 0)
|
||||||
source.push("require(" + JSON.stringify("./" + (i - 1) + ".big.js") + ");");
|
source.push(generateRequireString((i - 1), "big"));
|
||||||
for(let j = 0; j < 300; j++)
|
for(let j = 0; j < 300; j++)
|
||||||
source.push("if(Math.random())hello.world();test.a.b.c.d();x(1,2,3,4);var a,b,c,d,e,f;");
|
source.push("if(Math.random())hello.world();test.a.b.c.d();x(1,2,3,4);var a,b,c,d,e,f;");
|
||||||
source.push("module.exports = " + i + ";");
|
source.push("module.exports = " + i + ";");
|
||||||
|
|
|
@ -60,7 +60,7 @@ module.exports = {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.chunk.js 5.98 KiB 0 [emitted]
|
0.chunk.js 5.98 KiB 0 [emitted]
|
||||||
1.chunk.js 405 bytes 1 [emitted]
|
1.chunk.js 405 bytes 1 [emitted]
|
||||||
|
@ -108,7 +108,7 @@ chunk {4} pageA.bundle.js (pageA) 71 bytes >{0}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.chunk.js 173 bytes 0, 1 [emitted]
|
0.chunk.js 173 bytes 0, 1 [emitted]
|
||||||
1.chunk.js 118 bytes 1 [emitted]
|
1.chunk.js 118 bytes 1 [emitted]
|
||||||
|
|
|
@ -8,7 +8,7 @@ const cp = require("child_process");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const tc = require("./template-common");
|
const tc = require("./template-common");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const async = require("async");
|
const async = require("neo-async");
|
||||||
|
|
||||||
const extraArgs = "";
|
const extraArgs = "";
|
||||||
|
|
||||||
|
|
|
@ -10,19 +10,11 @@ The configuration required for this is:
|
||||||
# example.js
|
# example.js
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
import vendor from "./vendor";
|
|
||||||
// some module
|
// some module
|
||||||
import("./async1");
|
import("./async1");
|
||||||
import("./async2");
|
import("./async2");
|
||||||
```
|
```
|
||||||
|
|
||||||
# vendor.js
|
|
||||||
|
|
||||||
``` javascript
|
|
||||||
// some vendor lib (should be in common chunk)
|
|
||||||
export default 123;
|
|
||||||
```
|
|
||||||
|
|
||||||
# webpack.config.js
|
# webpack.config.js
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
|
@ -51,21 +43,18 @@ module.exports = {
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- inlined minimized file "manifest.[chunkhash].js" -->
|
<!-- inlined minimized file "runtime~main.[chunkhash].js" -->
|
||||||
<script>
|
<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,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()}([]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- optional when using the CommonChunkPlugin for vendor modules -->
|
|
||||||
<script src="dist/main-runtime.[chunkhash].js"></script>
|
|
||||||
|
|
||||||
<script src="dist/main.[chunkhash].js"></script>
|
<script src="dist/main.[chunkhash].js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
|
||||||
# dist/main-runtime.[chunkhash].js
|
# dist/runtime~main.[chunkhash].js
|
||||||
|
|
||||||
<details><summary><code>/******/ (function(modules) { /* webpackBootstrap */ })</code></summary>
|
<details><summary><code>/******/ (function(modules) { /* webpackBootstrap */ })</code></summary>
|
||||||
|
|
||||||
|
@ -280,30 +269,12 @@ module.exports = {
|
||||||
/*!********************!*\
|
/*!********************!*\
|
||||||
!*** ./example.js ***!
|
!*** ./example.js ***!
|
||||||
\********************/
|
\********************/
|
||||||
/*! no exports provided */
|
/*! no static exports found */
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vendor */ 1);
|
|
||||||
|
|
||||||
// some module
|
// some module
|
||||||
__webpack_require__.e(/*! import() */ 1).then(function() { var module = __webpack_require__(/*! ./async1 */ 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 : { /* fake namespace object */ "default": module }; });
|
||||||
__webpack_require__.e(/*! import() */ 2).then(function() { var module = __webpack_require__(/*! ./async2 */ 3); 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 }; });
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 1 */
|
|
||||||
/*!*******************!*\
|
|
||||||
!*** ./vendor.js ***!
|
|
||||||
\*******************/
|
|
||||||
/*! exports provided: default */
|
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
// some vendor lib (should be in common chunk)
|
|
||||||
/* harmony default export */ __webpack_exports__["default"] = (123);
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
@ -316,30 +287,26 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
main.[chunkhash].js 1.28 KiB 0 [emitted] main
|
main.[chunkhash].js 768 bytes 0 [emitted] main
|
||||||
1.[chunkhash].js 264 bytes 1 [emitted]
|
1.[chunkhash].js 270 bytes 1 [emitted]
|
||||||
2.[chunkhash].js 264 bytes 2 [emitted]
|
2.[chunkhash].js 264 bytes 2 [emitted]
|
||||||
main-runtime.[chunkhash].js 7.49 KiB 3 [emitted] main-runtime
|
runtime~main.[chunkhash].js 7.49 KiB 3 [emitted] runtime~main
|
||||||
Entrypoint main = main-runtime.[chunkhash].js main.[chunkhash].js
|
Entrypoint main = runtime~main.[chunkhash].js main.[chunkhash].js
|
||||||
chunk {0} main.[chunkhash].js (main) 159 bytes ={3}= >{1}< >{2}< [initial] [rendered]
|
chunk {0} main.[chunkhash].js (main) 58 bytes ={3}= >{1}< >{2}< [initial] [rendered]
|
||||||
> ./example main
|
> ./example main
|
||||||
[0] ./example.js 90 bytes {0} [built]
|
[0] ./example.js 58 bytes {0} [built]
|
||||||
[no exports]
|
|
||||||
single entry ./example main
|
single entry ./example main
|
||||||
[1] ./vendor.js 69 bytes {0} [built]
|
chunk {1} 1.[chunkhash].js 29 bytes <{0}> <{3}> [rendered]
|
||||||
[exports: default]
|
> ./async1 [0] ./example.js 2:0-18
|
||||||
harmony side effect evaluation ./vendor [0] ./example.js 1:0-30
|
[1] ./async1.js 29 bytes {1} [built]
|
||||||
chunk {1} 1.[chunkhash].js 29 bytes <{3}> <{0}> [rendered]
|
import() ./async1 [0] ./example.js 2:0-18
|
||||||
> ./async1 [0] ./example.js 3:0-18
|
chunk {2} 2.[chunkhash].js 29 bytes <{0}> <{3}> [rendered]
|
||||||
[2] ./async1.js 29 bytes {1} [built]
|
> ./async2 [0] ./example.js 3:0-18
|
||||||
import() ./async1 [0] ./example.js 3:0-18
|
[2] ./async2.js 29 bytes {2} [built]
|
||||||
chunk {2} 2.[chunkhash].js 29 bytes <{3}> <{0}> [rendered]
|
import() ./async2 [0] ./example.js 3:0-18
|
||||||
> ./async2 [0] ./example.js 4:0-18
|
chunk {3} runtime~main.[chunkhash].js (runtime~main) 0 bytes ={0}= >{1}< >{2}< [entry] [rendered]
|
||||||
[3] ./async2.js 29 bytes {2} [built]
|
|
||||||
import() ./async2 [0] ./example.js 4:0-18
|
|
||||||
chunk {3} main-runtime.[chunkhash].js (main-runtime) 0 bytes ={0}= >{1}< >{2}< [entry] [rendered]
|
|
||||||
> ./example main
|
> ./example main
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -347,33 +314,25 @@ chunk {3} main-runtime.[chunkhash].js (main-runtime) 0 bytes ={0}= >{1}< >{2}
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.[chunkhash].js 77 bytes 0 [emitted]
|
0.[chunkhash].js 77 bytes 0 [emitted]
|
||||||
1.[chunkhash].js 78 bytes 1 [emitted]
|
1.[chunkhash].js 78 bytes 1 [emitted]
|
||||||
main-runtime.[chunkhash].js 1.76 KiB 2 [emitted] main-runtime
|
runtime~main.[chunkhash].js 1.76 KiB 2 [emitted] runtime~main
|
||||||
main.[chunkhash].js 289 bytes 3 [emitted] main
|
main.[chunkhash].js 269 bytes 3 [emitted] main
|
||||||
Entrypoint main = main-runtime.[chunkhash].js main.[chunkhash].js
|
Entrypoint main = runtime~main.[chunkhash].js main.[chunkhash].js
|
||||||
chunk {0} 0.[chunkhash].js 29 bytes <{2}> <{3}> [rendered]
|
chunk {0} 0.[chunkhash].js 29 bytes <{2}> <{3}> [rendered]
|
||||||
> ./async2 [] 4:0-18
|
> ./async2 [0] ./example.js 3:0-18
|
||||||
[1] ./async2.js 29 bytes {0} [built]
|
[1] ./async2.js 29 bytes {0} [built]
|
||||||
import() ./async2 ./example.js 4:0-18
|
import() ./async2 [0] ./example.js 3:0-18
|
||||||
chunk {1} 1.[chunkhash].js 29 bytes <{2}> <{3}> [rendered]
|
chunk {1} 1.[chunkhash].js 29 bytes <{2}> <{3}> [rendered]
|
||||||
> ./async1 [] 3:0-18
|
> ./async1 [0] ./example.js 2:0-18
|
||||||
[2] ./async1.js 29 bytes {1} [built]
|
[2] ./async1.js 29 bytes {1} [built]
|
||||||
import() ./async1 ./example.js 3:0-18
|
import() ./async1 [0] ./example.js 2:0-18
|
||||||
chunk {2} main-runtime.[chunkhash].js (main-runtime) 0 bytes ={3}= >{0}< >{1}< [entry] [rendered]
|
chunk {2} runtime~main.[chunkhash].js (runtime~main) 0 bytes ={3}= >{0}< >{1}< [entry] [rendered]
|
||||||
> ./example main
|
> ./example main
|
||||||
chunk {3} main.[chunkhash].js (main) 159 bytes ={2}= >{0}< >{1}< [initial] [rendered]
|
chunk {3} main.[chunkhash].js (main) 58 bytes ={2}= >{0}< >{1}< [initial] [rendered]
|
||||||
> ./example main
|
> ./example main
|
||||||
[0] ./example.js + 1 modules 159 bytes {3} [built]
|
[0] ./example.js 58 bytes {3} [built]
|
||||||
[no exports]
|
|
||||||
single entry ./example main
|
single entry ./example main
|
||||||
| ./example.js 90 bytes [built]
|
|
||||||
| [no exports]
|
|
||||||
| single entry ./example main
|
|
||||||
| ./vendor.js 69 bytes [built]
|
|
||||||
| [exports: default]
|
|
||||||
| [no exports used]
|
|
||||||
| harmony side effect evaluation ./vendor ./example.js 1:0-30
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import vendor from "./vendor";
|
|
||||||
// some module
|
// some module
|
||||||
import("./async1");
|
import("./async1");
|
||||||
import("./async2");
|
import("./async2");
|
||||||
|
|
|
@ -13,12 +13,6 @@ The configuration required for this is:
|
||||||
{{example.js}}
|
{{example.js}}
|
||||||
```
|
```
|
||||||
|
|
||||||
# vendor.js
|
|
||||||
|
|
||||||
``` javascript
|
|
||||||
{{vendor.js}}
|
|
||||||
```
|
|
||||||
|
|
||||||
# webpack.config.js
|
# webpack.config.js
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
|
@ -33,24 +27,21 @@ The configuration required for this is:
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- inlined minimized file "manifest.[chunkhash].js" -->
|
<!-- inlined minimized file "runtime~main.[chunkhash].js" -->
|
||||||
<script>
|
<script>
|
||||||
{{production:dist/main-runtime.chunkhash.js}}
|
{{production:dist/runtime~main.chunkhash.js}}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- optional when using the CommonChunkPlugin for vendor modules -->
|
|
||||||
<script src="dist/main-runtime.[chunkhash].js"></script>
|
|
||||||
|
|
||||||
<script src="dist/main.[chunkhash].js"></script>
|
<script src="dist/main.[chunkhash].js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
|
||||||
# dist/main-runtime.[chunkhash].js
|
# dist/runtime~main.[chunkhash].js
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
{{dist/main-runtime.chunkhash.js}}
|
{{dist/runtime~main.chunkhash.js}}
|
||||||
```
|
```
|
||||||
|
|
||||||
# dist/main.[chunkhash].js
|
# dist/main.[chunkhash].js
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
// some vendor lib (should be in common chunk)
|
|
||||||
export default 123;
|
|
|
@ -0,0 +1,140 @@
|
||||||
|
|
||||||
|
# example.js
|
||||||
|
|
||||||
|
``` javascript
|
||||||
|
require("./style.css");
|
||||||
|
require(["./chunk"]);
|
||||||
|
```
|
||||||
|
|
||||||
|
# style.css
|
||||||
|
|
||||||
|
``` css
|
||||||
|
body {
|
||||||
|
background: url(image.png);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
# chunk.js
|
||||||
|
|
||||||
|
``` javascript
|
||||||
|
require("./style2.css");
|
||||||
|
```
|
||||||
|
|
||||||
|
# style2.css
|
||||||
|
|
||||||
|
``` css
|
||||||
|
.xyz {
|
||||||
|
background: url(image2.png);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
# webpack.config.js
|
||||||
|
|
||||||
|
``` javascript
|
||||||
|
var ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||||
|
module.exports = {
|
||||||
|
module: {
|
||||||
|
loaders: [
|
||||||
|
{
|
||||||
|
test: /\.css$/,
|
||||||
|
use: ExtractTextPlugin.extract({
|
||||||
|
fallback: "style-loader",
|
||||||
|
use: "css-loader"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{ test: /\.png$/, loader: "file-loader" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new ExtractTextPlugin({
|
||||||
|
filename: "style.css"
|
||||||
|
})
|
||||||
|
]
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
# js/style.css
|
||||||
|
|
||||||
|
``` javascript
|
||||||
|
body {
|
||||||
|
background: url(js/ce21cbdd9b894e6af794813eb3fdaf60.png);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
# Info
|
||||||
|
|
||||||
|
## Uncompressed
|
||||||
|
|
||||||
|
```
|
||||||
|
Hash: 5be34b0d3c624e61c616
|
||||||
|
Version: webpack 3.11.0
|
||||||
|
Asset Size Chunks Chunk Names
|
||||||
|
ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted]
|
||||||
|
0.output.js 2.44 kB 0 [emitted]
|
||||||
|
output.js 21.2 kB 1 [emitted] main
|
||||||
|
style.css 71 bytes 1 [emitted] main
|
||||||
|
Entrypoint main = output.js style.css
|
||||||
|
chunk {0} 0.output.js 1.36 kB {1} [rendered]
|
||||||
|
> [0] ./example.js 2:0-20
|
||||||
|
[5] ./chunk.js 26 bytes {0} [built]
|
||||||
|
amd require ./chunk [0] ./example.js 2:0-20
|
||||||
|
[6] ./style2.css 1.01 kB {0} [built]
|
||||||
|
cjs require ./style2.css [5] ./chunk.js 1:0-23
|
||||||
|
[7] (webpack)/node_modules/css-loader!./style2.css 236 bytes {0} [built]
|
||||||
|
cjs require !!../../node_modules/css-loader/index.js!./style2.css [6] ./style2.css 4:14-78
|
||||||
|
[8] ./image2.png 82 bytes {0} [built]
|
||||||
|
cjs require ./image2.png [7] (webpack)/node_modules/css-loader!./style2.css 6:58-81
|
||||||
|
chunk {1} output.js, style.css (main) 14.1 kB [entry] [rendered]
|
||||||
|
> main [0] ./example.js
|
||||||
|
[0] ./example.js 48 bytes {1} [built]
|
||||||
|
[1] ./style.css 41 bytes {1} [built]
|
||||||
|
cjs require ./style.css [0] ./example.js 1:0-22
|
||||||
|
+ 3 hidden modules
|
||||||
|
Child extract-text-webpack-plugin ../../node_modules/extract-text-webpack-plugin/dist ../../node_modules/css-loader/index.js!style.css:
|
||||||
|
1 asset
|
||||||
|
Entrypoint undefined = extract-text-webpack-plugin-output-filename
|
||||||
|
chunk {0} extract-text-webpack-plugin-output-filename 2.58 kB [entry] [rendered]
|
||||||
|
> [0] (webpack)/node_modules/css-loader!./style.css
|
||||||
|
[0] (webpack)/node_modules/css-loader!./style.css 235 bytes {0} [built]
|
||||||
|
[2] ./image.png 82 bytes {0} [built]
|
||||||
|
cjs require ./image.png [0] (webpack)/node_modules/css-loader!./style.css 6:58-80
|
||||||
|
+ 1 hidden module
|
||||||
|
```
|
||||||
|
|
||||||
|
## Minimized (uglify-js, no zip)
|
||||||
|
|
||||||
|
```
|
||||||
|
Hash: edbe0e91ba86d814d855
|
||||||
|
Version: webpack 3.11.0
|
||||||
|
Asset Size Chunks Chunk Names
|
||||||
|
ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted]
|
||||||
|
0.output.js 343 bytes 0 [emitted]
|
||||||
|
output.js 6.58 kB 1 [emitted] main
|
||||||
|
style.css 61 bytes 1 [emitted] main
|
||||||
|
Entrypoint main = output.js style.css
|
||||||
|
chunk {0} 0.output.js 1.34 kB {1} [rendered]
|
||||||
|
> [0] ./example.js 2:0-20
|
||||||
|
[5] ./chunk.js 26 bytes {0} [built]
|
||||||
|
amd require ./chunk [0] ./example.js 2:0-20
|
||||||
|
[6] ./style2.css 1.01 kB {0} [built]
|
||||||
|
cjs require ./style2.css [5] ./chunk.js 1:0-23
|
||||||
|
[7] (webpack)/node_modules/css-loader!./style2.css 219 bytes {0} [built]
|
||||||
|
cjs require !!../../node_modules/css-loader/index.js!./style2.css [6] ./style2.css 4:14-78
|
||||||
|
[8] ./image2.png 82 bytes {0} [built]
|
||||||
|
cjs require ./image2.png [7] (webpack)/node_modules/css-loader!./style2.css 6:50-73
|
||||||
|
chunk {1} output.js, style.css (main) 14.1 kB [entry] [rendered]
|
||||||
|
> main [0] ./example.js
|
||||||
|
[0] ./example.js 48 bytes {1} [built]
|
||||||
|
[1] ./style.css 41 bytes {1} [built]
|
||||||
|
cjs require ./style.css [0] ./example.js 1:0-22
|
||||||
|
+ 3 hidden modules
|
||||||
|
Child extract-text-webpack-plugin ../../node_modules/extract-text-webpack-plugin/dist ../../node_modules/css-loader/index.js!style.css:
|
||||||
|
1 asset
|
||||||
|
Entrypoint undefined = extract-text-webpack-plugin-output-filename
|
||||||
|
chunk {0} extract-text-webpack-plugin-output-filename 2.56 kB [entry] [rendered]
|
||||||
|
> [0] (webpack)/node_modules/css-loader!./style.css
|
||||||
|
[0] (webpack)/node_modules/css-loader!./style.css 218 bytes {0} [built]
|
||||||
|
[2] ./image.png 82 bytes {0} [built]
|
||||||
|
cjs require ./image.png [0] (webpack)/node_modules/css-loader!./style.css 6:50-72
|
||||||
|
+ 1 hidden module
|
||||||
|
```
|
|
@ -311,7 +311,7 @@ module.exports = function() {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 1.86 KiB 0 [emitted]
|
0.output.js 1.86 KiB 0 [emitted]
|
||||||
output.js 7.19 KiB 1 [emitted] main
|
output.js 7.19 KiB 1 [emitted] main
|
||||||
|
@ -339,7 +339,7 @@ chunk {1} output.js (main) 261 bytes >{0}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 627 bytes 0 [emitted]
|
0.output.js 627 bytes 0 [emitted]
|
||||||
output.js 1.75 KiB 1 [emitted] main
|
output.js 1.75 KiB 1 [emitted] main
|
||||||
|
|
|
@ -311,7 +311,7 @@ module.exports = function() {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 1.86 KiB 0 [emitted]
|
0.output.js 1.86 KiB 0 [emitted]
|
||||||
output.js 7.13 KiB 1 [emitted] main
|
output.js 7.13 KiB 1 [emitted] main
|
||||||
|
@ -339,7 +339,7 @@ chunk {1} output.js (main) 276 bytes >{0}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 627 bytes 0 [emitted]
|
0.output.js 627 bytes 0 [emitted]
|
||||||
output.js 1.73 KiB 1 [emitted] main
|
output.js 1.73 KiB 1 [emitted] main
|
||||||
|
|
|
@ -266,7 +266,7 @@ module.exports = "It works";
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 257 bytes 0 [emitted]
|
0.output.js 257 bytes 0 [emitted]
|
||||||
output.js 7.56 KiB 1 [emitted] main
|
output.js 7.56 KiB 1 [emitted] main
|
||||||
|
@ -287,7 +287,7 @@ chunk {1} output.js (main) 378 bytes >{0}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 98 bytes 0 [emitted]
|
0.output.js 98 bytes 0 [emitted]
|
||||||
output.js 1.79 KiB 1 [emitted] main
|
output.js 1.79 KiB 1 [emitted] main
|
||||||
|
|
|
@ -305,7 +305,7 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 275 bytes 0 [emitted]
|
0.output.js 275 bytes 0 [emitted]
|
||||||
1.output.js 284 bytes 1 [emitted]
|
1.output.js 284 bytes 1 [emitted]
|
||||||
|
@ -337,7 +337,7 @@ chunk {3} output.js (main) 427 bytes >{0}< >{1}< >{2}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 76 bytes 0 [emitted]
|
0.output.js 76 bytes 0 [emitted]
|
||||||
1.output.js 77 bytes 1 [emitted]
|
1.output.js 77 bytes 1 [emitted]
|
||||||
|
|
|
@ -321,7 +321,7 @@ getTemplate("baz.noimport");
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 436 bytes 0 [emitted]
|
0.output.js 436 bytes 0 [emitted]
|
||||||
1.output.js 445 bytes 1 [emitted]
|
1.output.js 445 bytes 1 [emitted]
|
||||||
|
@ -361,7 +361,7 @@ chunk {3} output.js (main) 618 bytes >{0}< >{1}< >{2}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 113 bytes 0 [emitted]
|
0.output.js 113 bytes 0 [emitted]
|
||||||
1.output.js 114 bytes 1 [emitted]
|
1.output.js 114 bytes 1 [emitted]
|
||||||
|
|
|
@ -308,7 +308,7 @@ getTemplate("baz");
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 436 bytes 0 [emitted]
|
0.output.js 436 bytes 0 [emitted]
|
||||||
1.output.js 445 bytes 1 [emitted]
|
1.output.js 445 bytes 1 [emitted]
|
||||||
|
@ -348,7 +348,7 @@ chunk {3} output.js (main) 456 bytes >{0}< >{1}< >{2}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 113 bytes 0 [emitted]
|
0.output.js 113 bytes 0 [emitted]
|
||||||
1.output.js 114 bytes 1 [emitted]
|
1.output.js 114 bytes 1 [emitted]
|
||||||
|
|
|
@ -300,7 +300,7 @@ __webpack_require__(3)("./ba" + createContextVar).then(function(bar) {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 445 bytes 0 [emitted] chunk-bar-baz2
|
0.output.js 445 bytes 0 [emitted] chunk-bar-baz2
|
||||||
1.output.js 439 bytes 1 [emitted] chunk-bar-baz0
|
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
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 114 bytes 0 [emitted] chunk-bar-baz2
|
0.output.js 114 bytes 0 [emitted] chunk-bar-baz2
|
||||||
1.output.js 115 bytes 1 [emitted] chunk-bar-baz0
|
1.output.js 115 bytes 1 [emitted] chunk-bar-baz0
|
||||||
|
|
|
@ -301,7 +301,7 @@ Minimized
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 490 bytes 0 [emitted]
|
0.output.js 490 bytes 0 [emitted]
|
||||||
output.js 7.47 KiB 1 [emitted] main
|
output.js 7.47 KiB 1 [emitted] main
|
||||||
|
@ -320,7 +320,7 @@ chunk {1} output.js (main) 166 bytes >{0}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 95 bytes 0 [emitted]
|
0.output.js 95 bytes 0 [emitted]
|
||||||
output.js 1.68 KiB 1 [emitted] main
|
output.js 1.68 KiB 1 [emitted] main
|
||||||
|
|
|
@ -153,7 +153,7 @@ module.exports = 42;
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 3.35 KiB 0 [emitted] main
|
output.js 3.35 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
@ -172,7 +172,7 @@ chunk {0} output.js (main) 206 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 708 bytes 0 [emitted] main
|
output.js 708 bytes 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
|
|
@ -49,12 +49,14 @@ module.exports = {
|
||||||
commons: {
|
commons: {
|
||||||
chunks: "initial",
|
chunks: "initial",
|
||||||
minChunks: 2,
|
minChunks: 2,
|
||||||
|
maxInitialRequests: 5, // The default limit is too small to showcase the effect
|
||||||
minSize: 0 // This is example is too small to create commons chunks
|
minSize: 0 // This is example is too small to create commons chunks
|
||||||
},
|
},
|
||||||
vendor: {
|
vendor: {
|
||||||
test: /node_modules/,
|
test: /node_modules/,
|
||||||
chunks: "initial",
|
chunks: "initial",
|
||||||
name: "vendor",
|
name: "vendor",
|
||||||
|
priority: 10,
|
||||||
enforce: true
|
enforce: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,7 +72,7 @@ module.exports = {
|
||||||
# dist/vendor.js
|
# dist/vendor.js
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
|
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
|
||||||
|
|
||||||
/***/ 1:
|
/***/ 1:
|
||||||
/*!*********************************!*\
|
/*!*********************************!*\
|
||||||
|
@ -100,7 +102,7 @@ module.exports = "vendor2";
|
||||||
# dist/commons~pageA~pageB~pageC.js
|
# dist/commons~pageA~pageB~pageC.js
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
|
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
|
||||||
|
|
||||||
/***/ 3:
|
/***/ 3:
|
||||||
/*!*********************!*\
|
/*!*********************!*\
|
||||||
|
@ -119,7 +121,7 @@ module.exports = "utility2";
|
||||||
# dist/commons~pageB~pageC.js
|
# dist/commons~pageB~pageC.js
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
|
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
|
||||||
|
|
||||||
/***/ 6:
|
/***/ 6:
|
||||||
/*!*********************!*\
|
/*!*********************!*\
|
||||||
|
@ -270,7 +272,7 @@ module.exports = "utility3";
|
||||||
/******/
|
/******/
|
||||||
/******/
|
/******/
|
||||||
/******/ // add entry module to deferred list
|
/******/ // add entry module to deferred list
|
||||||
/******/ deferredModules.push([0,3,5]);
|
/******/ deferredModules.push([0,3,4]);
|
||||||
/******/ // run deferred modules when ready
|
/******/ // run deferred modules when ready
|
||||||
/******/ return checkDeferredModules();
|
/******/ return checkDeferredModules();
|
||||||
/******/ })
|
/******/ })
|
||||||
|
@ -602,7 +604,7 @@ module.exports = "pageB";
|
||||||
/******/
|
/******/
|
||||||
/******/
|
/******/
|
||||||
/******/ // add entry module to deferred list
|
/******/ // add entry module to deferred list
|
||||||
/******/ deferredModules.push([7,3,4]);
|
/******/ deferredModules.push([7,4,5]);
|
||||||
/******/ // run deferred modules when ready
|
/******/ // run deferred modules when ready
|
||||||
/******/ return checkDeferredModules();
|
/******/ return checkDeferredModules();
|
||||||
/******/ })
|
/******/ })
|
||||||
|
@ -632,18 +634,18 @@ module.exports = "pageC";
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
pageA.js 5.6 KiB 0 [emitted] pageA
|
pageA.js 5.6 KiB 0 [emitted] pageA
|
||||||
pageB.js 5.4 KiB 1 [emitted] pageB
|
pageB.js 5.4 KiB 1 [emitted] pageB
|
||||||
pageC.js 5.34 KiB 2 [emitted] pageC
|
pageC.js 5.34 KiB 2 [emitted] pageC
|
||||||
commons~pageA~pageB~pageC.js 269 bytes 3 [emitted] commons~pageA~pageB~pageC
|
vendor.js 536 bytes 3 [emitted] vendor
|
||||||
commons~pageB~pageC.js 269 bytes 4 [emitted] commons~pageB~pageC
|
commons~pageA~pageB~pageC.js 269 bytes 4 [emitted] commons~pageA~pageB~pageC
|
||||||
vendor.js 536 bytes 5 [emitted] vendor
|
commons~pageB~pageC.js 269 bytes 5 [emitted] commons~pageB~pageC
|
||||||
Entrypoint pageA = commons~pageA~pageB~pageC.js vendor.js pageA.js
|
Entrypoint pageA = vendor.js commons~pageA~pageB~pageC.js pageA.js
|
||||||
Entrypoint pageB = commons~pageA~pageB~pageC.js commons~pageB~pageC.js vendor.js pageB.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
|
Entrypoint pageC = commons~pageA~pageB~pageC.js commons~pageB~pageC.js pageC.js
|
||||||
chunk {0} pageA.js (pageA) 170 bytes ={3}= ={5}= [entry] [rendered]
|
chunk {0} pageA.js (pageA) 170 bytes ={3}= ={4}= [entry] [rendered]
|
||||||
> ./pageA pageA
|
> ./pageA pageA
|
||||||
[0] ./pageA.js 142 bytes {0} [built]
|
[0] ./pageA.js 142 bytes {0} [built]
|
||||||
single entry ./pageA pageA
|
single entry ./pageA pageA
|
||||||
|
@ -653,72 +655,72 @@ chunk {1} pageB.js (pageB) 142 bytes ={3}= ={4}= ={5}= [entry] [rendered]
|
||||||
> ./pageB pageB
|
> ./pageB pageB
|
||||||
[4] ./pageB.js 142 bytes {1} [built]
|
[4] ./pageB.js 142 bytes {1} [built]
|
||||||
single entry ./pageB pageB
|
single entry ./pageB pageB
|
||||||
chunk {2} pageC.js (pageC) 105 bytes ={3}= ={4}= [entry] [rendered]
|
chunk {2} pageC.js (pageC) 105 bytes ={4}= ={5}= [entry] [rendered]
|
||||||
> ./pageC pageC
|
> ./pageC pageC
|
||||||
[7] ./pageC.js 105 bytes {2} [built]
|
[7] ./pageC.js 105 bytes {2} [built]
|
||||||
single entry ./pageC pageC
|
single entry ./pageC pageC
|
||||||
chunk {3} commons~pageA~pageB~pageC.js (commons~pageA~pageB~pageC) 28 bytes ={4}= ={2}= ={5}= ={1}= ={0}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageA~pageB~pageC)
|
chunk {3} vendor.js (vendor) 54 bytes ={0}= ={1}= ={4}= ={5}= [initial] [rendered] split chunk (cache group: vendor) (name: vendor)
|
||||||
> ./pageC pageC
|
|
||||||
> ./pageB pageB
|
|
||||||
> ./pageA pageA
|
|
||||||
[3] ./utility2.js 28 bytes {3} [built]
|
|
||||||
cjs require ./utility2 [0] ./pageA.js 3:15-36
|
|
||||||
cjs require ./utility2 [4] ./pageB.js 2:15-36
|
|
||||||
cjs require ./utility2 [7] ./pageC.js 1:15-36
|
|
||||||
chunk {4} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={3}= ={2}= ={5}= ={1}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageB~pageC)
|
|
||||||
> ./pageC pageC
|
|
||||||
> ./pageB pageB
|
|
||||||
[6] ./utility3.js 28 bytes {4} [built]
|
|
||||||
cjs require ./utility3 [4] ./pageB.js 3:15-36
|
|
||||||
cjs require ./utility3 [7] ./pageC.js 2:15-36
|
|
||||||
chunk {5} vendor.js (vendor) 54 bytes ={3}= ={0}= ={4}= ={1}= [initial] [rendered] split chunk (cache group: vendor) (name: vendor)
|
|
||||||
> ./pageA pageA
|
> ./pageA pageA
|
||||||
> ./pageB pageB
|
> ./pageB pageB
|
||||||
2 modules
|
2 modules
|
||||||
|
chunk {4} commons~pageA~pageB~pageC.js (commons~pageA~pageB~pageC) 28 bytes ={0}= ={1}= ={2}= ={3}= ={5}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageA~pageB~pageC)
|
||||||
|
> ./pageA pageA
|
||||||
|
> ./pageB pageB
|
||||||
|
> ./pageC pageC
|
||||||
|
[3] ./utility2.js 28 bytes {4} [built]
|
||||||
|
cjs require ./utility2 [0] ./pageA.js 3:15-36
|
||||||
|
cjs require ./utility2 [4] ./pageB.js 2:15-36
|
||||||
|
cjs require ./utility2 [7] ./pageC.js 1:15-36
|
||||||
|
chunk {5} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={1}= ={2}= ={3}= ={4}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageB~pageC)
|
||||||
|
> ./pageB pageB
|
||||||
|
> ./pageC pageC
|
||||||
|
[6] ./utility3.js 28 bytes {5} [built]
|
||||||
|
cjs require ./utility3 [4] ./pageB.js 3:15-36
|
||||||
|
cjs require ./utility3 [7] ./pageC.js 2:15-36
|
||||||
```
|
```
|
||||||
|
|
||||||
## Production mode
|
## Production mode
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
vendor.js 134 bytes 0 [emitted] vendor
|
commons~pageA~pageB~pageC.js 96 bytes 0 [emitted] commons~pageA~pageB~pageC
|
||||||
commons~pageB~pageC.js 97 bytes 1 [emitted] commons~pageB~pageC
|
commons~pageB~pageC.js 97 bytes 1 [emitted] commons~pageB~pageC
|
||||||
commons~pageA~pageB~pageC.js 96 bytes 2 [emitted] commons~pageA~pageB~pageC
|
vendor.js 134 bytes 2 [emitted] vendor
|
||||||
pageC.js 1.1 KiB 3 [emitted] pageC
|
pageC.js 1.1 KiB 3 [emitted] pageC
|
||||||
pageB.js 1.11 KiB 4 [emitted] pageB
|
pageB.js 1.11 KiB 4 [emitted] pageB
|
||||||
pageA.js 1.15 KiB 5 [emitted] pageA
|
pageA.js 1.15 KiB 5 [emitted] pageA
|
||||||
Entrypoint pageA = commons~pageA~pageB~pageC.js vendor.js pageA.js
|
Entrypoint pageA = vendor.js commons~pageA~pageB~pageC.js pageA.js
|
||||||
Entrypoint pageB = commons~pageA~pageB~pageC.js commons~pageB~pageC.js vendor.js pageB.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
|
Entrypoint pageC = commons~pageA~pageB~pageC.js commons~pageB~pageC.js pageC.js
|
||||||
chunk {0} vendor.js (vendor) 54 bytes ={2}= ={5}= ={1}= ={4}= [initial] [rendered] split chunk (cache group: vendor) (name: vendor)
|
chunk {0} commons~pageA~pageB~pageC.js (commons~pageA~pageB~pageC) 28 bytes ={1}= ={2}= ={3}= ={4}= ={5}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageA~pageB~pageC)
|
||||||
> ./pageA pageA
|
> ./pageA pageA
|
||||||
> ./pageB pageB
|
> ./pageB pageB
|
||||||
2 modules
|
|
||||||
chunk {1} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={2}= ={3}= ={0}= ={4}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageB~pageC)
|
|
||||||
> ./pageC pageC
|
> ./pageC pageC
|
||||||
> ./pageB pageB
|
[0] ./utility2.js 28 bytes {0} [built]
|
||||||
[1] ./utility3.js 28 bytes {1} [built]
|
|
||||||
cjs require ./utility3 [2] ./pageC.js 2:15-36
|
|
||||||
cjs require ./utility3 [4] ./pageB.js 3:15-36
|
|
||||||
chunk {2} commons~pageA~pageB~pageC.js (commons~pageA~pageB~pageC) 28 bytes ={1}= ={3}= ={0}= ={4}= ={5}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageA~pageB~pageC)
|
|
||||||
> ./pageC pageC
|
|
||||||
> ./pageB pageB
|
|
||||||
> ./pageA pageA
|
|
||||||
[0] ./utility2.js 28 bytes {2} [built]
|
|
||||||
cjs require ./utility2 [2] ./pageC.js 1:15-36
|
cjs require ./utility2 [2] ./pageC.js 1:15-36
|
||||||
cjs require ./utility2 [4] ./pageB.js 2:15-36
|
cjs require ./utility2 [4] ./pageB.js 2:15-36
|
||||||
cjs require ./utility2 [7] ./pageA.js 3:15-36
|
cjs require ./utility2 [7] ./pageA.js 3:15-36
|
||||||
chunk {3} pageC.js (pageC) 105 bytes ={2}= ={1}= [entry] [rendered]
|
chunk {1} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={0}= ={2}= ={3}= ={4}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageB~pageC)
|
||||||
|
> ./pageB pageB
|
||||||
|
> ./pageC pageC
|
||||||
|
[1] ./utility3.js 28 bytes {1} [built]
|
||||||
|
cjs require ./utility3 [2] ./pageC.js 2:15-36
|
||||||
|
cjs require ./utility3 [4] ./pageB.js 3:15-36
|
||||||
|
chunk {2} vendor.js (vendor) 54 bytes ={0}= ={1}= ={4}= ={5}= [initial] [rendered] split chunk (cache group: vendor) (name: vendor)
|
||||||
|
> ./pageA pageA
|
||||||
|
> ./pageB pageB
|
||||||
|
2 modules
|
||||||
|
chunk {3} pageC.js (pageC) 105 bytes ={0}= ={1}= [entry] [rendered]
|
||||||
> ./pageC pageC
|
> ./pageC pageC
|
||||||
[2] ./pageC.js 105 bytes {3} [built]
|
[2] ./pageC.js 105 bytes {3} [built]
|
||||||
single entry ./pageC pageC
|
single entry ./pageC pageC
|
||||||
chunk {4} pageB.js (pageB) 142 bytes ={2}= ={1}= ={0}= [entry] [rendered]
|
chunk {4} pageB.js (pageB) 142 bytes ={0}= ={1}= ={2}= [entry] [rendered]
|
||||||
> ./pageB pageB
|
> ./pageB pageB
|
||||||
[4] ./pageB.js 142 bytes {4} [built]
|
[4] ./pageB.js 142 bytes {4} [built]
|
||||||
single entry ./pageB pageB
|
single entry ./pageB pageB
|
||||||
chunk {5} pageA.js (pageA) 170 bytes ={2}= ={0}= [entry] [rendered]
|
chunk {5} pageA.js (pageA) 170 bytes ={0}= ={2}= [entry] [rendered]
|
||||||
> ./pageA pageA
|
> ./pageA pageA
|
||||||
[5] ./utility1.js 28 bytes {5} [built]
|
[5] ./utility1.js 28 bytes {5} [built]
|
||||||
cjs require ./utility1 [7] ./pageA.js 2:15-36
|
cjs require ./utility1 [7] ./pageA.js 2:15-36
|
||||||
|
|
|
@ -13,12 +13,14 @@ module.exports = {
|
||||||
commons: {
|
commons: {
|
||||||
chunks: "initial",
|
chunks: "initial",
|
||||||
minChunks: 2,
|
minChunks: 2,
|
||||||
|
maxInitialRequests: 5, // The default limit is too small to showcase the effect
|
||||||
minSize: 0 // This is example is too small to create commons chunks
|
minSize: 0 // This is example is too small to create commons chunks
|
||||||
},
|
},
|
||||||
vendor: {
|
vendor: {
|
||||||
test: /node_modules/,
|
test: /node_modules/,
|
||||||
chunks: "initial",
|
chunks: "initial",
|
||||||
name: "vendor",
|
name: "vendor",
|
||||||
|
priority: 10,
|
||||||
enforce: true
|
enforce: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -430,7 +430,7 @@ module.exports = function() {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 340 bytes 0 [emitted]
|
0.output.js 340 bytes 0 [emitted]
|
||||||
1.output.js 549 bytes 1 [emitted]
|
1.output.js 549 bytes 1 [emitted]
|
||||||
|
@ -438,9 +438,9 @@ Version: webpack next
|
||||||
3.output.js 414 bytes 3 [emitted]
|
3.output.js 414 bytes 3 [emitted]
|
||||||
output.js 7.53 KiB 4 [emitted] main
|
output.js 7.53 KiB 4 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
chunk {0} 0.output.js 72 bytes <{1}> <{4}> ={3}= ={2}= [rendered] split chunk (cache group: default)
|
chunk {0} 0.output.js 72 bytes <{1}> <{4}> ={2}= ={3}= [rendered] split chunk (cache group: default)
|
||||||
> [2] ./pageB.js 3:1-6:3
|
|
||||||
> [0] ./example.js 3:1-6:3
|
> [0] ./example.js 3:1-6:3
|
||||||
|
> [2] ./pageB.js 3:1-6:3
|
||||||
[4] ./reusableComponent.js 72 bytes {0} [built]
|
[4] ./reusableComponent.js 72 bytes {0} [built]
|
||||||
cjs require ./reusableComponent [3] ./pageA.js 1:24-54
|
cjs require ./reusableComponent [3] ./pageA.js 1:24-54
|
||||||
cjs require ./reusableComponent [5] ./pageC.js 1:24-54
|
cjs require ./reusableComponent [5] ./pageC.js 1:24-54
|
||||||
|
@ -456,7 +456,7 @@ chunk {3} 3.output.js 142 bytes <{1}> ={0}= [rendered]
|
||||||
> [2] ./pageB.js 3:1-6:3
|
> [2] ./pageB.js 3:1-6:3
|
||||||
[5] ./pageC.js 142 bytes {3} [built]
|
[5] ./pageC.js 142 bytes {3} [built]
|
||||||
cjs require ./pageC [2] ./pageB.js 4:15-33
|
cjs require ./pageC [2] ./pageB.js 4:15-33
|
||||||
chunk {4} output.js (main) 261 bytes >{0}< >{2}< >{1}< [entry] [rendered]
|
chunk {4} output.js (main) 261 bytes >{0}< >{1}< >{2}< [entry] [rendered]
|
||||||
> main
|
> main
|
||||||
[0] ./example.js 233 bytes {4} [built]
|
[0] ./example.js 233 bytes {4} [built]
|
||||||
single entry ./example.js [1] multi ./example.js main:100000
|
single entry ./example.js [1] multi ./example.js main:100000
|
||||||
|
@ -468,7 +468,7 @@ chunk {4} output.js (main) 261 bytes >{0}< >{2}< >{1}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 133 bytes 0 [emitted]
|
0.output.js 133 bytes 0 [emitted]
|
||||||
1.output.js 198 bytes 1 [emitted]
|
1.output.js 198 bytes 1 [emitted]
|
||||||
|
@ -476,9 +476,9 @@ Version: webpack next
|
||||||
3.output.js 138 bytes 3 [emitted]
|
3.output.js 138 bytes 3 [emitted]
|
||||||
output.js 1.76 KiB 4 [emitted] main
|
output.js 1.76 KiB 4 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
chunk {0} 0.output.js 72 bytes <{1}> <{4}> ={3}= ={2}= [rendered] split chunk (cache group: default)
|
chunk {0} 0.output.js 72 bytes <{1}> <{4}> ={2}= ={3}= [rendered] split chunk (cache group: default)
|
||||||
> [2] ./pageB.js 3:1-6:3
|
|
||||||
> [0] ./example.js 3:1-6:3
|
> [0] ./example.js 3:1-6:3
|
||||||
|
> [2] ./pageB.js 3:1-6:3
|
||||||
[4] ./reusableComponent.js 72 bytes {0} [built]
|
[4] ./reusableComponent.js 72 bytes {0} [built]
|
||||||
cjs require ./reusableComponent [3] ./pageA.js 1:24-54
|
cjs require ./reusableComponent [3] ./pageA.js 1:24-54
|
||||||
cjs require ./reusableComponent [5] ./pageC.js 1:24-54
|
cjs require ./reusableComponent [5] ./pageC.js 1:24-54
|
||||||
|
@ -494,7 +494,7 @@ chunk {3} 3.output.js 142 bytes <{1}> ={0}= [rendered]
|
||||||
> [2] ./pageB.js 3:1-6:3
|
> [2] ./pageB.js 3:1-6:3
|
||||||
[5] ./pageC.js 142 bytes {3} [built]
|
[5] ./pageC.js 142 bytes {3} [built]
|
||||||
cjs require ./pageC [2] ./pageB.js 4:15-33
|
cjs require ./pageC [2] ./pageB.js 4:15-33
|
||||||
chunk {4} output.js (main) 261 bytes >{0}< >{2}< >{1}< [entry] [rendered]
|
chunk {4} output.js (main) 261 bytes >{0}< >{1}< >{2}< [entry] [rendered]
|
||||||
> main
|
> main
|
||||||
[0] ./example.js 233 bytes {4} [built]
|
[0] ./example.js 233 bytes {4} [built]
|
||||||
single entry ./example.js [1] multi ./example.js main:100000
|
single entry ./example.js [1] multi ./example.js main:100000
|
||||||
|
|
|
@ -167,7 +167,7 @@ exports.add = function() {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 3.44 KiB 0 [emitted] main
|
output.js 3.44 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
@ -185,7 +185,7 @@ chunk {0} output.js (main) 329 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 740 bytes 0 [emitted] main
|
output.js 740 bytes 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
|
|
@ -166,7 +166,7 @@ function square(n) {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
vendor.js 3.32 KiB 0 [emitted] main
|
vendor.js 3.32 KiB 0 [emitted] main
|
||||||
Entrypoint main = vendor.js
|
Entrypoint main = vendor.js
|
||||||
|
@ -182,7 +182,7 @@ chunk {0} vendor.js (main) 60 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
vendor.js 704 bytes 0 [emitted] main
|
vendor.js 704 bytes 0 [emitted] main
|
||||||
Entrypoint main = vendor.js
|
Entrypoint main = vendor.js
|
||||||
|
|
|
@ -174,7 +174,7 @@ module.exports = vendor_lib_9ee2f174307b7ef21301;
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
app.js 3.9 KiB 0 [emitted] main
|
app.js 3.9 KiB 0 [emitted] main
|
||||||
Entrypoint main = app.js
|
Entrypoint main = app.js
|
||||||
|
@ -196,7 +196,7 @@ chunk {0} app.js (main) 182 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
app.js 736 bytes 0 [emitted] main
|
app.js 736 bytes 0 [emitted] main
|
||||||
Entrypoint main = app.js
|
Entrypoint main = app.js
|
||||||
|
|
|
@ -227,7 +227,7 @@ module.exports = (__webpack_require__(/*! dll-reference alpha_ae937b5d3e880b635a
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 6.19 KiB 0 [emitted] main
|
output.js 6.19 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
@ -261,7 +261,7 @@ chunk {0} output.js (main) 549 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 972 bytes 0 [emitted] main
|
output.js 972 bytes 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
|
|
@ -177,7 +177,7 @@ module.exports = "module";
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
MyDll.alpha.js 3.46 KiB 0 [emitted] alpha
|
MyDll.alpha.js 3.46 KiB 0 [emitted] alpha
|
||||||
MyDll.beta.js 3.43 KiB 1 [emitted] beta
|
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
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
MyDll.beta.js 691 bytes 0 [emitted] beta
|
MyDll.beta.js 691 bytes 0 [emitted] beta
|
||||||
MyDll.alpha.js 700 bytes 1 [emitted] alpha
|
MyDll.alpha.js 700 bytes 1 [emitted] alpha
|
||||||
|
|
|
@ -281,7 +281,7 @@ module.exports = vendor_36000db9190edee14765;
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Child vendor:
|
Child vendor:
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
|
@ -335,7 +335,7 @@ Child app:
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Child vendor:
|
Child vendor:
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
|
|
|
@ -183,7 +183,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 4.17 KiB 0 [emitted] main
|
output.js 4.17 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
@ -201,7 +201,7 @@ chunk {0} output.js (main) 197 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 1.02 KiB 0 [emitted] main
|
output.js 1.02 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
|
|
@ -228,9 +228,9 @@ module.exports = {
|
||||||
/*! no static exports found */
|
/*! no static exports found */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
Promise.all(/*! AMD require */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(4)]).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./a */ 1), __webpack_require__(/*! ./b */ 0), __webpack_require__(/*! ./c */ 7)]; (function(a, b, c) {}).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);}).catch(__webpack_require__.oe);
|
Promise.all(/*! AMD require */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(4)]).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./a */ 1), __webpack_require__(/*! ./b */ 0), __webpack_require__(/*! ./c */ 7)]; (function(a, b, c) {}).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);}).catch(__webpack_require__.oe);
|
||||||
|
|
||||||
Promise.all(/*! require.ensure */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(3)]).then((function(require) {
|
Promise.all(/*! require.ensure */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(3)]).then((function(require) {
|
||||||
__webpack_require__(/*! ./b */ 0);
|
__webpack_require__(/*! ./b */ 0);
|
||||||
__webpack_require__(/*! ./d */ 6);
|
__webpack_require__(/*! ./d */ 6);
|
||||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||||
|
@ -257,7 +257,7 @@ Promise.all(/*! require.ensure */[__webpack_require__.e(0), __webpack_require__.
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 247 bytes 0 [emitted]
|
0.output.js 247 bytes 0 [emitted]
|
||||||
1.output.js 238 bytes 1 [emitted]
|
1.output.js 238 bytes 1 [emitted]
|
||||||
|
@ -268,20 +268,20 @@ Version: webpack next
|
||||||
6.output.js 241 bytes 6 [emitted]
|
6.output.js 241 bytes 6 [emitted]
|
||||||
output.js 8.07 KiB 7 [emitted] main
|
output.js 8.07 KiB 7 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
chunk {0} 0.output.js 21 bytes <{7}> ={2}= ={1}= ={3}= ={4}= >{1}< >{5}< >{6}< [rendered] split chunk (cache group: default)
|
chunk {0} 0.output.js 21 bytes <{7}> ={1}= ={2}= ={3}= ={4}= >{1}< >{5}< >{6}< [rendered] split chunk (cache group: default)
|
||||||
> [2] ./example.js 8:0-16:2
|
|
||||||
> [2] ./example.js 3:0-6:2
|
|
||||||
> ./a ./b ./c [2] ./example.js 1:0-52
|
> ./a ./b ./c [2] ./example.js 1:0-52
|
||||||
|
> [2] ./example.js 3:0-6:2
|
||||||
|
> [2] ./example.js 8:0-16:2
|
||||||
[1] ./a.js 21 bytes {0} [built]
|
[1] ./a.js 21 bytes {0} [built]
|
||||||
amd require ./a [2] ./example.js 1:0-52
|
amd require ./a [2] ./example.js 1:0-52
|
||||||
require.ensure item ./a [2] ./example.js 3:0-6:2
|
require.ensure item ./a [2] ./example.js 3:0-6:2
|
||||||
require.ensure item ./a [2] ./example.js 8:0-16:2
|
require.ensure item ./a [2] ./example.js 8:0-16:2
|
||||||
cjs require ./a [2] ./example.js 9:1-15
|
cjs require ./a [2] ./example.js 9:1-15
|
||||||
chunk {1} 1.output.js 21 bytes <{0}> <{2}> <{7}> ={5}= ={6}= ={0}= ={3}= ={4}= [rendered] split chunk (cache group: default)
|
chunk {1} 1.output.js 21 bytes <{0}> <{2}> <{7}> ={0}= ={3}= ={4}= ={5}= ={6}= [rendered] split chunk (cache group: default)
|
||||||
> [2] ./example.js 13:1-15:3
|
|
||||||
> [2] ./example.js 10:1-12:3
|
> [2] ./example.js 10:1-12:3
|
||||||
> [2] ./example.js 3:0-6:2
|
> [2] ./example.js 13:1-15:3
|
||||||
> ./a ./b ./c [2] ./example.js 1:0-52
|
> ./a ./b ./c [2] ./example.js 1:0-52
|
||||||
|
> [2] ./example.js 3:0-6:2
|
||||||
[0] ./b.js 21 bytes {1} [built]
|
[0] ./b.js 21 bytes {1} [built]
|
||||||
amd require ./b [2] ./example.js 1:0-52
|
amd require ./b [2] ./example.js 1:0-52
|
||||||
cjs require ./b [2] ./example.js 4:1-15
|
cjs require ./b [2] ./example.js 4:1-15
|
||||||
|
@ -307,7 +307,7 @@ chunk {6} 6.output.js 21 bytes <{0}> <{2}> ={1}= [rendered]
|
||||||
> [2] ./example.js 10:1-12:3
|
> [2] ./example.js 10:1-12:3
|
||||||
[4] ./f.js 21 bytes {6} [built]
|
[4] ./f.js 21 bytes {6} [built]
|
||||||
cjs require ./f [2] ./example.js 11:2-16
|
cjs require ./f [2] ./example.js 11:2-16
|
||||||
chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{3}< >{4}< >{2}< [entry] [rendered]
|
chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered]
|
||||||
> .\example.js main
|
> .\example.js main
|
||||||
[2] ./example.js 362 bytes {7} [built]
|
[2] ./example.js 362 bytes {7} [built]
|
||||||
single entry .\example.js main
|
single entry .\example.js main
|
||||||
|
@ -317,7 +317,7 @@ chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{3}< >{4}< >{2}< [entry] [r
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 90 bytes 0 [emitted]
|
0.output.js 90 bytes 0 [emitted]
|
||||||
1.output.js 89 bytes 1 [emitted]
|
1.output.js 89 bytes 1 [emitted]
|
||||||
|
@ -328,20 +328,20 @@ Version: webpack next
|
||||||
6.output.js 91 bytes 6 [emitted]
|
6.output.js 91 bytes 6 [emitted]
|
||||||
output.js 2.02 KiB 7 [emitted] main
|
output.js 2.02 KiB 7 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
chunk {0} 0.output.js 21 bytes <{7}> ={2}= ={1}= ={3}= ={4}= >{1}< >{5}< >{6}< [rendered] split chunk (cache group: default)
|
chunk {0} 0.output.js 21 bytes <{7}> ={1}= ={2}= ={3}= ={4}= >{1}< >{5}< >{6}< [rendered] split chunk (cache group: default)
|
||||||
> [2] ./example.js 8:0-16:2
|
|
||||||
> [2] ./example.js 3:0-6:2
|
|
||||||
> ./a ./b ./c [2] ./example.js 1:0-52
|
> ./a ./b ./c [2] ./example.js 1:0-52
|
||||||
|
> [2] ./example.js 3:0-6:2
|
||||||
|
> [2] ./example.js 8:0-16:2
|
||||||
[1] ./a.js 21 bytes {0} [built]
|
[1] ./a.js 21 bytes {0} [built]
|
||||||
amd require ./a [2] ./example.js 1:0-52
|
amd require ./a [2] ./example.js 1:0-52
|
||||||
require.ensure item ./a [2] ./example.js 3:0-6:2
|
require.ensure item ./a [2] ./example.js 3:0-6:2
|
||||||
require.ensure item ./a [2] ./example.js 8:0-16:2
|
require.ensure item ./a [2] ./example.js 8:0-16:2
|
||||||
cjs require ./a [2] ./example.js 9:1-15
|
cjs require ./a [2] ./example.js 9:1-15
|
||||||
chunk {1} 1.output.js 21 bytes <{0}> <{2}> <{7}> ={5}= ={6}= ={0}= ={3}= ={4}= [rendered] split chunk (cache group: default)
|
chunk {1} 1.output.js 21 bytes <{0}> <{2}> <{7}> ={0}= ={3}= ={4}= ={5}= ={6}= [rendered] split chunk (cache group: default)
|
||||||
> [2] ./example.js 13:1-15:3
|
|
||||||
> [2] ./example.js 10:1-12:3
|
> [2] ./example.js 10:1-12:3
|
||||||
> [2] ./example.js 3:0-6:2
|
> [2] ./example.js 13:1-15:3
|
||||||
> ./a ./b ./c [2] ./example.js 1:0-52
|
> ./a ./b ./c [2] ./example.js 1:0-52
|
||||||
|
> [2] ./example.js 3:0-6:2
|
||||||
[0] ./b.js 21 bytes {1} [built]
|
[0] ./b.js 21 bytes {1} [built]
|
||||||
amd require ./b [2] ./example.js 1:0-52
|
amd require ./b [2] ./example.js 1:0-52
|
||||||
cjs require ./b [2] ./example.js 4:1-15
|
cjs require ./b [2] ./example.js 4:1-15
|
||||||
|
@ -367,7 +367,7 @@ chunk {6} 6.output.js 21 bytes <{0}> <{2}> ={1}= [rendered]
|
||||||
> [2] ./example.js 10:1-12:3
|
> [2] ./example.js 10:1-12:3
|
||||||
[4] ./f.js 21 bytes {6} [built]
|
[4] ./f.js 21 bytes {6} [built]
|
||||||
cjs require ./f [2] ./example.js 11:2-16
|
cjs require ./f [2] ./example.js 11:2-16
|
||||||
chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{3}< >{4}< >{2}< [entry] [rendered]
|
chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered]
|
||||||
> .\example.js main
|
> .\example.js main
|
||||||
[2] ./example.js 362 bytes {7} [built]
|
[2] ./example.js 362 bytes {7} [built]
|
||||||
single entry .\example.js main
|
single entry .\example.js main
|
||||||
|
|
|
@ -324,7 +324,7 @@ module.exports = "c";
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 405 bytes 0 [emitted]
|
0.output.js 405 bytes 0 [emitted]
|
||||||
1.output.js 241 bytes 1 [emitted]
|
1.output.js 241 bytes 1 [emitted]
|
||||||
|
@ -332,8 +332,8 @@ Version: webpack next
|
||||||
output.js 7.32 KiB 3 [emitted] main
|
output.js 7.32 KiB 3 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
chunk {0} 0.output.js 42 bytes <{3}> ={1}= ={2}= [rendered] split chunk (cache group: default)
|
chunk {0} 0.output.js 42 bytes <{3}> ={1}= ={2}= [rendered] split chunk (cache group: default)
|
||||||
> [2] ./example.js 5:0-8:2
|
|
||||||
> ./a ./b ./c [2] ./example.js 2:0-30
|
> ./a ./b ./c [2] ./example.js 2:0-30
|
||||||
|
> [2] ./example.js 5:0-8:2
|
||||||
[0] ./b.js 21 bytes {0} [built]
|
[0] ./b.js 21 bytes {0} [built]
|
||||||
amd require ./b [2] ./example.js 2:0-30
|
amd require ./b [2] ./example.js 2:0-30
|
||||||
cjs require ./b [2] ./example.js 6:1-15
|
cjs require ./b [2] ./example.js 6:1-15
|
||||||
|
@ -358,7 +358,7 @@ chunk {3} output.js (main) 172 bytes >{0}< >{1}< >{2}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 118 bytes 0 [emitted]
|
0.output.js 118 bytes 0 [emitted]
|
||||||
1.output.js 91 bytes 1 [emitted]
|
1.output.js 91 bytes 1 [emitted]
|
||||||
|
@ -366,8 +366,8 @@ Version: webpack next
|
||||||
output.js 1.73 KiB 3 [emitted] main
|
output.js 1.73 KiB 3 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
chunk {0} 0.output.js 42 bytes <{3}> ={1}= ={2}= [rendered] split chunk (cache group: default)
|
chunk {0} 0.output.js 42 bytes <{3}> ={1}= ={2}= [rendered] split chunk (cache group: default)
|
||||||
> [2] ./example.js 5:0-8:2
|
|
||||||
> ./a ./b ./c [2] ./example.js 2:0-30
|
> ./a ./b ./c [2] ./example.js 2:0-30
|
||||||
|
> [2] ./example.js 5:0-8:2
|
||||||
[0] ./b.js 21 bytes {0} [built]
|
[0] ./b.js 21 bytes {0} [built]
|
||||||
amd require ./b [2] ./example.js 2:0-30
|
amd require ./b [2] ./example.js 2:0-30
|
||||||
cjs require ./b [2] ./example.js 6:1-15
|
cjs require ./b [2] ./example.js 6:1-15
|
||||||
|
|
|
@ -260,7 +260,7 @@ var named = "named";
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 6.13 KiB 0 [emitted] main
|
output.js 6.13 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
@ -292,7 +292,7 @@ chunk {0} output.js (main) 1.17 KiB [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 993 bytes 0 [emitted] main
|
output.js 993 bytes 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
|
|
@ -137,7 +137,7 @@ function increment() {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
MyLibrary.umd.js 3.56 KiB 0 [emitted] main
|
MyLibrary.umd.js 3.56 KiB 0 [emitted] main
|
||||||
Entrypoint main = MyLibrary.umd.js
|
Entrypoint main = MyLibrary.umd.js
|
||||||
|
@ -152,7 +152,7 @@ chunk {0} MyLibrary.umd.js (main) 97 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
MyLibrary.umd.js 926 bytes 0 [emitted] main
|
MyLibrary.umd.js 926 bytes 0 [emitted] main
|
||||||
Entrypoint main = MyLibrary.umd.js
|
Entrypoint main = MyLibrary.umd.js
|
||||||
|
|
|
@ -240,7 +240,7 @@ function c() { console.log("c"); }
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 5.93 KiB 0 [emitted] main
|
output.js 5.93 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
@ -272,7 +272,7 @@ chunk {0} output.js (main) 726 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 971 bytes 0 [emitted] main
|
output.js 971 bytes 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
|
|
@ -274,7 +274,7 @@ __webpack_require__.e(/*! import() */ 0).then(__webpack_require__.bind(null, /*!
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 479 bytes 0 [emitted]
|
0.output.js 479 bytes 0 [emitted]
|
||||||
output.js 8.27 KiB 1 [emitted] main
|
output.js 8.27 KiB 1 [emitted] main
|
||||||
|
@ -303,7 +303,7 @@ chunk {1} output.js (main) 419 bytes >{0}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 144 bytes 0 [emitted]
|
0.output.js 144 bytes 0 [emitted]
|
||||||
output.js 1.75 KiB 1 [emitted] main
|
output.js 1.75 KiB 1 [emitted] main
|
||||||
|
|
|
@ -47,7 +47,7 @@ module.exports = {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
aae9c6dac629dd3f112e.js 54.5 KiB 7 [emitted]
|
aae9c6dac629dd3f112e.js 54.5 KiB 7 [emitted]
|
||||||
07ed7b2dfa6fe5502719.js 34.8 KiB 0 [emitted]
|
07ed7b2dfa6fe5502719.js 34.8 KiB 0 [emitted]
|
||||||
|
@ -65,50 +65,50 @@ ee6461bbec846ab2c762.js 37.6 KiB 10 [emitted]
|
||||||
5ec04d5529f6b78241e2.js 51.9 KiB 13 [emitted]
|
5ec04d5529f6b78241e2.js 51.9 KiB 13 [emitted]
|
||||||
38a6975540caa0156886.js 51.3 KiB 14 [emitted]
|
38a6975540caa0156886.js 51.3 KiB 14 [emitted]
|
||||||
Entrypoint main = bc5ed8b126130fde4f42.js 2a784b823ab0da1e0293.js 07ed7b2dfa6fe5502719.js
|
Entrypoint main = bc5ed8b126130fde4f42.js 2a784b823ab0da1e0293.js 07ed7b2dfa6fe5502719.js
|
||||||
chunk {0} 07ed7b2dfa6fe5502719.js 28.3 KiB ={3}= ={5}= >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< >{10}< >{11}< >{12}< >{13}< >{14}< >{1}< [entry] [rendered]
|
chunk {0} 07ed7b2dfa6fe5502719.js 28.3 KiB ={3}= ={5}= >{1}< >{10}< >{11}< >{12}< >{13}< >{14}< >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered]
|
||||||
> ./example main
|
> ./example main
|
||||||
[0] ./example.js 44 bytes {0} [built]
|
[0] ./example.js 44 bytes {0} [built]
|
||||||
+ 13 hidden modules
|
+ 13 hidden modules
|
||||||
chunk {1} 3147c249192926fa3521.js 24.9 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= [rendered]
|
chunk {1} 3147c249192926fa3521.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
|
> react-dom [0] ./example.js 2:0-22
|
||||||
3 modules
|
3 modules
|
||||||
chunk {2} 987f929f287f8a6c88ac.js 45.7 KiB <{3}> <{5}> <{0}> ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [0] ./example.js 2:0-22
|
> react-dom [0] ./example.js 2:0-22
|
||||||
23 modules
|
23 modules
|
||||||
chunk {3} bc5ed8b126130fde4f42.js 37.8 KiB ={5}= ={0}= >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< >{10}< >{11}< >{12}< >{13}< >{14}< >{1}< [initial] [rendered] [recorded] aggressive splitted
|
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
|
||||||
> ./example main
|
> ./example main
|
||||||
8 modules
|
8 modules
|
||||||
chunk {4} 511009f3a8f06b7c54cb.js 46.9 KiB <{3}> <{5}> <{0}> ={2}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [0] ./example.js 2:0-22
|
> react-dom [0] ./example.js 2:0-22
|
||||||
8 modules
|
8 modules
|
||||||
chunk {5} 2a784b823ab0da1e0293.js 45.7 KiB ={3}= ={0}= >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< >{10}< >{11}< >{12}< >{13}< >{14}< >{1}< [initial] [rendered] [recorded] aggressive splitted
|
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
|
||||||
> ./example main
|
> ./example main
|
||||||
9 modules
|
9 modules
|
||||||
chunk {6} 0abfd767d2250ac9265a.js 46.3 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [0] ./example.js 2:0-22
|
> react-dom [0] ./example.js 2:0-22
|
||||||
10 modules
|
10 modules
|
||||||
chunk {7} aae9c6dac629dd3f112e.js 62.3 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [0] ./example.js 2:0-22
|
> react-dom [0] ./example.js 2:0-22
|
||||||
7 modules
|
7 modules
|
||||||
chunk {8} cd98376ec90f2e366b94.js 43.3 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [0] ./example.js 2:0-22
|
> react-dom [0] ./example.js 2:0-22
|
||||||
3 modules
|
3 modules
|
||||||
chunk {9} a0f973cb054f411fba45.js 44.4 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [0] ./example.js 2:0-22
|
> react-dom [0] ./example.js 2:0-22
|
||||||
10 modules
|
10 modules
|
||||||
chunk {10} ee6461bbec846ab2c762.js 34 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted
|
chunk {10} ee6461bbec846ab2c762.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
|
> react-dom [0] ./example.js 2:0-22
|
||||||
16 modules
|
16 modules
|
||||||
chunk {11} 74249374b007623d16bf.js 48.4 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [0] ./example.js 2:0-22
|
> react-dom [0] ./example.js 2:0-22
|
||||||
6 modules
|
6 modules
|
||||||
chunk {12} 0a6d10836900825087ce.js 46.2 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [0] ./example.js 2:0-22
|
> react-dom [0] ./example.js 2:0-22
|
||||||
9 modules
|
9 modules
|
||||||
chunk {13} 5ec04d5529f6b78241e2.js 48.2 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={14}= ={1}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [0] ./example.js 2:0-22
|
> react-dom [0] ./example.js 2:0-22
|
||||||
20 modules
|
20 modules
|
||||||
chunk {14} 38a6975540caa0156886.js 46.6 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={1}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [0] ./example.js 2:0-22
|
> react-dom [0] ./example.js 2:0-22
|
||||||
24 modules
|
24 modules
|
||||||
```
|
```
|
||||||
|
@ -117,10 +117,10 @@ chunk {14} 38a6975540caa0156886.js 46.6 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
7a1ec67d9e4e1019836a.js 14.8 KiB 7 [emitted]
|
7a1ec67d9e4e1019836a.js 14.8 KiB 7 [emitted]
|
||||||
9baaf7bc0364c2600ef8.js 9.69 KiB 0 [emitted]
|
9baaf7bc0364c2600ef8.js 9.7 KiB 0 [emitted]
|
||||||
cf3beff30352265c3fae.js 13.1 KiB 2 [emitted]
|
cf3beff30352265c3fae.js 13.1 KiB 2 [emitted]
|
||||||
0bc9e49d2884c20a78ae.js 7.89 KiB 3 [emitted]
|
0bc9e49d2884c20a78ae.js 7.89 KiB 3 [emitted]
|
||||||
408e20e95f946dedfdd3.js 8.14 KiB 4 [emitted]
|
408e20e95f946dedfdd3.js 8.14 KiB 4 [emitted]
|
||||||
|
@ -135,49 +135,49 @@ f9403b4474b02c436f23.js 10.9 KiB 12 [emitted]
|
||||||
97ad3a6439b7ef8470ec.js 6.41 KiB 13 [emitted]
|
97ad3a6439b7ef8470ec.js 6.41 KiB 13 [emitted]
|
||||||
ed199e2ef66607136e6a.js 5.97 KiB 14 [emitted]
|
ed199e2ef66607136e6a.js 5.97 KiB 14 [emitted]
|
||||||
Entrypoint main = 97ad3a6439b7ef8470ec.js f9403b4474b02c436f23.js ed199e2ef66607136e6a.js
|
Entrypoint main = 97ad3a6439b7ef8470ec.js f9403b4474b02c436f23.js ed199e2ef66607136e6a.js
|
||||||
chunk {0} 9baaf7bc0364c2600ef8.js 46.6 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={11}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [30] ./example.js 2:0-22
|
> react-dom [30] ./example.js 2:0-22
|
||||||
24 modules
|
24 modules
|
||||||
chunk {1} 148bbb5ef8fd203f5c99.js 48.2 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={0}= ={11}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [30] ./example.js 2:0-22
|
> react-dom [30] ./example.js 2:0-22
|
||||||
20 modules
|
20 modules
|
||||||
chunk {2} cf3beff30352265c3fae.js 46.2 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [30] ./example.js 2:0-22
|
> react-dom [30] ./example.js 2:0-22
|
||||||
9 modules
|
9 modules
|
||||||
chunk {3} 0bc9e49d2884c20a78ae.js 48.4 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [30] ./example.js 2:0-22
|
> react-dom [30] ./example.js 2:0-22
|
||||||
6 modules
|
6 modules
|
||||||
chunk {4} 408e20e95f946dedfdd3.js 34 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted
|
chunk {4} 408e20e95f946dedfdd3.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
|
> react-dom [30] ./example.js 2:0-22
|
||||||
16 modules
|
16 modules
|
||||||
chunk {5} 5b44ef86854beead5c79.js 44.4 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [30] ./example.js 2:0-22
|
> react-dom [30] ./example.js 2:0-22
|
||||||
10 modules
|
10 modules
|
||||||
chunk {6} 2d761db260e810943d04.js 43.3 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [30] ./example.js 2:0-22
|
> react-dom [30] ./example.js 2:0-22
|
||||||
3 modules
|
3 modules
|
||||||
chunk {7} 7a1ec67d9e4e1019836a.js 62.3 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [30] ./example.js 2:0-22
|
> react-dom [30] ./example.js 2:0-22
|
||||||
7 modules
|
7 modules
|
||||||
chunk {8} 5efec1104bcbe14efad9.js 46.3 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [30] ./example.js 2:0-22
|
> react-dom [30] ./example.js 2:0-22
|
||||||
10 modules
|
10 modules
|
||||||
chunk {9} 050d4b543b70cc78b255.js 46.9 KiB <{13}> <{12}> <{14}> ={10}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [30] ./example.js 2:0-22
|
> react-dom [30] ./example.js 2:0-22
|
||||||
8 modules
|
8 modules
|
||||||
chunk {10} 2c42126f0455b98de2d0.js 45.7 KiB <{13}> <{12}> <{14}> ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted
|
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
|
||||||
> react-dom [30] ./example.js 2:0-22
|
> react-dom [30] ./example.js 2:0-22
|
||||||
23 modules
|
23 modules
|
||||||
chunk {11} 27d8a7d99dbd33243169.js 24.9 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= [rendered]
|
chunk {11} 27d8a7d99dbd33243169.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
|
> react-dom [30] ./example.js 2:0-22
|
||||||
3 modules
|
3 modules
|
||||||
chunk {12} f9403b4474b02c436f23.js 45.7 KiB ={13}= ={14}= >{10}< >{9}< >{8}< >{7}< >{6}< >{5}< >{4}< >{3}< >{2}< >{1}< >{0}< >{11}< [initial] [rendered] [recorded] aggressive splitted
|
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
|
||||||
> ./example main
|
> ./example main
|
||||||
9 modules
|
9 modules
|
||||||
chunk {13} 97ad3a6439b7ef8470ec.js 37.8 KiB ={12}= ={14}= >{10}< >{9}< >{8}< >{7}< >{6}< >{5}< >{4}< >{3}< >{2}< >{1}< >{0}< >{11}< [initial] [rendered] [recorded] aggressive splitted
|
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
|
||||||
> ./example main
|
> ./example main
|
||||||
8 modules
|
8 modules
|
||||||
chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={13}= ={12}= >{10}< >{9}< >{8}< >{7}< >{6}< >{5}< >{4}< >{3}< >{2}< >{1}< >{0}< >{11}< [entry] [rendered]
|
chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered]
|
||||||
> ./example main
|
> ./example main
|
||||||
[30] ./example.js 44 bytes {14} [built]
|
[30] ./example.js 44 bytes {14} [built]
|
||||||
+ 13 hidden modules
|
+ 13 hidden modules
|
||||||
|
|
|
@ -369,7 +369,7 @@ module.exports = webpackAsyncContext;
|
||||||
/******/
|
/******/
|
||||||
/******/
|
/******/
|
||||||
/******/ // add entry module to deferred list
|
/******/ // add entry module to deferred list
|
||||||
/******/ deferredModules.push([8,1,2]);
|
/******/ deferredModules.push([8,2,1]);
|
||||||
/******/ // run deferred modules when ready
|
/******/ // run deferred modules when ready
|
||||||
/******/ return checkDeferredModules();
|
/******/ return checkDeferredModules();
|
||||||
/******/ })
|
/******/ })
|
||||||
|
@ -437,32 +437,32 @@ module.exports = function() {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
bPage.chunk.js 299 bytes 0 [emitted] bPage
|
bPage.chunk.js 299 bytes 0 [emitted] bPage
|
||||||
aPage.chunk.js 293 bytes 1 [emitted] aPage
|
aPage.chunk.js 293 bytes 1 [emitted] aPage
|
||||||
pageA~pageB.chunk.js 2.16 KiB 2 [emitted] pageA~pageB
|
pageA~pageB.chunk.js 2.16 KiB 2 [emitted] pageA~pageB
|
||||||
pageB.bundle.js 8.2 KiB 3 [emitted] pageB
|
pageB.bundle.js 8.2 KiB 3 [emitted] pageB
|
||||||
pageA.bundle.js 8.2 KiB 4 [emitted] pageA
|
pageA.bundle.js 8.2 KiB 4 [emitted] pageA
|
||||||
Entrypoint pageA = aPage.chunk.js pageA~pageB.chunk.js pageA.bundle.js
|
Entrypoint pageA = pageA~pageB.chunk.js aPage.chunk.js pageA.bundle.js
|
||||||
Entrypoint pageB = bPage.chunk.js pageA~pageB.chunk.js pageB.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)
|
chunk {0} bPage.chunk.js (bPage) 61 bytes <{1}> <{2}> <{4}> ={2}= ={3}= >{1}< [initial] [rendered] reused as split chunk (cache group: default)
|
||||||
> ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
|
||||||
> ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
|
||||||
> pageB
|
> pageB
|
||||||
|
> ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
||||||
|
> ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
||||||
[1] ./bPage.js 61 bytes {0} [built]
|
[1] ./bPage.js 61 bytes {0} [built]
|
||||||
cjs require ./bPage [4] ./bEntry.js 3:7-25
|
cjs require ./bPage [4] ./bEntry.js 3:7-25
|
||||||
context element ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
context element ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
||||||
chunk {1} aPage.chunk.js (aPage) 61 bytes <{0}> <{2}> <{3}> ={2}= ={4}= >{0}< [initial] [rendered] reused as split chunk (cache group: default)
|
chunk {1} aPage.chunk.js (aPage) 61 bytes <{0}> <{2}> <{3}> ={2}= ={4}= >{0}< [initial] [rendered] reused as split chunk (cache group: default)
|
||||||
> ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
|
||||||
> ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
|
||||||
> pageA
|
> pageA
|
||||||
|
> ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
||||||
|
> ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
||||||
[3] ./aPage.js 61 bytes {1} [built]
|
[3] ./aPage.js 61 bytes {1} [built]
|
||||||
context element ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
context element ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
||||||
cjs require ./aPage [7] ./aEntry.js 3:7-25
|
cjs require ./aPage [7] ./aEntry.js 3:7-25
|
||||||
chunk {2} pageA~pageB.chunk.js (pageA~pageB) 970 bytes ={0}= ={3}= ={1}= ={4}= >{1}< >{0}< [initial] [rendered] split chunk (cache group: default) (name: pageA~pageB)
|
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)
|
||||||
> pageB
|
|
||||||
> pageA
|
> pageA
|
||||||
|
> pageB
|
||||||
[0] ./render.js 60 bytes {2} [built]
|
[0] ./render.js 60 bytes {2} [built]
|
||||||
cjs require ./render [2] ./router.js 1:13-32
|
cjs require ./render [2] ./router.js 1:13-32
|
||||||
cjs require ./render [4] ./bEntry.js 2:13-32
|
cjs require ./render [4] ./bEntry.js 2:13-32
|
||||||
|
@ -490,32 +490,32 @@ chunk {4} pageA.bundle.js (pageA) 129 bytes ={1}= ={2}= >{0}< [entry] [render
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
bPage.chunk.js 122 bytes 0 [emitted] bPage
|
bPage.chunk.js 122 bytes 0 [emitted] bPage
|
||||||
aPage.chunk.js 123 bytes 1 [emitted] aPage
|
aPage.chunk.js 123 bytes 1 [emitted] aPage
|
||||||
pageA~pageB.chunk.js 589 bytes 2 [emitted] pageA~pageB
|
pageA~pageB.chunk.js 589 bytes 2 [emitted] pageA~pageB
|
||||||
pageB.bundle.js 1.85 KiB 3 [emitted] pageB
|
pageB.bundle.js 1.85 KiB 3 [emitted] pageB
|
||||||
pageA.bundle.js 1.85 KiB 4 [emitted] pageA
|
pageA.bundle.js 1.85 KiB 4 [emitted] pageA
|
||||||
Entrypoint pageA = aPage.chunk.js pageA~pageB.chunk.js pageA.bundle.js
|
Entrypoint pageA = pageA~pageB.chunk.js aPage.chunk.js pageA.bundle.js
|
||||||
Entrypoint pageB = bPage.chunk.js pageA~pageB.chunk.js pageB.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)
|
chunk {0} bPage.chunk.js (bPage) 61 bytes <{1}> <{2}> <{4}> ={2}= ={3}= >{1}< [initial] [rendered] reused as split chunk (cache group: default)
|
||||||
> ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
|
||||||
> ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
|
||||||
> pageB
|
> pageB
|
||||||
|
> ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
||||||
|
> ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
||||||
[1] ./bPage.js 61 bytes {0} [built]
|
[1] ./bPage.js 61 bytes {0} [built]
|
||||||
cjs require ./bPage [4] ./bEntry.js 3:7-25
|
cjs require ./bPage [4] ./bEntry.js 3:7-25
|
||||||
context element ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
context element ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage
|
||||||
chunk {1} aPage.chunk.js (aPage) 61 bytes <{0}> <{2}> <{3}> ={2}= ={4}= >{0}< [initial] [rendered] reused as split chunk (cache group: default)
|
chunk {1} aPage.chunk.js (aPage) 61 bytes <{0}> <{2}> <{3}> ={2}= ={4}= >{0}< [initial] [rendered] reused as split chunk (cache group: default)
|
||||||
> ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
|
||||||
> ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
|
||||||
> pageA
|
> pageA
|
||||||
|
> ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
||||||
|
> ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
||||||
[3] ./aPage.js 61 bytes {1} [built]
|
[3] ./aPage.js 61 bytes {1} [built]
|
||||||
context element ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
context element ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage
|
||||||
cjs require ./aPage [7] ./aEntry.js 3:7-25
|
cjs require ./aPage [7] ./aEntry.js 3:7-25
|
||||||
chunk {2} pageA~pageB.chunk.js (pageA~pageB) 970 bytes ={0}= ={3}= ={1}= ={4}= >{1}< >{0}< [initial] [rendered] split chunk (cache group: default) (name: pageA~pageB)
|
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)
|
||||||
> pageB
|
|
||||||
> pageA
|
> pageA
|
||||||
|
> pageB
|
||||||
[0] ./render.js 60 bytes {2} [built]
|
[0] ./render.js 60 bytes {2} [built]
|
||||||
cjs require ./render [2] ./router.js 1:13-32
|
cjs require ./render [2] ./router.js 1:13-32
|
||||||
cjs require ./render [4] ./bEntry.js 2:13-32
|
cjs require ./render [4] ./bEntry.js 2:13-32
|
||||||
|
|
|
@ -238,7 +238,7 @@ console.log("Missing Text");
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Child en:
|
Child en:
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
|
@ -266,7 +266,7 @@ Child de:
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Child en:
|
Child en:
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
|
|
|
@ -263,7 +263,7 @@ Prints in node.js (`enhanced-require example.js`) and in browser:
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 6.2 KiB 0 [emitted] main
|
output.js 6.2 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
@ -283,7 +283,7 @@ chunk {0} output.js (main) 2.66 KiB [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 1.53 KiB 0 [emitted] main
|
output.js 1.53 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
|
|
@ -409,7 +409,7 @@ module.exports = function() {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 1.87 KiB 0 [emitted]
|
0.output.js 1.87 KiB 0 [emitted]
|
||||||
output.js 9.76 KiB 1 [emitted] main
|
output.js 9.76 KiB 1 [emitted] main
|
||||||
|
@ -455,7 +455,7 @@ chunk {1} output.js (main) 1.03 KiB >{0}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 606 bytes 0 [emitted]
|
0.output.js 606 bytes 0 [emitted]
|
||||||
output.js 2.04 KiB 1 [emitted] main
|
output.js 2.04 KiB 1 [emitted] main
|
||||||
|
|
|
@ -251,7 +251,7 @@ console.log("Running " + "mobile" + " build");
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Child mobile:
|
Child mobile:
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
|
@ -278,7 +278,7 @@ Child desktop:
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Child mobile:
|
Child mobile:
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
|
|
|
@ -245,7 +245,7 @@ module.exports = "beta";
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
MyLibrary.alpha.js 3.16 KiB 0 [emitted] alpha
|
MyLibrary.alpha.js 3.16 KiB 0 [emitted] alpha
|
||||||
MyLibrary.beta.js 3.16 KiB 1 [emitted] beta
|
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
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
MyLibrary.beta.js 828 bytes 0 [emitted] beta
|
MyLibrary.beta.js 828 bytes 0 [emitted] beta
|
||||||
MyLibrary.alpha.js 832 bytes 1 [emitted] alpha
|
MyLibrary.alpha.js 832 bytes 1 [emitted] alpha
|
||||||
|
|
|
@ -4,15 +4,15 @@ In this example you have two (HTML) pages `pageA` and `pageB`. You want to creat
|
||||||
|
|
||||||
You can see how to define multiple entry points via the `entry` option.
|
You can see how to define multiple entry points via the `entry` option.
|
||||||
|
|
||||||
You can use
|
You can use
|
||||||
|
|
||||||
You can see the output files:
|
You can see the output files:
|
||||||
|
|
||||||
* `commons.js` contains:
|
* `commons.js` contains:
|
||||||
* the module system
|
|
||||||
* chunk loading logic
|
|
||||||
* module `common.js` which is used in both pages
|
* module `common.js` which is used in both pages
|
||||||
* `pageA.js` contains: (`pageB.js` is similar)
|
* `pageA.js` contains: (`pageB.js` is similar)
|
||||||
|
* the module system
|
||||||
|
* chunk loading logic
|
||||||
* the entry point `pageA.js`
|
* the entry point `pageA.js`
|
||||||
* it would contain any other module that is only used by `pageA`
|
* it would contain any other module that is only used by `pageA`
|
||||||
* `0.chunk.js` is an additional chunk which is used by both pages. It contains:
|
* `0.chunk.js` is an additional chunk which is used by both pages. It contains:
|
||||||
|
@ -572,7 +572,7 @@ module.exports = function(msg) {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.1
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.js 363 bytes 0 [emitted]
|
0.js 363 bytes 0 [emitted]
|
||||||
commons.js 267 bytes 1 [emitted] commons
|
commons.js 267 bytes 1 [emitted] commons
|
||||||
|
@ -608,7 +608,7 @@ chunk {3} pageA.js (pageA) 108 bytes ={1}= >{0}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.1
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.js 120 bytes 0 [emitted]
|
0.js 120 bytes 0 [emitted]
|
||||||
commons.js 95 bytes 1 [emitted] commons
|
commons.js 95 bytes 1 [emitted] commons
|
||||||
|
|
|
@ -4,15 +4,15 @@ In this example you have two (HTML) pages `pageA` and `pageB`. You want to creat
|
||||||
|
|
||||||
You can see how to define multiple entry points via the `entry` option.
|
You can see how to define multiple entry points via the `entry` option.
|
||||||
|
|
||||||
You can use
|
You can use
|
||||||
|
|
||||||
You can see the output files:
|
You can see the output files:
|
||||||
|
|
||||||
* `commons.js` contains:
|
* `commons.js` contains:
|
||||||
* the module system
|
|
||||||
* chunk loading logic
|
|
||||||
* module `common.js` which is used in both pages
|
* module `common.js` which is used in both pages
|
||||||
* `pageA.js` contains: (`pageB.js` is similar)
|
* `pageA.js` contains: (`pageB.js` is similar)
|
||||||
|
* the module system
|
||||||
|
* chunk loading logic
|
||||||
* the entry point `pageA.js`
|
* the entry point `pageA.js`
|
||||||
* it would contain any other module that is only used by `pageA`
|
* it would contain any other module that is only used by `pageA`
|
||||||
* `0.chunk.js` is an additional chunk which is used by both pages. It contains:
|
* `0.chunk.js` is an additional chunk which is used by both pages. It contains:
|
||||||
|
|
|
@ -326,7 +326,7 @@ __webpack_require__.e(/*! require.ensure */ 0).then((function(require) {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 463 bytes 0 [emitted]
|
0.output.js 463 bytes 0 [emitted]
|
||||||
1.output.js 677 bytes 1 [emitted] my own chunk
|
1.output.js 677 bytes 1 [emitted] my own chunk
|
||||||
|
@ -336,9 +336,9 @@ chunk {0} 0.output.js 22 bytes <{2}> [rendered]
|
||||||
> [3] ./example.js 17:0-20:2
|
> [3] ./example.js 17:0-20:2
|
||||||
2 modules
|
2 modules
|
||||||
chunk {1} 1.output.js (my own chunk) 33 bytes <{2}> [rendered]
|
chunk {1} 1.output.js (my own chunk) 33 bytes <{2}> [rendered]
|
||||||
|
> [3] ./example.js 13:0-15:18
|
||||||
> [3] ./example.js 3:0-6:18
|
> [3] ./example.js 3:0-6:18
|
||||||
> [3] ./example.js 8:0-11:18
|
> [3] ./example.js 8:0-11:18
|
||||||
> [3] ./example.js 13:0-15:18
|
|
||||||
3 modules
|
3 modules
|
||||||
chunk {2} output.js (main) 452 bytes >{0}< >{1}< [entry] [rendered]
|
chunk {2} output.js (main) 452 bytes >{0}< >{1}< [entry] [rendered]
|
||||||
> .\example.js main
|
> .\example.js main
|
||||||
|
@ -351,7 +351,7 @@ chunk {2} output.js (main) 452 bytes >{0}< >{1}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 92 bytes 0 [emitted]
|
0.output.js 92 bytes 0 [emitted]
|
||||||
1.output.js 112 bytes 1, 0 [emitted] my own chunk
|
1.output.js 112 bytes 1, 0 [emitted] my own chunk
|
||||||
|
@ -361,9 +361,9 @@ chunk {0} 0.output.js 22 bytes <{2}> [rendered]
|
||||||
> [3] ./example.js 17:0-20:2
|
> [3] ./example.js 17:0-20:2
|
||||||
2 modules
|
2 modules
|
||||||
chunk {1} 1.output.js (my own chunk) 33 bytes <{2}> [rendered]
|
chunk {1} 1.output.js (my own chunk) 33 bytes <{2}> [rendered]
|
||||||
|
> [3] ./example.js 13:0-15:18
|
||||||
> [3] ./example.js 3:0-6:18
|
> [3] ./example.js 3:0-6:18
|
||||||
> [3] ./example.js 8:0-11:18
|
> [3] ./example.js 8:0-11:18
|
||||||
> [3] ./example.js 13:0-15:18
|
|
||||||
3 modules
|
3 modules
|
||||||
chunk {2} output.js (main) 452 bytes >{0}< >{1}< [entry] [rendered]
|
chunk {2} output.js (main) 452 bytes >{0}< >{1}< [entry] [rendered]
|
||||||
> .\example.js main
|
> .\example.js main
|
||||||
|
|
|
@ -202,7 +202,7 @@ module.exports = function() {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 4.48 KiB 0 [emitted] main
|
output.js 4.48 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
@ -227,7 +227,7 @@ chunk {0} output.js (main) 613 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 1.16 KiB 0 [emitted] main
|
output.js 1.16 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
|
|
@ -146,7 +146,7 @@ module.exports = Math.random();
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 3.26 KiB 0 [emitted] main
|
output.js 3.26 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
@ -164,7 +164,7 @@ chunk {0} output.js (main) 326 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 667 bytes 0 [emitted] main
|
output.js 667 bytes 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
|
|
@ -439,7 +439,7 @@ Minimized
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 1.78 KiB 0 [emitted]
|
0.output.js 1.78 KiB 0 [emitted]
|
||||||
output.js 8.2 KiB 1 [emitted] main
|
output.js 8.2 KiB 1 [emitted] main
|
||||||
|
@ -478,7 +478,7 @@ chunk {1} output.js (main) 390 bytes >{0}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 362 bytes 0 [emitted]
|
0.output.js 362 bytes 0 [emitted]
|
||||||
output.js 1.8 KiB 1 [emitted] main
|
output.js 1.8 KiB 1 [emitted] main
|
||||||
|
|
|
@ -298,7 +298,7 @@ const c = "c";
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 7.91 KiB 0 [emitted] main
|
output.js 7.91 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
@ -314,7 +314,7 @@ chunk {0} output.js (main) 443 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
output.js 600 bytes 0 [emitted] main
|
output.js 600 bytes 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
|
|
|
@ -84,7 +84,7 @@ race = function() {
|
||||||
```
|
```
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;AAGA;EAAA;;AAAA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX,CAFR;;;AAKF,OAAO;AACL;EADM,uBAAQ;SACd,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-source-map.js","sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n\n\n\n// WEBPACK FOOTER //\n// ./example.coffee"],"sourceRoot":""}
|
{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;AAGA;EAAA;;AAAA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX,CAFR;;;AAKF,OAAO;AACL;EADM,uBAAQ;SACd,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-source-map.js","sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n"],"sourceRoot":""}
|
||||||
```
|
```
|
||||||
|
|
||||||
## hidden-source-map.js and hidden-source-map.js.map
|
## hidden-source-map.js and hidden-source-map.js.map
|
||||||
|
@ -120,7 +120,7 @@ race = function() {
|
||||||
```
|
```
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;AAGA;EAAA;;AAAA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX,CAFR;;;AAKF,OAAO;AACL;EADM,uBAAQ;SACd,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-hidden-source-map.js","sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n\n\n\n// WEBPACK FOOTER //\n// ./example.coffee"],"sourceRoot":""}
|
{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;AAGA;EAAA;;AAAA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX,CAFR;;;AAKF,OAAO;AACL;EADM,uBAAQ;SACd,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-hidden-source-map.js","sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n"],"sourceRoot":""}
|
||||||
```
|
```
|
||||||
|
|
||||||
## inline-source-map.js
|
## inline-source-map.js
|
||||||
|
@ -153,7 +153,7 @@ race = function() {
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
],[[0,1]]]);
|
],[[0,1]]]);
|
||||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9leGFtcGxlLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUdBO0VBQUE7O0FBQUEsT0FDRTtFQUFBLE1BQVEsSUFBSSxDQUFDLElBQWI7RUFDQSxRQUFRLE1BRFI7RUFFQSxNQUFRLFNBQUMsQ0FBRDtXQUFPLElBQUksT0FBTyxDQUFQO0VBQVgsQ0FGUjs7O0FBS0YsT0FBTztBQUNMO0VBRE0sdUJBQVE7U0FDZCxNQUFNLE1BQU4sRUFBYyxPQUFkO0FBREsiLCJmaWxlIjoiLi9idW5kbGUtaW5saW5lLXNvdXJjZS1tYXAuanMiLCJzb3VyY2VzQ29udGVudCI6WyIjIFRha2VuIGZyb20gaHR0cDovL2NvZmZlZXNjcmlwdC5vcmcvXHJcblxyXG4jIE9iamVjdHM6XHJcbm1hdGggPVxyXG4gIHJvb3Q6ICAgTWF0aC5zcXJ0XHJcbiAgc3F1YXJlOiBzcXVhcmVcclxuICBjdWJlOiAgICh4KSAtPiB4ICogc3F1YXJlIHhcclxuXHJcbiMgU3BsYXRzOlxyXG5yYWNlID0gKHdpbm5lciwgcnVubmVycy4uLikgLT5cclxuICBwcmludCB3aW5uZXIsIHJ1bm5lcnNcclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vZXhhbXBsZS5jb2ZmZWUiXSwic291cmNlUm9vdCI6IiJ9
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9leGFtcGxlLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUdBO0VBQUE7O0FBQUEsT0FDRTtFQUFBLE1BQVEsSUFBSSxDQUFDLElBQWI7RUFDQSxRQUFRLE1BRFI7RUFFQSxNQUFRLFNBQUMsQ0FBRDtXQUFPLElBQUksT0FBTyxDQUFQO0VBQVgsQ0FGUjs7O0FBS0YsT0FBTztBQUNMO0VBRE0sdUJBQVE7U0FDZCxNQUFNLE1BQU4sRUFBYyxPQUFkO0FBREsiLCJmaWxlIjoiLi9idW5kbGUtaW5saW5lLXNvdXJjZS1tYXAuanMiLCJzb3VyY2VzQ29udGVudCI6WyIjIFRha2VuIGZyb20gaHR0cDovL2NvZmZlZXNjcmlwdC5vcmcvXHJcblxyXG4jIE9iamVjdHM6XHJcbm1hdGggPVxyXG4gIHJvb3Q6ICAgTWF0aC5zcXJ0XHJcbiAgc3F1YXJlOiBzcXVhcmVcclxuICBjdWJlOiAgICh4KSAtPiB4ICogc3F1YXJlIHhcclxuXHJcbiMgU3BsYXRzOlxyXG5yYWNlID0gKHdpbm5lciwgcnVubmVycy4uLikgLT5cclxuICBwcmludCB3aW5uZXIsIHJ1bm5lcnNcclxuIl0sInNvdXJjZVJvb3QiOiIifQ==
|
||||||
```
|
```
|
||||||
|
|
||||||
## nosources-source-map.js.map
|
## nosources-source-map.js.map
|
||||||
|
@ -171,7 +171,7 @@ race = function() {
|
||||||
/*! no static exports found */
|
/*! no static exports found */
|
||||||
/***/ (function(module, exports) {
|
/***/ (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+IHggKiBzcXVhcmUgeFxyXG5cclxuIyBTcGxhdHM6XHJcbnJhY2UgPSAod2lubmVyLCBydW5uZXJzLi4uKSAtPlxyXG4gIHByaW50IHdpbm5lciwgcnVubmVyc1xyXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9leGFtcGxlLmNvZmZlZSJdLCJzb3VyY2VSb290IjoiIn0=\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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9leGFtcGxlLmNvZmZlZT85MWU1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBO0VBQUE7O0FBQUEsT0FDRTtFQUFBLE1BQVEsSUFBSSxDQUFDLElBQWI7RUFDQSxRQUFRLE1BRFI7RUFFQSxNQUFRLFNBQUMsQ0FBRDtXQUFPLElBQUksT0FBTyxDQUFQO0VBQVgsQ0FGUjs7O0FBS0YsT0FBTztBQUNMO0VBRE0sdUJBQVE7U0FDZCxNQUFNLE1BQU4sRUFBYyxPQUFkO0FBREsiLCJmaWxlIjoiMC5qcyIsInNvdXJjZXNDb250ZW50IjpbIiMgVGFrZW4gZnJvbSBodHRwOi8vY29mZmVlc2NyaXB0Lm9yZy9cclxuXHJcbiMgT2JqZWN0czpcclxubWF0aCA9XHJcbiAgcm9vdDogICBNYXRoLnNxcnRcclxuICBzcXVhcmU6IHNxdWFyZVxyXG4gIGN1YmU6ICAgKHgpIC0+IHggKiBzcXVhcmUgeFxyXG5cclxuIyBTcGxhdHM6XHJcbnJhY2UgPSAod2lubmVyLCBydW5uZXJzLi4uKSAtPlxyXG4gIHByaW50IHdpbm5lciwgcnVubmVyc1xyXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n");
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
],[[0,1]]]);
|
],[[0,1]]]);
|
||||||
|
@ -187,7 +187,7 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq
|
||||||
/*! no static exports found */
|
/*! no static exports found */
|
||||||
/***/ (function(module, exports) {
|
/***/ (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\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/node_modules/coffee-loader!./example.coffee\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./example.coffee?(webpack)/node_modules/coffee-loader");
|
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\n\n//# sourceURL=webpack:///./example.coffee?(webpack)/node_modules/coffee-loader");
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
],[[0,1]]]);
|
],[[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 */
|
/*! no static exports found */
|
||||||
/***/ (function(module, exports) {
|
/***/ (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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlPzA5MjciXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1hdGgsIHJhY2UsXG4gIHNsaWNlID0gW10uc2xpY2U7XG5cbm1hdGggPSB7XG4gIHJvb3Q6IE1hdGguc3FydCxcbiAgc3F1YXJlOiBzcXVhcmUsXG4gIGN1YmU6IGZ1bmN0aW9uKHgpIHtcbiAgICByZXR1cm4geCAqIHNxdWFyZSh4KTtcbiAgfVxufTtcblxucmFjZSA9IGZ1bmN0aW9uKCkge1xuICB2YXIgcnVubmVycywgd2lubmVyO1xuICB3aW5uZXIgPSBhcmd1bWVudHNbMF0sIHJ1bm5lcnMgPSAyIDw9IGFyZ3VtZW50cy5sZW5ndGggPyBzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkgOiBbXTtcbiAgcmV0dXJuIHByaW50KHdpbm5lciwgcnVubmVycyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gKHdlYnBhY2spL25vZGVfbW9kdWxlcy9jb2ZmZWUtbG9hZGVyIS4vZXhhbXBsZS5jb2ZmZWVcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlPzA5MjciXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1hdGgsIHJhY2UsXG4gIHNsaWNlID0gW10uc2xpY2U7XG5cbm1hdGggPSB7XG4gIHJvb3Q6IE1hdGguc3FydCxcbiAgc3F1YXJlOiBzcXVhcmUsXG4gIGN1YmU6IGZ1bmN0aW9uKHgpIHtcbiAgICByZXR1cm4geCAqIHNxdWFyZSh4KTtcbiAgfVxufTtcblxucmFjZSA9IGZ1bmN0aW9uKCkge1xuICB2YXIgcnVubmVycywgd2lubmVyO1xuICB3aW5uZXIgPSBhcmd1bWVudHNbMF0sIHJ1bm5lcnMgPSAyIDw9IGFyZ3VtZW50cy5sZW5ndGggPyBzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkgOiBbXTtcbiAgcmV0dXJuIHByaW50KHdpbm5lciwgcnVubmVycyk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n");
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
],[[0,1]]]);
|
],[[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 */
|
/*! no static exports found */
|
||||||
/***/ (function(module, exports) {
|
/***/ (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+XHJcbiAgcHJpbnQgd2lubmVyLCBydW5uZXJzXHJcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL2V4YW1wbGUuY29mZmVlIl0sIm1hcHBpbmdzIjoiQUFHQTtBQUFBO0FBQ0E7QUFEQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7OztBQUdBO0FBQ0E7QUFEQTtBQUNBO0FBREE7Iiwic291cmNlUm9vdCI6IiJ9\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlPzkxZTUiXSwic291cmNlc0NvbnRlbnQiOlsiIyBUYWtlbiBmcm9tIGh0dHA6Ly9jb2ZmZWVzY3JpcHQub3JnL1xyXG5cclxuIyBPYmplY3RzOlxyXG5tYXRoID1cclxuICByb290OiAgIE1hdGguc3FydFxyXG4gIHNxdWFyZTogc3F1YXJlXHJcbiAgY3ViZTogICAoeCkgLT4geCAqIHNxdWFyZSB4XHJcblxyXG4jIFNwbGF0czpcclxucmFjZSA9ICh3aW5uZXIsIHJ1bm5lcnMuLi4pIC0+XHJcbiAgcHJpbnQgd2lubmVyLCBydW5uZXJzXHJcbiJdLCJtYXBwaW5ncyI6IkFBR0E7QUFBQTtBQUNBO0FBREE7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBOzs7QUFHQTtBQUNBO0FBREE7QUFDQTtBQURBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///0\n");
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
],[[0,1]]]);
|
],[[0,1]]]);
|
||||||
|
@ -227,147 +227,147 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq
|
||||||
|
|
||||||
## cheap-module-source-map.js.map
|
## cheap-module-source-map.js.map
|
||||||
``` javascript
|
``` javascript
|
||||||
{"version":3,"file":"./bundle-cheap-module-source-map.js","sources":["webpack:///./example.coffee"],"sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n\n\n\n// WEBPACK FOOTER //\n// ./example.coffee"],"mappings":";;;;;;;;AAGA;AAAA;AACA;AADA;AACA;AACA;AACA;AAAA;AAAA;;;AAGA;AACA;AADA;AACA;AADA;;;;A","sourceRoot":""}
|
{"version":3,"file":"./bundle-cheap-module-source-map.js","sources":["webpack:///./example.coffee"],"sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n"],"mappings":";;;;;;;;AAGA;AAAA;AACA;AADA;AACA;AACA;AACA;AAAA;AAAA;;;AAGA;AACA;AADA;AACA;AADA;;;;A","sourceRoot":""}
|
||||||
```
|
```
|
||||||
|
|
||||||
## cheap-source-map.js.map
|
## cheap-source-map.js.map
|
||||||
``` javascript
|
``` javascript
|
||||||
{"version":3,"file":"./bundle-cheap-source-map.js","sources":["webpack:///./example.coffee"],"sourcesContent":["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\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/node_modules/coffee-loader!./example.coffee\n// module id = 0\n// module chunks = 0"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}
|
{"version":3,"file":"./bundle-cheap-source-map.js","sources":["webpack:///./example.coffee"],"sourcesContent":["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"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}
|
||||||
```
|
```
|
||||||
|
|
||||||
# webpack output
|
# webpack output
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Child
|
Child
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
./bundle-cheap-eval-source-map.js 1.68 KiB 0 [emitted] bundle
|
./bundle-cheap-eval-source-map.js 1.5 KiB 0 [emitted] bundle
|
||||||
./bundle-runtime-cheap-eval-source-map.js 4.93 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-cheap-eval-source-map.js 4.93 KiB 1 [emitted] runtime~bundle
|
||||||
Entrypoint bundle = ./bundle-runtime-cheap-eval-source-map.js ./bundle-cheap-eval-source-map.js
|
Entrypoint bundle = ./runtime~bundle-cheap-eval-source-map.js ./bundle-cheap-eval-source-map.js
|
||||||
chunk {0} ./bundle-cheap-eval-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered]
|
chunk {0} ./bundle-cheap-eval-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
||||||
single entry coffee-loader!./example.coffee bundle
|
single entry coffee-loader!./example.coffee bundle
|
||||||
chunk {1} ./bundle-runtime-cheap-eval-source-map.js (bundle-runtime) 0 bytes ={0}= [entry] [rendered]
|
chunk {1} ./runtime~bundle-cheap-eval-source-map.js (runtime~bundle) 0 bytes ={0}= [entry] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
Child
|
Child
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
./bundle-cheap-module-eval-source-map.js 1.42 KiB 0 [emitted] bundle
|
./bundle-cheap-module-eval-source-map.js 1.36 KiB 0 [emitted] bundle
|
||||||
./bundle-runtime-cheap-module-eval-source-map.js 4.93 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-cheap-module-eval-source-map.js 4.93 KiB 1 [emitted] runtime~bundle
|
||||||
Entrypoint bundle = ./bundle-runtime-cheap-module-eval-source-map.js ./bundle-cheap-module-eval-source-map.js
|
Entrypoint bundle = ./runtime~bundle-cheap-module-eval-source-map.js ./bundle-cheap-module-eval-source-map.js
|
||||||
chunk {0} ./bundle-cheap-module-eval-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered]
|
chunk {0} ./bundle-cheap-module-eval-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
||||||
single entry coffee-loader!./example.coffee bundle
|
single entry coffee-loader!./example.coffee bundle
|
||||||
chunk {1} ./bundle-runtime-cheap-module-eval-source-map.js (bundle-runtime) 0 bytes ={0}= [entry] [rendered]
|
chunk {1} ./runtime~bundle-cheap-module-eval-source-map.js (runtime~bundle) 0 bytes ={0}= [entry] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
Child
|
Child
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
./bundle-cheap-module-source-map.js 733 bytes 0 [emitted] bundle
|
./bundle-cheap-module-source-map.js 733 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-cheap-module-source-map.js 5 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-cheap-module-source-map.js 5 KiB 1 [emitted] runtime~bundle
|
||||||
./bundle-cheap-module-source-map.js.map 506 bytes 0 [emitted] bundle
|
./bundle-cheap-module-source-map.js.map 459 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-cheap-module-source-map.js.map 4.96 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-cheap-module-source-map.js.map 4.92 KiB 1 [emitted] runtime~bundle
|
||||||
Entrypoint bundle = ./bundle-runtime-cheap-module-source-map.js ./bundle-runtime-cheap-module-source-map.js.map ./bundle-cheap-module-source-map.js ./bundle-cheap-module-source-map.js.map
|
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]
|
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
|
> coffee-loader!./example.coffee bundle
|
||||||
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
||||||
single entry coffee-loader!./example.coffee bundle
|
single entry coffee-loader!./example.coffee bundle
|
||||||
chunk {1} ./bundle-runtime-cheap-module-source-map.js, ./bundle-runtime-cheap-module-source-map.js.map (bundle-runtime) 0 bytes ={0}= [entry] [rendered]
|
chunk {1} ./runtime~bundle-cheap-module-source-map.js, ./runtime~bundle-cheap-module-source-map.js.map (runtime~bundle) 0 bytes ={0}= [entry] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
Child
|
Child
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
./bundle-cheap-source-map.js 726 bytes 0 [emitted] bundle
|
./bundle-cheap-source-map.js 726 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-cheap-source-map.js 4.99 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-cheap-source-map.js 4.99 KiB 1 [emitted] runtime~bundle
|
||||||
./bundle-cheap-source-map.js.map 702 bytes 0 [emitted] bundle
|
./bundle-cheap-source-map.js.map 561 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-cheap-source-map.js.map 4.96 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-cheap-source-map.js.map 4.91 KiB 1 [emitted] runtime~bundle
|
||||||
Entrypoint bundle = ./bundle-runtime-cheap-source-map.js ./bundle-runtime-cheap-source-map.js.map ./bundle-cheap-source-map.js ./bundle-cheap-source-map.js.map
|
Entrypoint bundle = ./runtime~bundle-cheap-source-map.js ./runtime~bundle-cheap-source-map.js.map ./bundle-cheap-source-map.js ./bundle-cheap-source-map.js.map
|
||||||
chunk {0} ./bundle-cheap-source-map.js, ./bundle-cheap-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered]
|
chunk {0} ./bundle-cheap-source-map.js, ./bundle-cheap-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
||||||
single entry coffee-loader!./example.coffee bundle
|
single entry coffee-loader!./example.coffee bundle
|
||||||
chunk {1} ./bundle-runtime-cheap-source-map.js, ./bundle-runtime-cheap-source-map.js.map (bundle-runtime) 0 bytes ={0}= [entry] [rendered]
|
chunk {1} ./runtime~bundle-cheap-source-map.js, ./runtime~bundle-cheap-source-map.js.map (runtime~bundle) 0 bytes ={0}= [entry] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
Child
|
Child
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
./bundle-eval.js 920 bytes 0 [emitted] bundle
|
./bundle-eval.js 781 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-eval.js 4.93 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-eval.js 4.93 KiB 1 [emitted] runtime~bundle
|
||||||
Entrypoint bundle = ./bundle-runtime-eval.js ./bundle-eval.js
|
Entrypoint bundle = ./runtime~bundle-eval.js ./bundle-eval.js
|
||||||
chunk {0} ./bundle-eval.js (bundle) 308 bytes ={1}= [initial] [rendered]
|
chunk {0} ./bundle-eval.js (bundle) 308 bytes ={1}= [initial] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
||||||
single entry coffee-loader!./example.coffee bundle
|
single entry coffee-loader!./example.coffee bundle
|
||||||
chunk {1} ./bundle-runtime-eval.js (bundle-runtime) 0 bytes ={0}= [entry] [rendered]
|
chunk {1} ./runtime~bundle-eval.js (runtime~bundle) 0 bytes ={0}= [entry] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
Child
|
Child
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
./bundle-eval-source-map.js 1.56 KiB 0 [emitted] bundle
|
./bundle-eval-source-map.js 1.49 KiB 0 [emitted] bundle
|
||||||
./bundle-runtime-eval-source-map.js 4.93 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-eval-source-map.js 4.93 KiB 1 [emitted] runtime~bundle
|
||||||
Entrypoint bundle = ./bundle-runtime-eval-source-map.js ./bundle-eval-source-map.js
|
Entrypoint bundle = ./runtime~bundle-eval-source-map.js ./bundle-eval-source-map.js
|
||||||
chunk {0} ./bundle-eval-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered]
|
chunk {0} ./bundle-eval-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
||||||
single entry coffee-loader!./example.coffee bundle
|
single entry coffee-loader!./example.coffee bundle
|
||||||
chunk {1} ./bundle-runtime-eval-source-map.js (bundle-runtime) 0 bytes ={0}= [entry] [rendered]
|
chunk {1} ./runtime~bundle-eval-source-map.js (runtime~bundle) 0 bytes ={0}= [entry] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
Child
|
Child
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
./bundle-hidden-source-map.js 674 bytes 0 [emitted] bundle
|
./bundle-hidden-source-map.js 674 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-hidden-source-map.js 4.93 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-hidden-source-map.js 4.93 KiB 1 [emitted] runtime~bundle
|
||||||
./bundle-hidden-source-map.js.map 603 bytes 0 [emitted] bundle
|
./bundle-hidden-source-map.js.map 556 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-hidden-source-map.js.map 5 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-hidden-source-map.js.map 4.96 KiB 1 [emitted] runtime~bundle
|
||||||
Entrypoint bundle = ./bundle-runtime-hidden-source-map.js ./bundle-runtime-hidden-source-map.js.map ./bundle-hidden-source-map.js ./bundle-hidden-source-map.js.map
|
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]
|
chunk {0} ./bundle-hidden-source-map.js, ./bundle-hidden-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
||||||
single entry coffee-loader!./example.coffee bundle
|
single entry coffee-loader!./example.coffee bundle
|
||||||
chunk {1} ./bundle-runtime-hidden-source-map.js, ./bundle-runtime-hidden-source-map.js.map (bundle-runtime) 0 bytes ={0}= [entry] [rendered]
|
chunk {1} ./runtime~bundle-hidden-source-map.js, ./runtime~bundle-hidden-source-map.js.map (runtime~bundle) 0 bytes ={0}= [entry] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
Child
|
Child
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
./bundle-inline-source-map.js 1.51 KiB 0 [emitted] bundle
|
./bundle-inline-source-map.js 1.45 KiB 0 [emitted] bundle
|
||||||
./bundle-runtime-inline-source-map.js 11.7 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-inline-source-map.js 11.6 KiB 1 [emitted] runtime~bundle
|
||||||
Entrypoint bundle = ./bundle-runtime-inline-source-map.js ./bundle-inline-source-map.js
|
Entrypoint bundle = ./runtime~bundle-inline-source-map.js ./bundle-inline-source-map.js
|
||||||
chunk {0} ./bundle-inline-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered]
|
chunk {0} ./bundle-inline-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
||||||
single entry coffee-loader!./example.coffee bundle
|
single entry coffee-loader!./example.coffee bundle
|
||||||
chunk {1} ./bundle-runtime-inline-source-map.js (bundle-runtime) 0 bytes ={0}= [entry] [rendered]
|
chunk {1} ./runtime~bundle-inline-source-map.js (runtime~bundle) 0 bytes ={0}= [entry] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
Child
|
Child
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
./bundle-nosources-source-map.js 730 bytes 0 [emitted] bundle
|
./bundle-nosources-source-map.js 730 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-nosources-source-map.js 5 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-nosources-source-map.js 5 KiB 1 [emitted] runtime~bundle
|
||||||
./bundle-nosources-source-map.js.map 314 bytes 0 [emitted] bundle
|
./bundle-nosources-source-map.js.map 314 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-nosources-source-map.js.map 838 bytes 1 [emitted] bundle-runtime
|
./runtime~bundle-nosources-source-map.js.map 838 bytes 1 [emitted] runtime~bundle
|
||||||
Entrypoint bundle = ./bundle-runtime-nosources-source-map.js ./bundle-runtime-nosources-source-map.js.map ./bundle-nosources-source-map.js ./bundle-nosources-source-map.js.map
|
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
|
||||||
chunk {0} ./bundle-nosources-source-map.js, ./bundle-nosources-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered]
|
chunk {0} ./bundle-nosources-source-map.js, ./bundle-nosources-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
||||||
single entry coffee-loader!./example.coffee bundle
|
single entry coffee-loader!./example.coffee bundle
|
||||||
chunk {1} ./bundle-runtime-nosources-source-map.js, ./bundle-runtime-nosources-source-map.js.map (bundle-runtime) 0 bytes ={0}= [entry] [rendered]
|
chunk {1} ./runtime~bundle-nosources-source-map.js, ./runtime~bundle-nosources-source-map.js.map (runtime~bundle) 0 bytes ={0}= [entry] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
Child
|
Child
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
./bundle-source-map.js 720 bytes 0 [emitted] bundle
|
./bundle-source-map.js 720 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-source-map.js 4.99 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-source-map.js 4.99 KiB 1 [emitted] runtime~bundle
|
||||||
./bundle-source-map.js.map 596 bytes 0 [emitted] bundle
|
./bundle-source-map.js.map 549 bytes 0 [emitted] bundle
|
||||||
./bundle-runtime-source-map.js.map 5 KiB 1 [emitted] bundle-runtime
|
./runtime~bundle-source-map.js.map 4.95 KiB 1 [emitted] runtime~bundle
|
||||||
Entrypoint bundle = ./bundle-runtime-source-map.js ./bundle-runtime-source-map.js.map ./bundle-source-map.js ./bundle-source-map.js.map
|
Entrypoint bundle = ./runtime~bundle-source-map.js ./runtime~bundle-source-map.js.map ./bundle-source-map.js ./bundle-source-map.js.map
|
||||||
chunk {0} ./bundle-source-map.js, ./bundle-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered]
|
chunk {0} ./bundle-source-map.js, ./bundle-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
[0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built]
|
||||||
single entry coffee-loader!./example.coffee bundle
|
single entry coffee-loader!./example.coffee bundle
|
||||||
chunk {1} ./bundle-runtime-source-map.js, ./bundle-runtime-source-map.js.map (bundle-runtime) 0 bytes ={0}= [entry] [rendered]
|
chunk {1} ./runtime~bundle-source-map.js, ./runtime~bundle-source-map.js.map (runtime~bundle) 0 bytes ={0}= [entry] [rendered]
|
||||||
> coffee-loader!./example.coffee bundle
|
> coffee-loader!./example.coffee bundle
|
||||||
```
|
```
|
||||||
|
|
|
@ -15,6 +15,7 @@ function lessStrict(regExpStr) {
|
||||||
|
|
||||||
const runtimeRegexp = /(```\s*(?:js|javascript)\n)?(.*)(\/\*\*\*\*\*\*\/ \(function\(modules\) \{ \/\/ webpackBootstrap\n(?:.|\n)*?\n\/\*\*\*\*\*\*\/ \}\)\n\/\**\/\n)/;
|
const runtimeRegexp = /(```\s*(?:js|javascript)\n)?(.*)(\/\*\*\*\*\*\*\/ \(function\(modules\) \{ \/\/ webpackBootstrap\n(?:.|\n)*?\n\/\*\*\*\*\*\*\/ \}\)\n\/\**\/\n)/;
|
||||||
const timeRegexp = /\s*Time: \d+ms/g;
|
const timeRegexp = /\s*Time: \d+ms/g;
|
||||||
|
const buildAtRegexp = /\s*Built at: .+/mg;
|
||||||
const hashRegexp = /Hash: [a-f0-9]+/g;
|
const hashRegexp = /Hash: [a-f0-9]+/g;
|
||||||
|
|
||||||
exports.replaceBase = (template) => {
|
exports.replaceBase = (template) => {
|
||||||
|
@ -36,6 +37,7 @@ exports.replaceBase = (template) => {
|
||||||
.replace(webpack, "(webpack)")
|
.replace(webpack, "(webpack)")
|
||||||
.replace(webpackParent, "(webpack)/~")
|
.replace(webpackParent, "(webpack)/~")
|
||||||
.replace(timeRegexp, "")
|
.replace(timeRegexp, "")
|
||||||
|
.replace(buildAtRegexp, "")
|
||||||
.replace(hashRegexp, "Hash: 0a1b2c3d4e5f6a7b8c9d")
|
.replace(hashRegexp, "Hash: 0a1b2c3d4e5f6a7b8c9d")
|
||||||
.replace(/\.chunkhash\./g, ".[chunkhash].")
|
.replace(/\.chunkhash\./g, ".[chunkhash].")
|
||||||
.replace(runtimeRegexp, function(match) {
|
.replace(runtimeRegexp, function(match) {
|
||||||
|
|
|
@ -373,7 +373,7 @@ __webpack_require__(/*! ./vendor2 */ 3);
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
vendor1.js 2.99 KiB 0 [emitted] vendor1
|
vendor1.js 2.99 KiB 0 [emitted] vendor1
|
||||||
vendor2.js 3.25 KiB 1 [emitted] vendor2
|
vendor2.js 3.25 KiB 1 [emitted] vendor2
|
||||||
|
@ -429,7 +429,7 @@ chunk {4} pageC.js (pageC) 25 bytes [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
pageC.js 569 bytes 0 [emitted] pageC
|
pageC.js 569 bytes 0 [emitted] pageC
|
||||||
pageB.js 569 bytes 1 [emitted] pageB
|
pageB.js 569 bytes 1 [emitted] pageB
|
||||||
|
|
|
@ -316,11 +316,11 @@ function timed(name, fn) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// Instanciate WebAssembly module
|
// Instantiate WebAssembly module
|
||||||
var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], {
|
var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], {
|
||||||
});
|
});
|
||||||
|
|
||||||
// export exports from WebAssmbly module
|
// export exports from WebAssembly module
|
||||||
module.exports = instance.exports;
|
module.exports = instance.exports;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
@ -371,11 +371,11 @@ function fibonacciJavascript(i) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// Instanciate WebAssembly module
|
// Instantiate WebAssembly module
|
||||||
var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], {
|
var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], {
|
||||||
});
|
});
|
||||||
|
|
||||||
// export exports from WebAssmbly module
|
// export exports from WebAssembly module
|
||||||
module.exports = instance.exports;
|
module.exports = instance.exports;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
@ -388,11 +388,11 @@ module.exports = instance.exports;
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// Instanciate WebAssembly module
|
// Instantiate WebAssembly module
|
||||||
var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], {
|
var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], {
|
||||||
});
|
});
|
||||||
|
|
||||||
// export exports from WebAssmbly module
|
// export exports from WebAssembly module
|
||||||
module.exports = instance.exports;
|
module.exports = instance.exports;
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
@ -413,11 +413,11 @@ module.exports = instance.exports;
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// Instanciate WebAssembly module
|
// Instantiate WebAssembly module
|
||||||
var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], {
|
var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], {
|
||||||
});
|
});
|
||||||
|
|
||||||
// export exports from WebAssmbly module
|
// export exports from WebAssembly module
|
||||||
module.exports = instance.exports;
|
module.exports = instance.exports;
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
@ -430,13 +430,13 @@ module.exports = instance.exports;
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 2.88 KiB 0 [emitted]
|
0.output.js 2.88 KiB 0 [emitted]
|
||||||
9c8c5b45b5c12888e105.wasm 41 bytes 0, 1 [emitted]
|
9c8c5b45b5c12888e105.wasm 41 bytes 0, 1 [emitted]
|
||||||
62df68d96f4aa17e7b77.wasm 67 bytes 0 [emitted]
|
62df68d96f4aa17e7b77.wasm 67 bytes 0 [emitted]
|
||||||
e5003c8310987c008228.wasm 62 bytes 0 [emitted]
|
e5003c8310987c008228.wasm 62 bytes 0 [emitted]
|
||||||
1.output.js 461 bytes 1 [emitted]
|
1.output.js 462 bytes 1 [emitted]
|
||||||
output.js 8.91 KiB 2 [emitted] main
|
output.js 8.91 KiB 2 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
chunk {0} 0.output.js, 9c8c5b45b5c12888e105.wasm, 62df68d96f4aa17e7b77.wasm, e5003c8310987c008228.wasm 585 bytes <{2}> [rendered]
|
chunk {0} 0.output.js, 9c8c5b45b5c12888e105.wasm, 62df68d96f4aa17e7b77.wasm, e5003c8310987c008228.wasm 585 bytes <{2}> [rendered]
|
||||||
|
@ -474,7 +474,7 @@ chunk {2} output.js (main) 788 bytes >{0}< >{1}< [entry] [rendered]
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.output.js 722 bytes 0, 1 [emitted]
|
0.output.js 722 bytes 0, 1 [emitted]
|
||||||
fb3978ee17c3b5162f77.wasm 41 bytes 0, 1, 1 [emitted]
|
fb3978ee17c3b5162f77.wasm 41 bytes 0, 1, 1 [emitted]
|
||||||
|
|
|
@ -343,17 +343,17 @@ module.exports = function() {
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.hash.worker.js 1.82 KiB [emitted]
|
0.hash.worker.js 1.82 KiB [emitted]
|
||||||
hash.worker.js 4.02 KiB [emitted]
|
hash.worker.js 4.02 KiB [emitted]
|
||||||
output.js 3.46 KiB 0 [emitted] main
|
output.js 3.46 KiB 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
chunk {0} output.js (main) 326 bytes [entry] [rendered]
|
chunk {0} output.js (main) 332 bytes [entry] [rendered]
|
||||||
> .\example.js main
|
> .\example.js main
|
||||||
[0] (webpack)/node_modules/worker-loader/dist/cjs.js?name=hash.worker.js!./worker.js 97 bytes {0} [not cacheable] [built]
|
[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
|
cjs require worker-loader?name=hash.worker.js!./worker [1] ./example.js 1:13-66
|
||||||
[1] ./example.js 229 bytes {0} [built]
|
[1] ./example.js 235 bytes {0} [built]
|
||||||
single entry .\example.js main
|
single entry .\example.js main
|
||||||
Child worker:
|
Child worker:
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
|
@ -383,17 +383,17 @@ Child worker:
|
||||||
|
|
||||||
```
|
```
|
||||||
Hash: 0a1b2c3d4e5f6a7b8c9d
|
Hash: 0a1b2c3d4e5f6a7b8c9d
|
||||||
Version: webpack next
|
Version: webpack 4.0.0-beta.2
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
0.hash.worker.js 594 bytes [emitted]
|
0.hash.worker.js 594 bytes [emitted]
|
||||||
hash.worker.js 919 bytes [emitted]
|
hash.worker.js 919 bytes [emitted]
|
||||||
output.js 697 bytes 0 [emitted] main
|
output.js 697 bytes 0 [emitted] main
|
||||||
Entrypoint main = output.js
|
Entrypoint main = output.js
|
||||||
chunk {0} output.js (main) 326 bytes [entry] [rendered]
|
chunk {0} output.js (main) 332 bytes [entry] [rendered]
|
||||||
> .\example.js main
|
> .\example.js main
|
||||||
[0] (webpack)/node_modules/worker-loader/dist/cjs.js?name=hash.worker.js!./worker.js 97 bytes {0} [not cacheable] [built]
|
[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
|
cjs require worker-loader?name=hash.worker.js!./worker [1] ./example.js 1:13-66
|
||||||
[1] ./example.js 229 bytes {0} [built]
|
[1] ./example.js 235 bytes {0} [built]
|
||||||
single entry .\example.js main
|
single entry .\example.js main
|
||||||
Child worker:
|
Child worker:
|
||||||
Asset Size Chunks Chunk Names
|
Asset Size Chunks Chunk Names
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const asyncLib = require("async");
|
const asyncLib = require("neo-async");
|
||||||
const PrefetchDependency = require("./dependencies/PrefetchDependency");
|
const PrefetchDependency = require("./dependencies/PrefetchDependency");
|
||||||
const NormalModule = require("./NormalModule");
|
const NormalModule = require("./NormalModule");
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
*/
|
*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const asyncLib = require("async");
|
const asyncLib = require("neo-async");
|
||||||
|
|
||||||
class CachePlugin {
|
class CachePlugin {
|
||||||
constructor(cache) {
|
constructor(cache) {
|
||||||
this.cache = cache || {};
|
this.cache = cache || {};
|
||||||
this.FS_ACCURENCY = 2000;
|
this.FS_ACCURACY = 2000;
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(compiler) {
|
apply(compiler) {
|
||||||
|
@ -19,7 +19,7 @@ class CachePlugin {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const registerCacheToCompiler = (compiler, cache) => {
|
const registerCacheToCompiler = (compiler, cache) => {
|
||||||
compiler.hooks.thisCompilation.tap("CachePlugin", (compilation) => {
|
compiler.hooks.thisCompilation.tap("CachePlugin", compilation => {
|
||||||
compilation.cache = cache;
|
compilation.cache = cache;
|
||||||
compilation.hooks.childCompiler.tap("CachePlugin", (childCompiler, compilerName, compilerIndex) => {
|
compilation.hooks.childCompiler.tap("CachePlugin", (childCompiler, compilerName, compilerIndex) => {
|
||||||
if(cache) {
|
if(cache) {
|
||||||
|
@ -61,13 +61,13 @@ class CachePlugin {
|
||||||
if(err) return callback(err);
|
if(err) return callback(err);
|
||||||
|
|
||||||
for(const [file, ts] of fileTs) {
|
for(const [file, ts] of fileTs) {
|
||||||
fileTs.set(file, ts + this.FS_ACCURENCY);
|
fileTs.set(file, ts + this.FS_ACCURACY);
|
||||||
}
|
}
|
||||||
|
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
compiler.hooks.afterCompile.tap("CachePlugin", (compilation) => {
|
compiler.hooks.afterCompile.tap("CachePlugin", compilation => {
|
||||||
compilation.compiler._lastCompilationFileDependencies = compilation.fileDependencies;
|
compilation.compiler._lastCompilationFileDependencies = compilation.fileDependencies;
|
||||||
compilation.compiler._lastCompilationContextDependencies = compilation.contextDependencies;
|
compilation.compiler._lastCompilationContextDependencies = compilation.contextDependencies;
|
||||||
});
|
});
|
||||||
|
@ -76,14 +76,14 @@ class CachePlugin {
|
||||||
|
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
applyMtime(mtime) {
|
applyMtime(mtime) {
|
||||||
if(this.FS_ACCURENCY > 1 && mtime % 2 !== 0)
|
if(this.FS_ACCURACY > 1 && mtime % 2 !== 0)
|
||||||
this.FS_ACCURENCY = 1;
|
this.FS_ACCURACY = 1;
|
||||||
else if(this.FS_ACCURENCY > 10 && mtime % 20 !== 0)
|
else if(this.FS_ACCURACY > 10 && mtime % 20 !== 0)
|
||||||
this.FS_ACCURENCY = 10;
|
this.FS_ACCURACY = 10;
|
||||||
else if(this.FS_ACCURENCY > 100 && mtime % 200 !== 0)
|
else if(this.FS_ACCURACY > 100 && mtime % 200 !== 0)
|
||||||
this.FS_ACCURENCY = 100;
|
this.FS_ACCURACY = 100;
|
||||||
else if(this.FS_ACCURENCY > 1000 && mtime % 2000 !== 0)
|
else if(this.FS_ACCURACY > 1000 && mtime % 2000 !== 0)
|
||||||
this.FS_ACCURENCY = 1000;
|
this.FS_ACCURACY = 1000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module.exports = CachePlugin;
|
module.exports = CachePlugin;
|
||||||
|
|
|
@ -13,9 +13,11 @@ module.exports = class CaseSensitiveModulesWarning extends WebpackError {
|
||||||
this.name = "CaseSensitiveModulesWarning";
|
this.name = "CaseSensitiveModulesWarning";
|
||||||
const sortedModules = this._sort(modules);
|
const sortedModules = this._sort(modules);
|
||||||
const modulesList = this._moduleMessages(sortedModules);
|
const modulesList = this._moduleMessages(sortedModules);
|
||||||
this.message = "There are multiple modules with names that only differ in casing.\n" +
|
this.message = `There are multiple modules with names that only differ in casing.
|
||||||
"This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.\n" +
|
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
|
||||||
`Use equal casing. Compare these module identifiers:\n${modulesList}`;
|
Use equal casing. Compare these module identifiers:
|
||||||
|
${modulesList}`;
|
||||||
|
|
||||||
this.origin = this.module = sortedModules[0];
|
this.origin = this.module = sortedModules[0];
|
||||||
|
|
||||||
Error.captureStackTrace(this, this.constructor);
|
Error.captureStackTrace(this, this.constructor);
|
||||||
|
|
10
lib/Chunk.js
10
lib/Chunk.js
|
@ -8,6 +8,8 @@ const util = require("util");
|
||||||
const SortableSet = require("./util/SortableSet");
|
const SortableSet = require("./util/SortableSet");
|
||||||
const GraphHelpers = require("./GraphHelpers");
|
const GraphHelpers = require("./GraphHelpers");
|
||||||
let debugId = 1000;
|
let debugId = 1000;
|
||||||
|
const ERR_CHUNK_ENTRY = "Chunk.entry was removed. Use hasRuntime()";
|
||||||
|
const ERR_CHUNK_INITIAL = "Chunk.initial was removed. Use canBeInitial/isOnlyInitial()";
|
||||||
|
|
||||||
const sortById = (a, b) => {
|
const sortById = (a, b) => {
|
||||||
if(a.id < b.id) return -1;
|
if(a.id < b.id) return -1;
|
||||||
|
@ -59,19 +61,19 @@ class Chunk {
|
||||||
}
|
}
|
||||||
|
|
||||||
get entry() {
|
get entry() {
|
||||||
throw new Error("Chunk.entry was removed. Use hasRuntime()");
|
throw new Error(ERR_CHUNK_ENTRY);
|
||||||
}
|
}
|
||||||
|
|
||||||
set entry(data) {
|
set entry(data) {
|
||||||
throw new Error("Chunk.entry was removed. Use hasRuntime()");
|
throw new Error(ERR_CHUNK_ENTRY);
|
||||||
}
|
}
|
||||||
|
|
||||||
get initial() {
|
get initial() {
|
||||||
throw new Error("Chunk.initial was removed. Use canBeInitial/isOnlyInitial()");
|
throw new Error(ERR_CHUNK_INITIAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
set initial(data) {
|
set initial(data) {
|
||||||
throw new Error("Chunk.initial was removed. Use canBeInitial/isOnlyInitial()");
|
throw new Error(ERR_CHUNK_INITIAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
hasRuntime() {
|
hasRuntime() {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const asyncLib = require("async");
|
const asyncLib = require("neo-async");
|
||||||
const util = require("util");
|
const util = require("util");
|
||||||
const Tapable = require("tapable").Tapable;
|
const Tapable = require("tapable").Tapable;
|
||||||
const SyncHook = require("tapable").SyncHook;
|
const SyncHook = require("tapable").SyncHook;
|
||||||
|
@ -1007,45 +1007,44 @@ class Compilation extends Tapable {
|
||||||
}
|
}
|
||||||
|
|
||||||
assignDepth(module) {
|
assignDepth(module) {
|
||||||
const assignDepthToModule = (module, depth) => {
|
const queue = new Set([module]);
|
||||||
// enter module
|
let depth;
|
||||||
if(typeof module.depth === "number" && module.depth <= depth) return;
|
|
||||||
module.depth = depth;
|
|
||||||
|
|
||||||
// enter it as block
|
module.depth = 0;
|
||||||
assignDepthToDependencyBlock(module, depth + 1);
|
|
||||||
|
const enqueueJob = module => {
|
||||||
|
const d = module.depth;
|
||||||
|
if(typeof d === "number" && d <= depth) return;
|
||||||
|
queue.add(module);
|
||||||
|
module.depth = depth;
|
||||||
};
|
};
|
||||||
|
|
||||||
const assignDepthToDependency = (dependency, depth) => {
|
const assignDepthToDependency = (dependency, depth) => {
|
||||||
if(dependency.module) {
|
if(dependency.module) {
|
||||||
queue.push(() => assignDepthToModule(dependency.module, depth));
|
enqueueJob(dependency.module);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const assignDepthToDependencyBlock = (block, depth) => {
|
const assignDepthToDependencyBlock = block => {
|
||||||
const iteratorDependency = d => assignDepthToDependency(d, depth);
|
|
||||||
|
|
||||||
const iteratorBlock = b => assignDepthToDependencyBlock(b, depth);
|
|
||||||
|
|
||||||
if(block.variables) {
|
if(block.variables) {
|
||||||
iterationBlockVariable(block.variables, iteratorDependency);
|
iterationBlockVariable(block.variables, assignDepthToDependency);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(block.dependencies) {
|
if(block.dependencies) {
|
||||||
iterationOfArrayCallback(block.dependencies, iteratorDependency);
|
iterationOfArrayCallback(block.dependencies, assignDepthToDependency);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(block.blocks) {
|
if(block.blocks) {
|
||||||
iterationOfArrayCallback(block.blocks, iteratorBlock);
|
iterationOfArrayCallback(block.blocks, assignDepthToDependencyBlock);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const queue = [() => {
|
for(module of queue) {
|
||||||
assignDepthToModule(module, 0);
|
queue.delete(module);
|
||||||
}];
|
depth = module.depth;
|
||||||
|
|
||||||
while(queue.length) {
|
depth++;
|
||||||
queue.pop()();
|
assignDepthToDependencyBlock(module);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const asyncLib = require("async");
|
const asyncLib = require("neo-async");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const util = require("util");
|
const util = require("util");
|
||||||
const Tapable = require("tapable").Tapable;
|
const Tapable = require("tapable").Tapable;
|
||||||
|
@ -28,7 +28,7 @@ class Compiler extends Tapable {
|
||||||
super();
|
super();
|
||||||
this.hooks = {
|
this.hooks = {
|
||||||
shouldEmit: new SyncBailHook(["compilation"]),
|
shouldEmit: new SyncBailHook(["compilation"]),
|
||||||
done: new SyncHook(["stats"]),
|
done: new AsyncSeriesHook(["stats"]),
|
||||||
additionalPass: new AsyncSeriesHook([]),
|
additionalPass: new AsyncSeriesHook([]),
|
||||||
beforeRun: new AsyncSeriesHook(["compilation"]),
|
beforeRun: new AsyncSeriesHook(["compilation"]),
|
||||||
run: new AsyncSeriesHook(["compilation"]),
|
run: new AsyncSeriesHook(["compilation"]),
|
||||||
|
@ -171,8 +171,11 @@ class Compiler extends Tapable {
|
||||||
const stats = new Stats(compilation);
|
const stats = new Stats(compilation);
|
||||||
stats.startTime = startTime;
|
stats.startTime = startTime;
|
||||||
stats.endTime = Date.now();
|
stats.endTime = Date.now();
|
||||||
this.hooks.done.call(stats);
|
this.hooks.done.callAsync(stats, err => {
|
||||||
return callback(null, stats);
|
if(err) return callback(err);
|
||||||
|
return callback(null, stats);
|
||||||
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.emitAssets(compilation, err => {
|
this.emitAssets(compilation, err => {
|
||||||
|
@ -184,11 +187,13 @@ class Compiler extends Tapable {
|
||||||
const stats = new Stats(compilation);
|
const stats = new Stats(compilation);
|
||||||
stats.startTime = startTime;
|
stats.startTime = startTime;
|
||||||
stats.endTime = Date.now();
|
stats.endTime = Date.now();
|
||||||
this.hooks.done.call(stats);
|
this.hooks.done.callAsync(stats, err => {
|
||||||
|
|
||||||
this.hooks.additionalPass.callAsync(err => {
|
|
||||||
if(err) return callback(err);
|
if(err) return callback(err);
|
||||||
this.compile(onCompiled);
|
|
||||||
|
this.hooks.additionalPass.callAsync(err => {
|
||||||
|
if(err) return callback(err);
|
||||||
|
this.compile(onCompiled);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -199,8 +204,10 @@ class Compiler extends Tapable {
|
||||||
const stats = new Stats(compilation);
|
const stats = new Stats(compilation);
|
||||||
stats.startTime = startTime;
|
stats.startTime = startTime;
|
||||||
stats.endTime = Date.now();
|
stats.endTime = Date.now();
|
||||||
this.hooks.done.call(stats);
|
this.hooks.done.callAsync(stats, err => {
|
||||||
return callback(null, stats);
|
if(err) return callback(err);
|
||||||
|
return callback(null, stats);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -248,7 +255,7 @@ class Compiler extends Tapable {
|
||||||
const emitFiles = (err) => {
|
const emitFiles = (err) => {
|
||||||
if(err) return callback(err);
|
if(err) return callback(err);
|
||||||
|
|
||||||
asyncLib.forEach(Object.keys(compilation.assets), (file, callback) => {
|
asyncLib.forEach(compilation.assets, (source, file, callback) => {
|
||||||
|
|
||||||
let targetFile = file;
|
let targetFile = file;
|
||||||
const queryStringIdx = targetFile.indexOf("?");
|
const queryStringIdx = targetFile.indexOf("?");
|
||||||
|
@ -259,7 +266,6 @@ class Compiler extends Tapable {
|
||||||
const writeOut = (err) => {
|
const writeOut = (err) => {
|
||||||
if(err) return callback(err);
|
if(err) return callback(err);
|
||||||
const targetPath = this.outputFileSystem.join(outputPath, targetFile);
|
const targetPath = this.outputFileSystem.join(outputPath, targetFile);
|
||||||
const source = compilation.assets[file];
|
|
||||||
if(source.existsAt === targetPath) {
|
if(source.existsAt === targetPath) {
|
||||||
source.emitted = false;
|
source.emitted = false;
|
||||||
return callback();
|
return callback();
|
||||||
|
|
|
@ -9,7 +9,7 @@ const ParserHelpers = require("./ParserHelpers");
|
||||||
|
|
||||||
const getQuery = (request) => {
|
const getQuery = (request) => {
|
||||||
const i = request.indexOf("?");
|
const i = request.indexOf("?");
|
||||||
return request.includes("?") ? request.substr(i) : "";
|
return i !== -1 ? request.substr(i) : "";
|
||||||
};
|
};
|
||||||
|
|
||||||
const collectDeclaration = (declarations, pattern) => {
|
const collectDeclaration = (declarations, pattern) => {
|
||||||
|
|
|
@ -17,11 +17,8 @@ class ContextModule extends Module {
|
||||||
// resolveDependencies: (fs: FS, options: ContextOptions, (err: Error?, dependencies: Dependency[]) => void) => void
|
// resolveDependencies: (fs: FS, options: ContextOptions, (err: Error?, dependencies: Dependency[]) => void) => void
|
||||||
// options: ContextOptions
|
// options: ContextOptions
|
||||||
constructor(resolveDependencies, options) {
|
constructor(resolveDependencies, options) {
|
||||||
super("javascript/dynamic");
|
let resource;
|
||||||
|
let resourceQuery;
|
||||||
// Info from Factory
|
|
||||||
this.resolveDependencies = resolveDependencies;
|
|
||||||
let resource, resourceQuery;
|
|
||||||
const queryIdx = options.resource.indexOf("?");
|
const queryIdx = options.resource.indexOf("?");
|
||||||
if(queryIdx >= 0) {
|
if(queryIdx >= 0) {
|
||||||
resource = options.resource.substr(0, queryIdx);
|
resource = options.resource.substr(0, queryIdx);
|
||||||
|
@ -30,11 +27,15 @@ class ContextModule extends Module {
|
||||||
resource = options.resource;
|
resource = options.resource;
|
||||||
resourceQuery = "";
|
resourceQuery = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super("javascript/dynamic", resource);
|
||||||
|
|
||||||
|
// Info from Factory
|
||||||
|
this.resolveDependencies = resolveDependencies;
|
||||||
this.options = Object.assign({}, options, {
|
this.options = Object.assign({}, options, {
|
||||||
resource: resource,
|
resource: resource,
|
||||||
resourceQuery: resourceQuery
|
resourceQuery: resourceQuery
|
||||||
});
|
});
|
||||||
this.context = this.options.resource;
|
|
||||||
if(options.resolveOptions !== undefined)
|
if(options.resolveOptions !== undefined)
|
||||||
this.resolveOptions = options.resolveOptions;
|
this.resolveOptions = options.resolveOptions;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const asyncLib = require("async");
|
const asyncLib = require("neo-async");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
const Tapable = require("tapable").Tapable;
|
const Tapable = require("tapable").Tapable;
|
||||||
|
|
|
@ -13,7 +13,7 @@ const DelegatedExportsDependency = require("./dependencies/DelegatedExportsDepen
|
||||||
|
|
||||||
class DelegatedModule extends Module {
|
class DelegatedModule extends Module {
|
||||||
constructor(sourceRequest, data, type, userRequest, originalRequest) {
|
constructor(sourceRequest, data, type, userRequest, originalRequest) {
|
||||||
super("javascript/dynamic");
|
super("javascript/dynamic", null);
|
||||||
|
|
||||||
// Info from Factory
|
// Info from Factory
|
||||||
this.sourceRequest = sourceRequest;
|
this.sourceRequest = sourceRequest;
|
||||||
|
|
|
@ -9,10 +9,9 @@ const RawSource = require("webpack-sources").RawSource;
|
||||||
|
|
||||||
class DllModule extends Module {
|
class DllModule extends Module {
|
||||||
constructor(context, dependencies, name, type) {
|
constructor(context, dependencies, name, type) {
|
||||||
super("javascript/dynamic");
|
super("javascript/dynamic", context);
|
||||||
|
|
||||||
// Info from Factory
|
// Info from Factory
|
||||||
this.context = context;
|
|
||||||
this.dependencies = dependencies;
|
this.dependencies = dependencies;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
|
@ -19,9 +19,9 @@ class Entrypoint extends ChunkGroup {
|
||||||
getFiles() {
|
getFiles() {
|
||||||
const files = new Set();
|
const files = new Set();
|
||||||
|
|
||||||
for(let chunkIdx = 0; chunkIdx < this.chunks.length; chunkIdx++) {
|
for(const chunk of this.chunks) {
|
||||||
for(let fileIdx = 0; fileIdx < this.chunks[chunkIdx].files.length; fileIdx++) {
|
for(const file of chunk.files) {
|
||||||
files.add(this.chunks[chunkIdx].files[fileIdx]);
|
files.add(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
const DefinePlugin = require("./DefinePlugin");
|
const DefinePlugin = require("./DefinePlugin");
|
||||||
|
|
||||||
|
const needsEnvVarFix = ["8", "9"].indexOf(process.versions.node.split(".")[0]) >= 0 &&
|
||||||
|
process.platform === "win32";
|
||||||
|
|
||||||
class EnvironmentPlugin {
|
class EnvironmentPlugin {
|
||||||
constructor(...keys) {
|
constructor(...keys) {
|
||||||
if(keys.length === 1 && Array.isArray(keys[0])) {
|
if(keys.length === 1 && Array.isArray(keys[0])) {
|
||||||
|
@ -23,6 +26,13 @@ class EnvironmentPlugin {
|
||||||
|
|
||||||
apply(compiler) {
|
apply(compiler) {
|
||||||
const definitions = this.keys.reduce((defs, key) => {
|
const definitions = this.keys.reduce((defs, key) => {
|
||||||
|
// TODO remove once the fix has made its way into Node 8.
|
||||||
|
// Work around https://github.com/nodejs/node/pull/18463,
|
||||||
|
// affecting Node 8 & 9 by performing an OS-level
|
||||||
|
// operation that always succeeds before reading
|
||||||
|
// environment variables:
|
||||||
|
if(needsEnvVarFix) require("os").cpus();
|
||||||
|
|
||||||
const value = process.env[key] !== undefined ? process.env[key] : this.defaultValues[key];
|
const value = process.env[key] !== undefined ? process.env[key] : this.defaultValues[key];
|
||||||
|
|
||||||
if(value === undefined) {
|
if(value === undefined) {
|
||||||
|
|
|
@ -24,10 +24,7 @@ class EvalDevToolModuleTemplatePlugin {
|
||||||
moduleFilenameTemplate: this.moduleFilenameTemplate,
|
moduleFilenameTemplate: this.moduleFilenameTemplate,
|
||||||
namespace: this.namespace
|
namespace: this.namespace
|
||||||
}, moduleTemplate.runtimeTemplate.requestShortener);
|
}, moduleTemplate.runtimeTemplate.requestShortener);
|
||||||
const footer = ["\n",
|
const footer = "\n" + this.sourceUrlComment.replace(/\[url\]/g, encodeURI(str).replace(/%2F/g, "/").replace(/%20/g, "_").replace(/%5E/g, "^").replace(/%5C/g, "\\").replace(/^\//, ""));
|
||||||
ModuleFilenameHelpers.createFooter(module, moduleTemplate.runtimeTemplate.requestShortener),
|
|
||||||
this.sourceUrlComment.replace(/\[url\]/g, encodeURI(str).replace(/%2F/g, "/").replace(/%20/g, "_").replace(/%5E/g, "^").replace(/%5C/g, "\\").replace(/^\//, ""))
|
|
||||||
].join("\n");
|
|
||||||
const result = new RawSource(`eval(${JSON.stringify(content + footer)});`);
|
const result = new RawSource(`eval(${JSON.stringify(content + footer)});`);
|
||||||
cache.set(source, result);
|
cache.set(source, result);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -19,9 +19,14 @@ class EvalSourceMapDevToolModuleTemplatePlugin {
|
||||||
apply(moduleTemplate) {
|
apply(moduleTemplate) {
|
||||||
const self = this;
|
const self = this;
|
||||||
const options = this.options;
|
const options = this.options;
|
||||||
|
const matchModule = ModuleFilenameHelpers.matchObject.bind(ModuleFilenameHelpers, options);
|
||||||
moduleTemplate.hooks.module.tap("EvalSourceMapDevToolModuleTemplatePlugin", (source, module) => {
|
moduleTemplate.hooks.module.tap("EvalSourceMapDevToolModuleTemplatePlugin", (source, module) => {
|
||||||
if(source.__EvalSourceMapDevToolData)
|
if(source.__EvalSourceMapDevToolData)
|
||||||
return source.__EvalSourceMapDevToolData;
|
return source.__EvalSourceMapDevToolData;
|
||||||
|
if(!matchModule(module.resource)) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
let sourceMap;
|
let sourceMap;
|
||||||
let content;
|
let content;
|
||||||
if(source.sourceAndMap) {
|
if(source.sourceAndMap) {
|
||||||
|
@ -57,11 +62,6 @@ class EvalSourceMapDevToolModuleTemplatePlugin {
|
||||||
return filename;
|
return filename;
|
||||||
});
|
});
|
||||||
sourceMap.sources = moduleFilenames;
|
sourceMap.sources = moduleFilenames;
|
||||||
if(sourceMap.sourcesContent) {
|
|
||||||
sourceMap.sourcesContent = sourceMap.sourcesContent.map((content, i) => {
|
|
||||||
return typeof content === "string" ? `${content}\n\n\n${ModuleFilenameHelpers.createFooter(modules[i], moduleTemplate.runtimeTemplate.requestShortener)}` : null;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
sourceMap.sourceRoot = options.sourceRoot || "";
|
sourceMap.sourceRoot = options.sourceRoot || "";
|
||||||
sourceMap.file = `${module.id}.js`;
|
sourceMap.file = `${module.id}.js`;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ const Template = require("./Template");
|
||||||
|
|
||||||
class ExternalModule extends Module {
|
class ExternalModule extends Module {
|
||||||
constructor(request, type, userRequest) {
|
constructor(request, type, userRequest) {
|
||||||
super("javascript/dynamic");
|
super("javascript/dynamic", null);
|
||||||
|
|
||||||
// Info from Factory
|
// Info from Factory
|
||||||
this.request = request;
|
this.request = request;
|
||||||
|
|
|
@ -14,7 +14,7 @@ class HashedModuleIdsPlugin {
|
||||||
|
|
||||||
this.options = Object.assign({
|
this.options = Object.assign({
|
||||||
context: null,
|
context: null,
|
||||||
hashFunction: "md5",
|
hashFunction: "md4",
|
||||||
hashDigest: "base64",
|
hashDigest: "base64",
|
||||||
hashDigestLength: 4
|
hashDigestLength: 4
|
||||||
}, options);
|
}, options);
|
||||||
|
|
|
@ -203,7 +203,10 @@ module.exports = class HotModuleReplacementPlugin {
|
||||||
const handler = (parser, parserOptions) => {
|
const handler = (parser, parserOptions) => {
|
||||||
parser.hooks.expression.for("__webpack_hash__").tap("HotModuleReplacementPlugin", ParserHelpers.toConstantDependencyWithWebpackRequire(parser, "__webpack_require__.h()"));
|
parser.hooks.expression.for("__webpack_hash__").tap("HotModuleReplacementPlugin", ParserHelpers.toConstantDependencyWithWebpackRequire(parser, "__webpack_require__.h()"));
|
||||||
parser.hooks.evaluateTypeof.for("__webpack_hash__").tap("HotModuleReplacementPlugin", ParserHelpers.evaluateToString("string"));
|
parser.hooks.evaluateTypeof.for("__webpack_hash__").tap("HotModuleReplacementPlugin", ParserHelpers.evaluateToString("string"));
|
||||||
parser.hooks.evaluateIdentifier.for("module.hot").tap("HotModuleReplacementPlugin", expr => {
|
parser.hooks.evaluateIdentifier.for("module.hot").tap({
|
||||||
|
name: "HotModuleReplacementPlugin",
|
||||||
|
before: "NodeStuffPlugin"
|
||||||
|
}, expr => {
|
||||||
return ParserHelpers.evaluateToIdentifier("module.hot", !!parser.state.compilation.hotUpdateChunkTemplate)(expr);
|
return ParserHelpers.evaluateToIdentifier("module.hot", !!parser.state.compilation.hotUpdateChunkTemplate)(expr);
|
||||||
});
|
});
|
||||||
// TODO webpack 5: refactor this, no custom hooks
|
// TODO webpack 5: refactor this, no custom hooks
|
||||||
|
|
|
@ -0,0 +1,186 @@
|
||||||
|
/*
|
||||||
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||||
|
Author Tobias Koppers @sokra
|
||||||
|
*/
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const RawSource = require("webpack-sources").RawSource;
|
||||||
|
const ReplaceSource = require("webpack-sources").ReplaceSource;
|
||||||
|
|
||||||
|
// TODO: clean up this file
|
||||||
|
// replace with newer constructs
|
||||||
|
|
||||||
|
// TODO: remove DependencyVariables and replace them with something better
|
||||||
|
|
||||||
|
class JavascriptGenerator {
|
||||||
|
|
||||||
|
generate(module, dependencyTemplates, runtimeTemplate) {
|
||||||
|
const originalSource = module.originalSource();
|
||||||
|
if(!originalSource) {
|
||||||
|
return new RawSource("throw new Error('No source available');");
|
||||||
|
}
|
||||||
|
|
||||||
|
const source = new ReplaceSource(originalSource);
|
||||||
|
|
||||||
|
this.sourceBlock(module, module, [], dependencyTemplates, source, runtimeTemplate);
|
||||||
|
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceBlock(module, block, availableVars, dependencyTemplates, source, runtimeTemplate) {
|
||||||
|
for(const dependency of block.dependencies) {
|
||||||
|
this.sourceDependency(dependency, dependencyTemplates, source, runtimeTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the variables of all blocks that we need to inject.
|
||||||
|
* These will contain the variable name and its expression.
|
||||||
|
* The name will be added as a paramter in a IIFE the expression as its value.
|
||||||
|
*/
|
||||||
|
const vars = block.variables.reduce((result, value) => {
|
||||||
|
const variable = this.sourceVariables(
|
||||||
|
value, availableVars, dependencyTemplates, runtimeTemplate);
|
||||||
|
|
||||||
|
if(variable) {
|
||||||
|
result.push(variable);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* if we actually have variables
|
||||||
|
* this is important as how #splitVariablesInUniqueNamedChunks works
|
||||||
|
* it will always return an array in an array which would lead to a IIFE wrapper around
|
||||||
|
* a module if we do this with an empty vars array.
|
||||||
|
*/
|
||||||
|
if(vars.length > 0) {
|
||||||
|
/**
|
||||||
|
* Split all variables up into chunks of unique names.
|
||||||
|
* e.g. imagine you have the following variable names that need to be injected:
|
||||||
|
* [foo, bar, baz, foo, some, more]
|
||||||
|
* we can not inject "foo" twice, therefore we just make two IIFEs like so:
|
||||||
|
* (function(foo, bar, baz){
|
||||||
|
* (function(foo, some, more){
|
||||||
|
* ...
|
||||||
|
* }(...));
|
||||||
|
* }(...));
|
||||||
|
*
|
||||||
|
* "splitVariablesInUniqueNamedChunks" splits the variables shown above up to this:
|
||||||
|
* [[foo, bar, baz], [foo, some, more]]
|
||||||
|
*/
|
||||||
|
const injectionVariableChunks = this.splitVariablesInUniqueNamedChunks(vars);
|
||||||
|
|
||||||
|
// create all the beginnings of IIFEs
|
||||||
|
const functionWrapperStarts = injectionVariableChunks.map((variableChunk) => {
|
||||||
|
return this.variableInjectionFunctionWrapperStartCode(
|
||||||
|
variableChunk.map(variable => variable.name)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
// and all the ends
|
||||||
|
const functionWrapperEnds = injectionVariableChunks.map((variableChunk) => {
|
||||||
|
return this.variableInjectionFunctionWrapperEndCode(
|
||||||
|
module,
|
||||||
|
variableChunk.map(variable => variable.expression), block
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
// join them to one big string
|
||||||
|
const varStartCode = functionWrapperStarts.join("");
|
||||||
|
|
||||||
|
// reverse the ends first before joining them, as the last added must be the inner most
|
||||||
|
const varEndCode = functionWrapperEnds.reverse().join("");
|
||||||
|
|
||||||
|
// if we have anything, add it to the source
|
||||||
|
if(varStartCode && varEndCode) {
|
||||||
|
const start = block.range ? block.range[0] : -10;
|
||||||
|
const end = block.range ? block.range[1] : (module.originalSource().size() + 1);
|
||||||
|
source.insert(start + 0.5, varStartCode);
|
||||||
|
source.insert(end + 0.5, "\n/* WEBPACK VAR INJECTION */" + varEndCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(const childBlock of block.blocks) {
|
||||||
|
this.sourceBlock(
|
||||||
|
module,
|
||||||
|
childBlock,
|
||||||
|
availableVars.concat(vars),
|
||||||
|
dependencyTemplates,
|
||||||
|
source,
|
||||||
|
runtimeTemplate
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceDependency(dependency, dependencyTemplates, source, runtimeTemplate) {
|
||||||
|
const template = dependencyTemplates.get(dependency.constructor);
|
||||||
|
if(!template) throw new Error("No template for dependency: " + dependency.constructor.name);
|
||||||
|
template.apply(dependency, source, runtimeTemplate, dependencyTemplates);
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceVariables(variable, availableVars, dependencyTemplates, runtimeTemplate) {
|
||||||
|
const name = variable.name;
|
||||||
|
const expr = variable.expressionSource(dependencyTemplates, runtimeTemplate);
|
||||||
|
|
||||||
|
if(availableVars.some(v => v.name === name && v.expression.source() === expr.source())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
name: name,
|
||||||
|
expression: expr
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* creates the start part of a IIFE around the module to inject a variable name
|
||||||
|
* (function(...){ <- this part
|
||||||
|
* }.call(...))
|
||||||
|
*/
|
||||||
|
variableInjectionFunctionWrapperStartCode(varNames) {
|
||||||
|
const args = varNames.join(", ");
|
||||||
|
return `/* WEBPACK VAR INJECTION */(function(${args}) {`;
|
||||||
|
}
|
||||||
|
|
||||||
|
contextArgument(module, block) {
|
||||||
|
if(this === block) {
|
||||||
|
return module.exportsArgument;
|
||||||
|
}
|
||||||
|
return "this";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* creates the end part of a IIFE around the module to inject a variable name
|
||||||
|
* (function(...){
|
||||||
|
* }.call(...)) <- this part
|
||||||
|
*/
|
||||||
|
variableInjectionFunctionWrapperEndCode(module, varExpressions, block) {
|
||||||
|
const firstParam = this.contextArgument(module, block);
|
||||||
|
const furtherParams = varExpressions.map(e => e.source()).join(", ");
|
||||||
|
return `}.call(${firstParam}, ${furtherParams}))`;
|
||||||
|
}
|
||||||
|
|
||||||
|
splitVariablesInUniqueNamedChunks(vars) {
|
||||||
|
const startState = [
|
||||||
|
[]
|
||||||
|
];
|
||||||
|
return vars.reduce((chunks, variable) => {
|
||||||
|
const current = chunks[chunks.length - 1];
|
||||||
|
// check if variable with same name exists already
|
||||||
|
// if so create a new chunk of variables.
|
||||||
|
const variableNameAlreadyExists = current.some(v => v.name === variable.name);
|
||||||
|
|
||||||
|
if(variableNameAlreadyExists) {
|
||||||
|
// start new chunk with current variable
|
||||||
|
chunks.push([variable]);
|
||||||
|
} else {
|
||||||
|
// else add it to current chunk
|
||||||
|
current.push(variable);
|
||||||
|
}
|
||||||
|
return chunks;
|
||||||
|
}, startState);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = JavascriptGenerator;
|
|
@ -7,6 +7,7 @@
|
||||||
const Parser = require("./Parser");
|
const Parser = require("./Parser");
|
||||||
const Template = require("./Template");
|
const Template = require("./Template");
|
||||||
const ConcatSource = require("webpack-sources").ConcatSource;
|
const ConcatSource = require("webpack-sources").ConcatSource;
|
||||||
|
const JavascriptGenerator = require("./JavascriptGenerator");
|
||||||
|
|
||||||
class JavascriptModulesPlugin {
|
class JavascriptModulesPlugin {
|
||||||
apply(compiler) {
|
apply(compiler) {
|
||||||
|
@ -22,6 +23,15 @@ class JavascriptModulesPlugin {
|
||||||
normalModuleFactory.hooks.createParser.for("javascript/esm").tap("JavascriptModulesPlugin", options => {
|
normalModuleFactory.hooks.createParser.for("javascript/esm").tap("JavascriptModulesPlugin", options => {
|
||||||
return new Parser(options, "module");
|
return new Parser(options, "module");
|
||||||
});
|
});
|
||||||
|
normalModuleFactory.hooks.createGenerator.for("javascript/auto").tap("JavascriptModulesPlugin", options => {
|
||||||
|
return new JavascriptGenerator(options);
|
||||||
|
});
|
||||||
|
normalModuleFactory.hooks.createGenerator.for("javascript/dynamic").tap("JavascriptModulesPlugin", options => {
|
||||||
|
return new JavascriptGenerator(options);
|
||||||
|
});
|
||||||
|
normalModuleFactory.hooks.createGenerator.for("javascript/esm").tap("JavascriptModulesPlugin", options => {
|
||||||
|
return new JavascriptGenerator(options);
|
||||||
|
});
|
||||||
compilation.mainTemplate.hooks.renderManifest.tap("JavascriptModulesPlugin", (result, options) => {
|
compilation.mainTemplate.hooks.renderManifest.tap("JavascriptModulesPlugin", (result, options) => {
|
||||||
const chunk = options.chunk;
|
const chunk = options.chunk;
|
||||||
const hash = options.hash;
|
const hash = options.hash;
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||||
|
Author Tobias Koppers @sokra
|
||||||
|
*/
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const ConcatSource = require("webpack-sources").ConcatSource;
|
||||||
|
|
||||||
|
const stringifySafe = data => JSON.stringify(data)
|
||||||
|
.replace(/\u2028|\u2029/g, str => str === "\u2029" ? "\\u2029" : "\\u2028"); // invalid in JavaScript but valid JSON
|
||||||
|
|
||||||
|
class JsonGenerator {
|
||||||
|
generate(module, dependencyTemplates, runtimeTemplate) {
|
||||||
|
const source = new ConcatSource();
|
||||||
|
const data = module.buildInfo.jsonData;
|
||||||
|
if(Array.isArray(module.buildMeta.providedExports) && !module.isUsed("default")) {
|
||||||
|
// Only some exports are used: We can optimize here, by only generating a part of the JSON
|
||||||
|
const reducedJson = {};
|
||||||
|
for(const exportName of module.buildMeta.providedExports) {
|
||||||
|
if(exportName === "default")
|
||||||
|
continue;
|
||||||
|
const used = module.isUsed(exportName);
|
||||||
|
if(used) {
|
||||||
|
reducedJson[used] = data[exportName];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
source.add(`${module.moduleArgument}.exports = ${stringifySafe(reducedJson)};`);
|
||||||
|
} else {
|
||||||
|
source.add(`${module.moduleArgument}.exports = ${stringifySafe(data)};`);
|
||||||
|
}
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = JsonGenerator;
|
|
@ -5,10 +5,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const JsonParser = require("./JsonParser");
|
const JsonParser = require("./JsonParser");
|
||||||
const ConcatSource = require("webpack-sources").ConcatSource;
|
const JsonGenerator = require("./JsonGenerator");
|
||||||
|
|
||||||
const stringifySafe = data => JSON.stringify(data)
|
|
||||||
.replace(/\u2028|\u2029/g, str => str === "\u2029" ? "\\u2029" : "\\u2028"); // invalid in JavaScript but valid JSON
|
|
||||||
|
|
||||||
class JsonModulesPlugin {
|
class JsonModulesPlugin {
|
||||||
apply(compiler) {
|
apply(compiler) {
|
||||||
|
@ -18,29 +15,8 @@ class JsonModulesPlugin {
|
||||||
normalModuleFactory.hooks.createParser.for("json").tap("JsonModulesPlugin", () => {
|
normalModuleFactory.hooks.createParser.for("json").tap("JsonModulesPlugin", () => {
|
||||||
return new JsonParser();
|
return new JsonParser();
|
||||||
});
|
});
|
||||||
compilation.moduleTemplates.javascript.hooks.content.tap("JsonModulesPlugin", (moduleSource, module) => {
|
normalModuleFactory.hooks.createGenerator.for("json").tap("JsonModulesPlugin", () => {
|
||||||
if(module.type && module.type.startsWith("json")) {
|
return new JsonGenerator();
|
||||||
const source = new ConcatSource();
|
|
||||||
const data = module.buildInfo.jsonData;
|
|
||||||
if(Array.isArray(module.buildMeta.providedExports) && !module.isUsed("default")) {
|
|
||||||
// Only some exports are used: We can optimize here, by only generating a part of the JSON
|
|
||||||
const reducedJson = {};
|
|
||||||
for(const exportName of module.buildMeta.providedExports) {
|
|
||||||
if(exportName === "default")
|
|
||||||
continue;
|
|
||||||
const used = module.isUsed(exportName);
|
|
||||||
if(used) {
|
|
||||||
reducedJson[used] = data[exportName];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
source.add(`${module.moduleArgument}.exports = ${stringifySafe(reducedJson)};`);
|
|
||||||
} else {
|
|
||||||
source.add(`${module.moduleArgument}.exports = ${stringifySafe(data)};`);
|
|
||||||
}
|
|
||||||
return source;
|
|
||||||
} else {
|
|
||||||
return moduleSource;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const asyncLib = require("async");
|
const asyncLib = require("neo-async");
|
||||||
|
|
||||||
class LibManifestPlugin {
|
class LibManifestPlugin {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
|
@ -25,9 +25,10 @@ const sortByDebugId = (a, b) => {
|
||||||
|
|
||||||
class Module extends DependenciesBlock {
|
class Module extends DependenciesBlock {
|
||||||
|
|
||||||
constructor(type) {
|
constructor(type, context = null) {
|
||||||
super();
|
super();
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
this.context = context;
|
||||||
|
|
||||||
// Unique Id
|
// Unique Id
|
||||||
this.debugId = debugId++;
|
this.debugId = debugId++;
|
||||||
|
@ -37,8 +38,6 @@ class Module extends DependenciesBlock {
|
||||||
this.renderedHash = undefined;
|
this.renderedHash = undefined;
|
||||||
|
|
||||||
// Info from Factory
|
// Info from Factory
|
||||||
// TODO refactor: pass as constructor argument
|
|
||||||
this.context = null;
|
|
||||||
this.resolveOptions = EMPTY_RESOLVE_OPTIONS;
|
this.resolveOptions = EMPTY_RESOLVE_OPTIONS;
|
||||||
this.factoryMeta = {};
|
this.factoryMeta = {};
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ const getBefore = (str, token) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getHash = str => {
|
const getHash = str => {
|
||||||
const hash = createHash("md5");
|
const hash = createHash("md4");
|
||||||
hash.update(str);
|
hash.update(str);
|
||||||
return hash.digest("hex").substr(0, 4);
|
return hash.digest("hex").substr(0, 4);
|
||||||
};
|
};
|
||||||
|
@ -112,24 +112,6 @@ ModuleFilenameHelpers.createFilename = (module, options, requestShortener) => {
|
||||||
.replace(ModuleFilenameHelpers.REGEXP_NAMESPACE, opts.namespace);
|
.replace(ModuleFilenameHelpers.REGEXP_NAMESPACE, opts.namespace);
|
||||||
};
|
};
|
||||||
|
|
||||||
ModuleFilenameHelpers.createFooter = (module, requestShortener) => {
|
|
||||||
if(!module) module = "";
|
|
||||||
if(typeof module === "string") {
|
|
||||||
return [
|
|
||||||
"// WEBPACK FOOTER //",
|
|
||||||
`// ${requestShortener.shorten(module)}`
|
|
||||||
].join("\n");
|
|
||||||
} else {
|
|
||||||
return [
|
|
||||||
"//////////////////",
|
|
||||||
"// WEBPACK FOOTER",
|
|
||||||
`// ${module.readableIdentifier(requestShortener)}`,
|
|
||||||
`// module id = ${module.id}`,
|
|
||||||
`// module chunks = ${Array.from(module.chunksIterable, c => c.id).join(" ")}`
|
|
||||||
].join("\n");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ModuleFilenameHelpers.replaceDuplicates = (array, fn, comparator) => {
|
ModuleFilenameHelpers.replaceDuplicates = (array, fn, comparator) => {
|
||||||
const countMap = Object.create(null);
|
const countMap = Object.create(null);
|
||||||
const posMap = Object.create(null);
|
const posMap = Object.create(null);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
const Tapable = require("tapable").Tapable;
|
const Tapable = require("tapable").Tapable;
|
||||||
const SyncHook = require("tapable").SyncHook;
|
const SyncHook = require("tapable").SyncHook;
|
||||||
const MultiHook = require("tapable").MultiHook;
|
const MultiHook = require("tapable").MultiHook;
|
||||||
const asyncLib = require("async");
|
const asyncLib = require("neo-async");
|
||||||
const MultiWatching = require("./MultiWatching");
|
const MultiWatching = require("./MultiWatching");
|
||||||
const MultiStats = require("./MultiStats");
|
const MultiStats = require("./MultiStats");
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,9 @@ const RawSource = require("webpack-sources").RawSource;
|
||||||
class MultiModule extends Module {
|
class MultiModule extends Module {
|
||||||
|
|
||||||
constructor(context, dependencies, name) {
|
constructor(context, dependencies, name) {
|
||||||
super("javascript/dynamic");
|
super("javascript/dynamic", context);
|
||||||
|
|
||||||
// Info from Factory
|
// Info from Factory
|
||||||
this.context = context;
|
|
||||||
this.dependencies = dependencies;
|
this.dependencies = dependencies;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const asyncLib = require("async");
|
const asyncLib = require("neo-async");
|
||||||
|
|
||||||
class MultiWatching {
|
class MultiWatching {
|
||||||
constructor(watchings, compiler) {
|
constructor(watchings, compiler) {
|
||||||
|
|
|
@ -10,7 +10,6 @@ const NativeModule = require("module");
|
||||||
const SourceMapSource = require("webpack-sources").SourceMapSource;
|
const SourceMapSource = require("webpack-sources").SourceMapSource;
|
||||||
const OriginalSource = require("webpack-sources").OriginalSource;
|
const OriginalSource = require("webpack-sources").OriginalSource;
|
||||||
const RawSource = require("webpack-sources").RawSource;
|
const RawSource = require("webpack-sources").RawSource;
|
||||||
const ReplaceSource = require("webpack-sources").ReplaceSource;
|
|
||||||
const CachedSource = require("webpack-sources").CachedSource;
|
const CachedSource = require("webpack-sources").CachedSource;
|
||||||
const LineToLineMappedSource = require("webpack-sources").LineToLineMappedSource;
|
const LineToLineMappedSource = require("webpack-sources").LineToLineMappedSource;
|
||||||
|
|
||||||
|
@ -65,8 +64,18 @@ const dependencyTemplatesHashMap = new WeakMap();
|
||||||
|
|
||||||
class NormalModule extends Module {
|
class NormalModule extends Module {
|
||||||
|
|
||||||
constructor(type, request, userRequest, rawRequest, loaders, resource, parser, resolveOptions) {
|
constructor({
|
||||||
super(type);
|
type,
|
||||||
|
request,
|
||||||
|
userRequest,
|
||||||
|
rawRequest,
|
||||||
|
loaders,
|
||||||
|
resource,
|
||||||
|
parser,
|
||||||
|
generator,
|
||||||
|
resolveOptions
|
||||||
|
}) {
|
||||||
|
super(type, getContext(resource));
|
||||||
|
|
||||||
// Info from Factory
|
// Info from Factory
|
||||||
this.request = request;
|
this.request = request;
|
||||||
|
@ -74,8 +83,8 @@ class NormalModule extends Module {
|
||||||
this.rawRequest = rawRequest;
|
this.rawRequest = rawRequest;
|
||||||
this.binary = type.startsWith("webassembly");
|
this.binary = type.startsWith("webassembly");
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
|
this.generator = generator;
|
||||||
this.resource = resource;
|
this.resource = resource;
|
||||||
this.context = getContext(resource);
|
|
||||||
this.loaders = loaders;
|
this.loaders = loaders;
|
||||||
if(resolveOptions !== undefined)
|
if(resolveOptions !== undefined)
|
||||||
this.resolveOptions = resolveOptions;
|
this.resolveOptions = resolveOptions;
|
||||||
|
@ -353,180 +362,19 @@ class NormalModule extends Module {
|
||||||
return `${this.hash}-${dtHash}`;
|
return `${this.hash}-${dtHash}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceDependency(dependency, dependencyTemplates, source, runtimeTemplate) {
|
|
||||||
const template = dependencyTemplates.get(dependency.constructor);
|
|
||||||
if(!template) throw new Error("No template for dependency: " + dependency.constructor.name);
|
|
||||||
template.apply(dependency, source, runtimeTemplate, dependencyTemplates);
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceVariables(variable, availableVars, dependencyTemplates, runtimeTemplate) {
|
|
||||||
const name = variable.name;
|
|
||||||
const expr = variable.expressionSource(dependencyTemplates, runtimeTemplate);
|
|
||||||
|
|
||||||
if(availableVars.some(v => v.name === name && v.expression.source() === expr.source())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
name: name,
|
|
||||||
expression: expr
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* creates the start part of a IIFE around the module to inject a variable name
|
|
||||||
* (function(...){ <- this part
|
|
||||||
* }.call(...))
|
|
||||||
*/
|
|
||||||
variableInjectionFunctionWrapperStartCode(varNames) {
|
|
||||||
const args = varNames.join(", ");
|
|
||||||
return `/* WEBPACK VAR INJECTION */(function(${args}) {`;
|
|
||||||
}
|
|
||||||
|
|
||||||
contextArgument(block) {
|
|
||||||
if(this === block) {
|
|
||||||
return this.exportsArgument;
|
|
||||||
}
|
|
||||||
return "this";
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* creates the end part of a IIFE around the module to inject a variable name
|
|
||||||
* (function(...){
|
|
||||||
* }.call(...)) <- this part
|
|
||||||
*/
|
|
||||||
variableInjectionFunctionWrapperEndCode(varExpressions, block) {
|
|
||||||
const firstParam = this.contextArgument(block);
|
|
||||||
const furtherParams = varExpressions.map(e => e.source()).join(", ");
|
|
||||||
return `}.call(${firstParam}, ${furtherParams}))`;
|
|
||||||
}
|
|
||||||
|
|
||||||
splitVariablesInUniqueNamedChunks(vars) {
|
|
||||||
const startState = [
|
|
||||||
[]
|
|
||||||
];
|
|
||||||
return vars.reduce((chunks, variable) => {
|
|
||||||
const current = chunks[chunks.length - 1];
|
|
||||||
// check if variable with same name exists already
|
|
||||||
// if so create a new chunk of variables.
|
|
||||||
const variableNameAlreadyExists = current.some(v => v.name === variable.name);
|
|
||||||
|
|
||||||
if(variableNameAlreadyExists) {
|
|
||||||
// start new chunk with current variable
|
|
||||||
chunks.push([variable]);
|
|
||||||
} else {
|
|
||||||
// else add it to current chunk
|
|
||||||
current.push(variable);
|
|
||||||
}
|
|
||||||
return chunks;
|
|
||||||
}, startState);
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceBlock(block, availableVars, dependencyTemplates, source, runtimeTemplate) {
|
|
||||||
for(const dependency of block.dependencies) {
|
|
||||||
this.sourceDependency(dependency, dependencyTemplates, source, runtimeTemplate);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the variables of all blocks that we need to inject.
|
|
||||||
* These will contain the variable name and its expression.
|
|
||||||
* The name will be added as a paramter in a IIFE the expression as its value.
|
|
||||||
*/
|
|
||||||
const vars = block.variables.reduce((result, value) => {
|
|
||||||
const variable = this.sourceVariables(
|
|
||||||
value, availableVars, dependencyTemplates, runtimeTemplate);
|
|
||||||
|
|
||||||
if(variable) {
|
|
||||||
result.push(variable);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* if we actually have variables
|
|
||||||
* this is important as how #splitVariablesInUniqueNamedChunks works
|
|
||||||
* it will always return an array in an array which would lead to a IIFE wrapper around
|
|
||||||
* a module if we do this with an empty vars array.
|
|
||||||
*/
|
|
||||||
if(vars.length > 0) {
|
|
||||||
/**
|
|
||||||
* Split all variables up into chunks of unique names.
|
|
||||||
* e.g. imagine you have the following variable names that need to be injected:
|
|
||||||
* [foo, bar, baz, foo, some, more]
|
|
||||||
* we can not inject "foo" twice, therefore we just make two IIFEs like so:
|
|
||||||
* (function(foo, bar, baz){
|
|
||||||
* (function(foo, some, more){
|
|
||||||
* ...
|
|
||||||
* }(...));
|
|
||||||
* }(...));
|
|
||||||
*
|
|
||||||
* "splitVariablesInUniqueNamedChunks" splits the variables shown above up to this:
|
|
||||||
* [[foo, bar, baz], [foo, some, more]]
|
|
||||||
*/
|
|
||||||
const injectionVariableChunks = this.splitVariablesInUniqueNamedChunks(vars);
|
|
||||||
|
|
||||||
// create all the beginnings of IIFEs
|
|
||||||
const functionWrapperStarts = injectionVariableChunks.map((variableChunk) => {
|
|
||||||
return this.variableInjectionFunctionWrapperStartCode(
|
|
||||||
variableChunk.map(variable => variable.name)
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
// and all the ends
|
|
||||||
const functionWrapperEnds = injectionVariableChunks.map((variableChunk) => {
|
|
||||||
return this.variableInjectionFunctionWrapperEndCode(
|
|
||||||
variableChunk.map(variable => variable.expression), block
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
// join them to one big string
|
|
||||||
const varStartCode = functionWrapperStarts.join("");
|
|
||||||
|
|
||||||
// reverse the ends first before joining them, as the last added must be the inner most
|
|
||||||
const varEndCode = functionWrapperEnds.reverse().join("");
|
|
||||||
|
|
||||||
// if we have anything, add it to the source
|
|
||||||
if(varStartCode && varEndCode) {
|
|
||||||
const start = block.range ? block.range[0] : -10;
|
|
||||||
const end = block.range ? block.range[1] : (this._source.size() + 1);
|
|
||||||
source.insert(start + 0.5, varStartCode);
|
|
||||||
source.insert(end + 0.5, "\n/* WEBPACK VAR INJECTION */" + varEndCode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(const childBlock of block.blocks) {
|
|
||||||
this.sourceBlock(
|
|
||||||
childBlock,
|
|
||||||
availableVars.concat(vars),
|
|
||||||
dependencyTemplates,
|
|
||||||
source,
|
|
||||||
runtimeTemplate
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
source(dependencyTemplates, runtimeTemplate) {
|
source(dependencyTemplates, runtimeTemplate) {
|
||||||
if(this.type.startsWith("javascript")) {
|
const hashDigest = this.getHashDigest(dependencyTemplates);
|
||||||
const hashDigest = this.getHashDigest(dependencyTemplates);
|
if(this._cachedSourceHash === hashDigest) {
|
||||||
if(this._cachedSourceHash === hashDigest) {
|
// We can reuse the cached source
|
||||||
// We can reuse the cached source
|
return this._cachedSource;
|
||||||
return this._cachedSource;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!this._source) {
|
|
||||||
return new RawSource("throw new Error('No source available');");
|
|
||||||
}
|
|
||||||
|
|
||||||
const source = new ReplaceSource(this._source);
|
|
||||||
|
|
||||||
this.sourceBlock(this, [], dependencyTemplates, source, runtimeTemplate);
|
|
||||||
|
|
||||||
const cachedSource = new CachedSource(source);
|
|
||||||
this._cachedSource = cachedSource;
|
|
||||||
this._cachedSourceHash = hashDigest;
|
|
||||||
return cachedSource;
|
|
||||||
}
|
}
|
||||||
return this._source;
|
|
||||||
|
const source = this.generator.generate(this, dependencyTemplates, runtimeTemplate);
|
||||||
|
|
||||||
|
const cachedSource = new CachedSource(source);
|
||||||
|
this._cachedSource = cachedSource;
|
||||||
|
this._cachedSourceHash = hashDigest;
|
||||||
|
return cachedSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
originalSource() {
|
originalSource() {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const asyncLib = require("async");
|
const asyncLib = require("neo-async");
|
||||||
const Tapable = require("tapable").Tapable;
|
const Tapable = require("tapable").Tapable;
|
||||||
const AsyncSeriesWaterfallHook = require("tapable").AsyncSeriesWaterfallHook;
|
const AsyncSeriesWaterfallHook = require("tapable").AsyncSeriesWaterfallHook;
|
||||||
const SyncWaterfallHook = require("tapable").SyncWaterfallHook;
|
const SyncWaterfallHook = require("tapable").SyncWaterfallHook;
|
||||||
|
@ -61,6 +61,8 @@ class NormalModuleFactory extends Tapable {
|
||||||
module: new SyncWaterfallHook(["module", "data"]),
|
module: new SyncWaterfallHook(["module", "data"]),
|
||||||
createParser: new HookMap(() => new SyncBailHook(["parserOptions"])),
|
createParser: new HookMap(() => new SyncBailHook(["parserOptions"])),
|
||||||
parser: new HookMap(() => new SyncHook(["parser", "parserOptions"])),
|
parser: new HookMap(() => new SyncHook(["parser", "parserOptions"])),
|
||||||
|
createGenerator: new HookMap(() => new SyncBailHook(["generatorOptions"])),
|
||||||
|
generator: new HookMap(() => new SyncHook(["generator", "generatorOptions"])),
|
||||||
};
|
};
|
||||||
this._pluginCompat.tap("NormalModuleFactory", options => {
|
this._pluginCompat.tap("NormalModuleFactory", options => {
|
||||||
switch(options.name) {
|
switch(options.name) {
|
||||||
|
@ -89,6 +91,7 @@ class NormalModuleFactory extends Tapable {
|
||||||
this.cachePredicate = typeof options.unsafeCache === "function" ? options.unsafeCache : Boolean.bind(null, options.unsafeCache);
|
this.cachePredicate = typeof options.unsafeCache === "function" ? options.unsafeCache : Boolean.bind(null, options.unsafeCache);
|
||||||
this.context = context || "";
|
this.context = context || "";
|
||||||
this.parserCache = Object.create(null);
|
this.parserCache = Object.create(null);
|
||||||
|
this.generatorCache = Object.create(null);
|
||||||
this.hooks.factory.tap("NormalModuleFactory", () => (result, callback) => {
|
this.hooks.factory.tap("NormalModuleFactory", () => (result, callback) => {
|
||||||
let resolver = this.hooks.resolver.call(null);
|
let resolver = this.hooks.resolver.call(null);
|
||||||
|
|
||||||
|
@ -118,16 +121,7 @@ class NormalModuleFactory extends Tapable {
|
||||||
return callback(new Error("Empty dependency (no request)"));
|
return callback(new Error("Empty dependency (no request)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
createdModule = new NormalModule(
|
createdModule = new NormalModule(result);
|
||||||
result.type,
|
|
||||||
result.request,
|
|
||||||
result.userRequest,
|
|
||||||
result.rawRequest,
|
|
||||||
result.loaders,
|
|
||||||
result.resource,
|
|
||||||
result.parser,
|
|
||||||
result.resolveOptions
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createdModule = this.hooks.module.call(createdModule, result);
|
createdModule = this.hooks.module.call(createdModule, result);
|
||||||
|
@ -254,6 +248,7 @@ class NormalModuleFactory extends Tapable {
|
||||||
settings,
|
settings,
|
||||||
type,
|
type,
|
||||||
parser: this.getParser(type, settings.parser),
|
parser: this.getParser(type, settings.parser),
|
||||||
|
generator: this.getGenerator(type, settings.generator),
|
||||||
resolveOptions
|
resolveOptions
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -349,6 +344,29 @@ class NormalModuleFactory extends Tapable {
|
||||||
return parser;
|
return parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getGenerator(type, generatorOptions) {
|
||||||
|
let ident = type;
|
||||||
|
if(generatorOptions) {
|
||||||
|
if(generatorOptions.ident)
|
||||||
|
ident = `${type}|${generatorOptions.ident}`;
|
||||||
|
else
|
||||||
|
ident = JSON.stringify([type, generatorOptions]);
|
||||||
|
}
|
||||||
|
if(ident in this.generatorCache) {
|
||||||
|
return this.generatorCache[ident];
|
||||||
|
}
|
||||||
|
return this.generatorCache[ident] = this.createGenerator(type, generatorOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
createGenerator(type, generatorOptions = {}) {
|
||||||
|
const generator = this.hooks.createGenerator.for(type).call(generatorOptions);
|
||||||
|
if(!generator) {
|
||||||
|
throw new Error(`No generator registered for ${type}`);
|
||||||
|
}
|
||||||
|
this.hooks.generator.for(type).call(generator, generatorOptions);
|
||||||
|
return generator;
|
||||||
|
}
|
||||||
|
|
||||||
getResolver(type, resolveOptions) {
|
getResolver(type, resolveOptions) {
|
||||||
return this.resolverFactory.get(type, resolveOptions || EMPTY_RESOLVE_OPTIONS);
|
return this.resolverFactory.get(type, resolveOptions || EMPTY_RESOLVE_OPTIONS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ const joinRanges = (startRange, endRange) => {
|
||||||
const defaultParserOptions = {
|
const defaultParserOptions = {
|
||||||
ranges: true,
|
ranges: true,
|
||||||
locations: true,
|
locations: true,
|
||||||
ecmaVersion: 2017,
|
ecmaVersion: 2018,
|
||||||
sourceType: "module",
|
sourceType: "module",
|
||||||
onComment: null,
|
onComment: null,
|
||||||
plugins: {
|
plugins: {
|
||||||
|
@ -609,9 +609,13 @@ class Parser extends Tapable {
|
||||||
if(classy.superClass)
|
if(classy.superClass)
|
||||||
this.walkExpression(classy.superClass);
|
this.walkExpression(classy.superClass);
|
||||||
if(classy.body && classy.body.type === "ClassBody") {
|
if(classy.body && classy.body.type === "ClassBody") {
|
||||||
for(const methodDefinition of classy.body.body)
|
const wasTopLevel = this.scope.topLevelScope;
|
||||||
|
this.scope.topLevelScope = false;
|
||||||
|
for(const methodDefinition of classy.body.body) {
|
||||||
if(methodDefinition.type === "MethodDefinition")
|
if(methodDefinition.type === "MethodDefinition")
|
||||||
this.walkMethodDefinition(methodDefinition);
|
this.walkMethodDefinition(methodDefinition);
|
||||||
|
}
|
||||||
|
this.scope.topLevelScope = wasTopLevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1293,6 +1297,10 @@ class Parser extends Tapable {
|
||||||
walkObjectExpression(expression) {
|
walkObjectExpression(expression) {
|
||||||
for(let propIndex = 0, len = expression.properties.length; propIndex < len; propIndex++) {
|
for(let propIndex = 0, len = expression.properties.length; propIndex < len; propIndex++) {
|
||||||
const prop = expression.properties[propIndex];
|
const prop = expression.properties[propIndex];
|
||||||
|
if(prop.type === "SpreadElement") {
|
||||||
|
this.walkExpression(prop.argument);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(prop.computed)
|
if(prop.computed)
|
||||||
this.walkExpression(prop.key);
|
this.walkExpression(prop.key);
|
||||||
if(prop.shorthand)
|
if(prop.shorthand)
|
||||||
|
@ -1852,7 +1860,7 @@ class Parser extends Tapable {
|
||||||
}
|
}
|
||||||
|
|
||||||
static parse(code, options) {
|
static parse(code, options) {
|
||||||
const type = options.sourceType;
|
const type = options ? options.sourceType : "module";
|
||||||
const parserOptions = Object.assign(Object.create(null), defaultParserOptions, options);
|
const parserOptions = Object.assign(Object.create(null), defaultParserOptions, options);
|
||||||
|
|
||||||
if(type === "auto") {
|
if(type === "auto") {
|
||||||
|
|
|
@ -11,7 +11,7 @@ const RawSource = require("webpack-sources").RawSource;
|
||||||
module.exports = class RawModule extends Module {
|
module.exports = class RawModule extends Module {
|
||||||
|
|
||||||
constructor(source, identifier, readableIdentifier) {
|
constructor(source, identifier, readableIdentifier) {
|
||||||
super("javascript/dynamic");
|
super("javascript/dynamic", null);
|
||||||
this.sourceStr = source;
|
this.sourceStr = source;
|
||||||
this.identifierStr = identifier || this.sourceStr;
|
this.identifierStr = identifier || this.sourceStr;
|
||||||
this.readableIdentifierStr = readableIdentifier || this.identifierStr;
|
this.readableIdentifierStr = readableIdentifier || this.identifierStr;
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const WebpackError = require("./WebpackError");
|
||||||
|
|
||||||
|
module.exports = class RemovedPluginError extends WebpackError {
|
||||||
|
constructor(message) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.message = message;
|
||||||
|
|
||||||
|
Error.captureStackTrace(this, this.constructor);
|
||||||
|
}
|
||||||
|
};
|
|
@ -192,6 +192,7 @@ module.exports = class RuntimeTemplate {
|
||||||
|
|
||||||
exportFromImport({
|
exportFromImport({
|
||||||
module,
|
module,
|
||||||
|
request,
|
||||||
exportName,
|
exportName,
|
||||||
originModule,
|
originModule,
|
||||||
asiSafe,
|
asiSafe,
|
||||||
|
@ -199,6 +200,9 @@ module.exports = class RuntimeTemplate {
|
||||||
callContext,
|
callContext,
|
||||||
importVar
|
importVar
|
||||||
}) {
|
}) {
|
||||||
|
if(!module) return this.missingModule({
|
||||||
|
request
|
||||||
|
});
|
||||||
const exportsType = module.buildMeta && module.buildMeta.exportsType;
|
const exportsType = module.buildMeta && module.buildMeta.exportsType;
|
||||||
|
|
||||||
if(!exportsType) {
|
if(!exportsType) {
|
||||||
|
|
|
@ -184,9 +184,7 @@ class SourceMapDevToolPlugin {
|
||||||
const modules = task.modules;
|
const modules = task.modules;
|
||||||
const moduleFilenames = modules.map(m => moduleToSourceNameMapping.get(m));
|
const moduleFilenames = modules.map(m => moduleToSourceNameMapping.get(m));
|
||||||
sourceMap.sources = moduleFilenames;
|
sourceMap.sources = moduleFilenames;
|
||||||
if(sourceMap.sourcesContent && !options.noSources) {
|
if(options.noSources) {
|
||||||
sourceMap.sourcesContent = sourceMap.sourcesContent.map((content, i) => typeof content === "string" ? `${content}\n\n\n${ModuleFilenameHelpers.createFooter(modules[i], requestShortener)}` : null);
|
|
||||||
} else {
|
|
||||||
sourceMap.sourcesContent = undefined;
|
sourceMap.sourcesContent = undefined;
|
||||||
}
|
}
|
||||||
sourceMap.sourceRoot = options.sourceRoot || "";
|
sourceMap.sourceRoot = options.sourceRoot || "";
|
||||||
|
@ -213,7 +211,7 @@ class SourceMapDevToolPlugin {
|
||||||
basename: basename(filename)
|
basename: basename(filename)
|
||||||
});
|
});
|
||||||
if(sourceMapFile.includes("[contenthash]")) {
|
if(sourceMapFile.includes("[contenthash]")) {
|
||||||
sourceMapFile = sourceMapFile.replace(/\[contenthash\]/g, createHash("md5").update(sourceMapString).digest("hex"));
|
sourceMapFile = sourceMapFile.replace(/\[contenthash\]/g, createHash("md4").update(sourceMapString).digest("hex"));
|
||||||
}
|
}
|
||||||
const sourceMapUrl = options.publicPath ? options.publicPath + sourceMapFile.replace(/\\/g, "/") : path.relative(path.dirname(file), sourceMapFile).replace(/\\/g, "/");
|
const sourceMapUrl = options.publicPath ? options.publicPath + sourceMapFile.replace(/\\/g, "/") : path.relative(path.dirname(file), sourceMapFile).replace(/\\/g, "/");
|
||||||
if(currentSourceMappingURLComment !== false) {
|
if(currentSourceMappingURLComment !== false) {
|
||||||
|
|
35
lib/Stats.js
35
lib/Stats.js
|
@ -105,6 +105,7 @@ class Stats {
|
||||||
const showEnv = optionOrLocalFallback(options.env, false);
|
const showEnv = optionOrLocalFallback(options.env, false);
|
||||||
const showVersion = optionOrLocalFallback(options.version, true);
|
const showVersion = optionOrLocalFallback(options.version, true);
|
||||||
const showTimings = optionOrLocalFallback(options.timings, true);
|
const showTimings = optionOrLocalFallback(options.timings, true);
|
||||||
|
const showBuiltAt = optionOrLocalFallback(options.builtAt, true);
|
||||||
const showAssets = optionOrLocalFallback(options.assets, true);
|
const showAssets = optionOrLocalFallback(options.assets, true);
|
||||||
const showEntrypoints = optionOrLocalFallback(options.entrypoints, true);
|
const showEntrypoints = optionOrLocalFallback(options.entrypoints, true);
|
||||||
const showChunks = optionOrLocalFallback(options.chunks, !forToString);
|
const showChunks = optionOrLocalFallback(options.chunks, !forToString);
|
||||||
|
@ -133,6 +134,7 @@ class Stats {
|
||||||
const sortModules = optionsOrFallback(options.modulesSort, "id");
|
const sortModules = optionsOrFallback(options.modulesSort, "id");
|
||||||
const sortChunks = optionsOrFallback(options.chunksSort, "id");
|
const sortChunks = optionsOrFallback(options.chunksSort, "id");
|
||||||
const sortAssets = optionsOrFallback(options.assetsSort, "");
|
const sortAssets = optionsOrFallback(options.assetsSort, "");
|
||||||
|
const showOutputPath = optionOrLocalFallback(options.outputPath, !forToString);
|
||||||
|
|
||||||
if(!showCachedModules) {
|
if(!showCachedModules) {
|
||||||
excludeModules.push((ident, module) => !module.built);
|
excludeModules.push((ident, module) => !module.built);
|
||||||
|
@ -254,6 +256,10 @@ class Stats {
|
||||||
obj.time = this.endTime - this.startTime;
|
obj.time = this.endTime - this.startTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(showBuiltAt && this.endTime) {
|
||||||
|
obj.builtAt = this.endTime;
|
||||||
|
}
|
||||||
|
|
||||||
if(showEnv && options._env) {
|
if(showEnv && options._env) {
|
||||||
obj.env = options._env;
|
obj.env = options._env;
|
||||||
}
|
}
|
||||||
|
@ -266,6 +272,9 @@ class Stats {
|
||||||
hash: this.compilation.hash
|
hash: this.compilation.hash
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if(showOutputPath) {
|
||||||
|
obj.outputPath = this.compilation.mainTemplate.outputOptions.path;
|
||||||
|
}
|
||||||
if(showAssets) {
|
if(showAssets) {
|
||||||
const assetsByFile = {};
|
const assetsByFile = {};
|
||||||
const compilationAssets = Object.keys(compilation.assets);
|
const compilationAssets = Object.keys(compilation.assets);
|
||||||
|
@ -439,9 +448,9 @@ class Stats {
|
||||||
names: chunk.name ? [chunk.name] : [],
|
names: chunk.name ? [chunk.name] : [],
|
||||||
files: chunk.files.slice(),
|
files: chunk.files.slice(),
|
||||||
hash: chunk.renderedHash,
|
hash: chunk.renderedHash,
|
||||||
siblings: Array.from(siblings),
|
siblings: Array.from(siblings).sort(),
|
||||||
parents: Array.from(parents),
|
parents: Array.from(parents).sort(),
|
||||||
children: Array.from(children)
|
children: Array.from(children).sort()
|
||||||
};
|
};
|
||||||
if(showChunkModules) {
|
if(showChunkModules) {
|
||||||
obj.modules = chunk
|
obj.modules = chunk
|
||||||
|
@ -463,7 +472,17 @@ class Stats {
|
||||||
loc: formatLocation(origin.loc),
|
loc: formatLocation(origin.loc),
|
||||||
request: origin.request,
|
request: origin.request,
|
||||||
reasons: origin.reasons || []
|
reasons: origin.reasons || []
|
||||||
}));
|
})).sort((a, b) => {
|
||||||
|
if(typeof a.moduleId === "number" && typeof b.moduleId !== "number") return 1;
|
||||||
|
if(typeof a.moduleId !== "number" && typeof b.moduleId === "number") return -1;
|
||||||
|
if(typeof a.moduleId === "number" && typeof b.moduleId === "number") {
|
||||||
|
const diffId = a.moduleId - b.moduleId;
|
||||||
|
if(diffId !== 0) return diffId;
|
||||||
|
}
|
||||||
|
if(a.loc < b.loc) return -1;
|
||||||
|
if(a.loc > b.loc) return 1;
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
});
|
});
|
||||||
|
@ -616,6 +635,14 @@ class Stats {
|
||||||
colors.normal("ms");
|
colors.normal("ms");
|
||||||
newline();
|
newline();
|
||||||
}
|
}
|
||||||
|
if(typeof obj.builtAt === "number") {
|
||||||
|
const builtAtDate = new Date(obj.builtAt);
|
||||||
|
colors.normal("Built at: ");
|
||||||
|
colors.normal(builtAtDate.toLocaleDateString());
|
||||||
|
colors.normal(" ");
|
||||||
|
colors.bold(builtAtDate.toLocaleTimeString());
|
||||||
|
newline();
|
||||||
|
}
|
||||||
if(obj.env) {
|
if(obj.env) {
|
||||||
colors.normal("Environment (--env): ");
|
colors.normal("Environment (--env): ");
|
||||||
colors.bold(JSON.stringify(obj.env, null, 2));
|
colors.bold(JSON.stringify(obj.env, null, 2));
|
||||||
|
|
|
@ -59,11 +59,13 @@ class Watching {
|
||||||
const stats = new Stats(compilation);
|
const stats = new Stats(compilation);
|
||||||
stats.startTime = this.startTime;
|
stats.startTime = this.startTime;
|
||||||
stats.endTime = Date.now();
|
stats.endTime = Date.now();
|
||||||
this.compiler.hooks.done.call(stats);
|
this.compiler.hooks.done.callAsync(stats, err => {
|
||||||
|
|
||||||
this.compiler.hooks.additionalPass.callAsync(err => {
|
|
||||||
if(err) return this._done(err);
|
if(err) return this._done(err);
|
||||||
this.compiler.compile(onCompiled);
|
|
||||||
|
this.compiler.hooks.additionalPass.callAsync(err => {
|
||||||
|
if(err) return this._done(err);
|
||||||
|
this.compiler.compile(onCompiled);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -93,13 +95,14 @@ class Watching {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.compiler.hooks.done.call(stats);
|
this.compiler.hooks.done.callAsync(stats, () => {
|
||||||
this.handler(null, stats);
|
this.handler(null, stats);
|
||||||
if(!this.closed) {
|
if(!this.closed) {
|
||||||
this.watch(Array.from(compilation.fileDependencies), Array.from(compilation.contextDependencies), Array.from(compilation.missingDependencies));
|
this.watch(Array.from(compilation.fileDependencies), Array.from(compilation.contextDependencies), Array.from(compilation.missingDependencies));
|
||||||
}
|
}
|
||||||
for(const cb of this.callbacks) cb();
|
for(const cb of this.callbacks) cb();
|
||||||
this.callbacks.length = 0;
|
this.callbacks.length = 0;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(files, dirs, missing) {
|
watch(files, dirs, missing) {
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||||
|
Author Tobias Koppers @sokra
|
||||||
|
*/
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
class WebAssemblyGenerator {
|
||||||
|
generate(module) {
|
||||||
|
return module.originalSource();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = WebAssemblyGenerator;
|
|
@ -5,6 +5,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const WebAssemblyParser = require("./WebAssemblyParser");
|
const WebAssemblyParser = require("./WebAssemblyParser");
|
||||||
|
const WebAssemblyGenerator = require("./WebAssemblyGenerator");
|
||||||
const WebAssemblyImportDependency = require("./dependencies/WebAssemblyImportDependency");
|
const WebAssemblyImportDependency = require("./dependencies/WebAssemblyImportDependency");
|
||||||
|
|
||||||
class WebAssemblyModulesPlugin {
|
class WebAssemblyModulesPlugin {
|
||||||
|
@ -18,6 +19,10 @@ class WebAssemblyModulesPlugin {
|
||||||
return new WebAssemblyParser();
|
return new WebAssemblyParser();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
normalModuleFactory.hooks.createGenerator.for("webassembly/experimental").tap("WebAssemblyModulesPlugin", () => {
|
||||||
|
return new WebAssemblyGenerator();
|
||||||
|
});
|
||||||
|
|
||||||
compilation.chunkTemplate.hooks.renderManifest.tap("WebAssemblyModulesPlugin", (result, options) => {
|
compilation.chunkTemplate.hooks.renderManifest.tap("WebAssemblyModulesPlugin", (result, options) => {
|
||||||
const chunk = options.chunk;
|
const chunk = options.chunk;
|
||||||
const outputOptions = options.outputOptions;
|
const outputOptions = options.outputOptions;
|
||||||
|
|
|
@ -138,7 +138,9 @@ class WebpackOptionsApply extends OptionsApply {
|
||||||
"app",
|
"app",
|
||||||
"auto-updater",
|
"auto-updater",
|
||||||
"browser-window",
|
"browser-window",
|
||||||
|
"clipboard",
|
||||||
"content-tracing",
|
"content-tracing",
|
||||||
|
"crash-reporter",
|
||||||
"dialog",
|
"dialog",
|
||||||
"electron",
|
"electron",
|
||||||
"global-shortcut",
|
"global-shortcut",
|
||||||
|
@ -146,17 +148,16 @@ class WebpackOptionsApply extends OptionsApply {
|
||||||
"ipc-main",
|
"ipc-main",
|
||||||
"menu",
|
"menu",
|
||||||
"menu-item",
|
"menu-item",
|
||||||
|
"native-image",
|
||||||
|
"original-fs",
|
||||||
"power-monitor",
|
"power-monitor",
|
||||||
"power-save-blocker",
|
"power-save-blocker",
|
||||||
"protocol",
|
"protocol",
|
||||||
"session",
|
|
||||||
"web-contents",
|
|
||||||
"tray",
|
|
||||||
"clipboard",
|
|
||||||
"crash-reporter",
|
|
||||||
"native-image",
|
|
||||||
"screen",
|
"screen",
|
||||||
"shell"
|
"session",
|
||||||
|
"shell",
|
||||||
|
"tray",
|
||||||
|
"web-contents"
|
||||||
]).apply(compiler);
|
]).apply(compiler);
|
||||||
new LoaderTargetPlugin(options.target).apply(compiler);
|
new LoaderTargetPlugin(options.target).apply(compiler);
|
||||||
break;
|
break;
|
||||||
|
@ -168,17 +169,18 @@ class WebpackOptionsApply extends OptionsApply {
|
||||||
new FunctionModulePlugin(options.output).apply(compiler);
|
new FunctionModulePlugin(options.output).apply(compiler);
|
||||||
new NodeTargetPlugin().apply(compiler);
|
new NodeTargetPlugin().apply(compiler);
|
||||||
new ExternalsPlugin("commonjs", [
|
new ExternalsPlugin("commonjs", [
|
||||||
|
"clipboard",
|
||||||
|
"crash-reporter",
|
||||||
"desktop-capturer",
|
"desktop-capturer",
|
||||||
"electron",
|
"electron",
|
||||||
"ipc",
|
"ipc",
|
||||||
"ipc-renderer",
|
"ipc-renderer",
|
||||||
"remote",
|
|
||||||
"web-frame",
|
|
||||||
"clipboard",
|
|
||||||
"crash-reporter",
|
|
||||||
"native-image",
|
"native-image",
|
||||||
|
"original-fs",
|
||||||
|
"remote",
|
||||||
"screen",
|
"screen",
|
||||||
"shell"
|
"shell",
|
||||||
|
"web-frame"
|
||||||
]).apply(compiler);
|
]).apply(compiler);
|
||||||
new LoaderTargetPlugin(options.target).apply(compiler);
|
new LoaderTargetPlugin(options.target).apply(compiler);
|
||||||
break;
|
break;
|
||||||
|
@ -274,7 +276,7 @@ class WebpackOptionsApply extends OptionsApply {
|
||||||
new RemoveParentModulesPlugin().apply(compiler);
|
new RemoveParentModulesPlugin().apply(compiler);
|
||||||
if(options.optimization.removeEmptyChunks)
|
if(options.optimization.removeEmptyChunks)
|
||||||
new RemoveEmptyChunksPlugin().apply(compiler);
|
new RemoveEmptyChunksPlugin().apply(compiler);
|
||||||
if(options.optimization.mergedDuplicateChunks)
|
if(options.optimization.mergeDuplicateChunks)
|
||||||
new MergeDuplicateChunksPlugin().apply(compiler);
|
new MergeDuplicateChunksPlugin().apply(compiler);
|
||||||
if(options.optimization.flagIncludedChunks)
|
if(options.optimization.flagIncludedChunks)
|
||||||
new FlagIncludedChunksPlugin().apply(compiler);
|
new FlagIncludedChunksPlugin().apply(compiler);
|
||||||
|
@ -291,7 +293,7 @@ class WebpackOptionsApply extends OptionsApply {
|
||||||
if(options.optimization.splitChunks)
|
if(options.optimization.splitChunks)
|
||||||
new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler);
|
new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler);
|
||||||
if(options.optimization.runtimeChunk)
|
if(options.optimization.runtimeChunk)
|
||||||
new RuntimeChunkPlugin().apply(compiler);
|
new RuntimeChunkPlugin(options.optimization.runtimeChunk).apply(compiler);
|
||||||
if(options.optimization.noEmitOnErrors)
|
if(options.optimization.noEmitOnErrors)
|
||||||
new NoEmitOnErrorsPlugin().apply(compiler);
|
new NoEmitOnErrorsPlugin().apply(compiler);
|
||||||
if(options.optimization.namedModules)
|
if(options.optimization.namedModules)
|
||||||
|
|
|
@ -41,13 +41,16 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
|
||||||
this.set("module.strictThisContextOnImports", false);
|
this.set("module.strictThisContextOnImports", false);
|
||||||
this.set("module.unsafeCache", "make", options => !!options.cache);
|
this.set("module.unsafeCache", "make", options => !!options.cache);
|
||||||
this.set("module.rules", []);
|
this.set("module.rules", []);
|
||||||
this.set("module.defaultRules", [{
|
this.set("module.defaultRules", "make", options => [{
|
||||||
type: "javascript/auto",
|
type: "javascript/auto",
|
||||||
resolve: {}
|
resolve: {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.mjs$/i,
|
test: /\.mjs$/i,
|
||||||
type: "javascript/esm"
|
type: "javascript/esm",
|
||||||
|
resolve: {
|
||||||
|
mainFields: options.target === "web" || options.target === "webworker" ? ["browser", "main"] : ["main"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.json$/i,
|
test: /\.json$/i,
|
||||||
|
@ -122,7 +125,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
|
||||||
this.set("output.crossOriginLoading", false);
|
this.set("output.crossOriginLoading", false);
|
||||||
this.set("output.jsonpScriptType", false);
|
this.set("output.jsonpScriptType", false);
|
||||||
this.set("output.chunkLoadTimeout", 120000);
|
this.set("output.chunkLoadTimeout", 120000);
|
||||||
this.set("output.hashFunction", "md5");
|
this.set("output.hashFunction", "md4");
|
||||||
this.set("output.hashDigest", "hex");
|
this.set("output.hashDigest", "hex");
|
||||||
this.set("output.hashDigestLength", 20);
|
this.set("output.hashDigestLength", 20);
|
||||||
this.set("output.devtoolLineToLine", false);
|
this.set("output.devtoolLineToLine", false);
|
||||||
|
@ -157,7 +160,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
|
||||||
|
|
||||||
this.set("optimization.removeAvailableModules", true);
|
this.set("optimization.removeAvailableModules", true);
|
||||||
this.set("optimization.removeEmptyChunks", true);
|
this.set("optimization.removeEmptyChunks", true);
|
||||||
this.set("optimization.mergedDuplicateChunks", true);
|
this.set("optimization.mergeDuplicateChunks", true);
|
||||||
this.set("optimization.flagIncludedChunks", "make", options => isProductionLikeMode(options));
|
this.set("optimization.flagIncludedChunks", "make", options => isProductionLikeMode(options));
|
||||||
this.set("optimization.occurrenceOrder", "make", options => isProductionLikeMode(options));
|
this.set("optimization.occurrenceOrder", "make", options => isProductionLikeMode(options));
|
||||||
this.set("optimization.sideEffects", "make", options => isProductionLikeMode(options));
|
this.set("optimization.sideEffects", "make", options => isProductionLikeMode(options));
|
||||||
|
@ -181,6 +184,19 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
|
||||||
test: /[\\/]node_modules[\\/]/,
|
test: /[\\/]node_modules[\\/]/,
|
||||||
priority: -10
|
priority: -10
|
||||||
});
|
});
|
||||||
|
this.set("optimization.runtimeChunk", "call", value => {
|
||||||
|
if(value === "single") {
|
||||||
|
return {
|
||||||
|
name: "runtime"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if(value === true || value === "multiple") {
|
||||||
|
return {
|
||||||
|
name: entrypoint => `runtime~${entrypoint.name}`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
});
|
||||||
this.set("optimization.noEmitOnErrors", "make", options => isProductionLikeMode(options));
|
this.set("optimization.noEmitOnErrors", "make", options => isProductionLikeMode(options));
|
||||||
this.set("optimization.namedModules", "make", options => options.mode === "development");
|
this.set("optimization.namedModules", "make", options => options.mode === "development");
|
||||||
this.set("optimization.namedChunks", "make", options => options.mode === "development");
|
this.set("optimization.namedChunks", "make", options => options.mode === "development");
|
||||||
|
@ -197,7 +213,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
|
||||||
}).apply(compiler);
|
}).apply(compiler);
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
this.set("optimization.nodeEnv", "make", options => options.mode);
|
this.set("optimization.nodeEnv", "make", options => options.mode || "production");
|
||||||
|
|
||||||
this.set("resolve", "call", value => Object.assign({}, value));
|
this.set("resolve", "call", value => Object.assign({}, value));
|
||||||
this.set("resolve.unsafeCache", true);
|
this.set("resolve.unsafeCache", true);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const Trace = require("chrome-trace-event").Tracer;
|
const Trace = require("chrome-trace-event").Tracer;
|
||||||
|
const validateOptions = require("schema-utils");
|
||||||
|
const schema = require("../../schemas/plugins/debug/ProfilingPlugin.json");
|
||||||
let inspector = undefined;
|
let inspector = undefined;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -8,17 +10,6 @@ try {
|
||||||
console.log("Unable to CPU profile in < node 8.0");
|
console.log("Unable to CPU profile in < node 8.0");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Add this to webpack.js.org docs for this plugin, and for profiling build times
|
|
||||||
/**
|
|
||||||
* How this plugin works: (placeholder until in docs)
|
|
||||||
*
|
|
||||||
* In chrome, open the `Profile Tab`, when you run webpack,
|
|
||||||
* this plugin will output an events.json file that you
|
|
||||||
* can drag and drop into the profiler. It will then display timeline stats and calls per plugin!
|
|
||||||
*
|
|
||||||
* Example: https://chromedevtools.github.io/timeline-viewer/?url=https%3A%2F%2Fgist.githubusercontent.com%2FTheLarkInn%2Fb94b728fa5e22f62c312e110a9944768%2Fraw%2Fcb672fb3f661a17576803e41db6030382b1a0fc9%2Fevents.json&loadTimelineFromURL=drive://163GY-H0wvF9rSrlwjJcrdTL-YLnppp55
|
|
||||||
*/
|
|
||||||
|
|
||||||
class Profiler {
|
class Profiler {
|
||||||
constructor(inspector) {
|
constructor(inspector) {
|
||||||
this.session = undefined;
|
this.session = undefined;
|
||||||
|
@ -81,10 +72,10 @@ class Profiler {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} outPath The location where to write the log.
|
* @param {string} outputPath The location where to write the log.
|
||||||
* @returns {{trace: ?, counter: number, profiler: Profiler}} The trace object
|
* @returns {{trace: ?, counter: number, profiler: Profiler}} The trace object
|
||||||
*/
|
*/
|
||||||
function createTrace(outPath) {
|
function createTrace(outputPath) {
|
||||||
const trace = new Trace({
|
const trace = new Trace({
|
||||||
noStream: true
|
noStream: true
|
||||||
});
|
});
|
||||||
|
@ -92,7 +83,7 @@ function createTrace(outPath) {
|
||||||
|
|
||||||
let counter = 0;
|
let counter = 0;
|
||||||
|
|
||||||
trace.pipe(fs.createWriteStream(outPath));
|
trace.pipe(fs.createWriteStream(outputPath));
|
||||||
// These are critical events that need to be inserted so that tools like
|
// These are critical events that need to be inserted so that tools like
|
||||||
// chrome dev tools can load the profile.
|
// chrome dev tools can load the profile.
|
||||||
trace.instantEvent({
|
trace.instantEvent({
|
||||||
|
@ -130,15 +121,17 @@ function createTrace(outPath) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const pluginName = "ProfilingPlugin";
|
||||||
|
|
||||||
class ProfilingPlugin {
|
class ProfilingPlugin {
|
||||||
// TODO: Add plugin schema validation here since there are options.
|
|
||||||
constructor(opts) {
|
constructor(opts) {
|
||||||
|
validateOptions(schema, opts || {}, "Profiling plugin");
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
this.outPath = opts.outPath || "events.json";
|
this.outputPath = opts.outputPath || "events.json";
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(compiler) {
|
apply(compiler) {
|
||||||
const tracer = createTrace(this.outPath);
|
const tracer = createTrace(this.outputPath);
|
||||||
tracer.profiler.startProfiling();
|
tracer.profiler.startProfiling();
|
||||||
|
|
||||||
// Compiler Hooks
|
// Compiler Hooks
|
||||||
|
@ -150,7 +143,7 @@ class ProfilingPlugin {
|
||||||
compiler.resolverFactory.hooks[hookName].intercept(makeInterceptorFor("Resolver", tracer)(hookName));
|
compiler.resolverFactory.hooks[hookName].intercept(makeInterceptorFor("Resolver", tracer)(hookName));
|
||||||
});
|
});
|
||||||
|
|
||||||
compiler.hooks.compilation.tap("ProfilingPlugin", (compilation, {
|
compiler.hooks.compilation.tap(pluginName, (compilation, {
|
||||||
normalModuleFactory,
|
normalModuleFactory,
|
||||||
contextModuleFactory
|
contextModuleFactory
|
||||||
}) => {
|
}) => {
|
||||||
|
@ -163,7 +156,7 @@ class ProfilingPlugin {
|
||||||
|
|
||||||
// We need to write out the CPU profile when we are all done.
|
// We need to write out the CPU profile when we are all done.
|
||||||
compiler.hooks.done.tap({
|
compiler.hooks.done.tap({
|
||||||
name: "ProfilingPlugin",
|
name: pluginName,
|
||||||
stage: Infinity
|
stage: Infinity
|
||||||
}, () => {
|
}, () => {
|
||||||
tracer.profiler.stopProfiling().then((parsedResults) => {
|
tracer.profiler.stopProfiling().then((parsedResults) => {
|
||||||
|
@ -264,9 +257,11 @@ const interceptTemplateInstancesFrom = (compilation, tracer) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const interceptAllHooksFor = (instance, tracer, logLabel) => {
|
const interceptAllHooksFor = (instance, tracer, logLabel) => {
|
||||||
Object.keys(instance.hooks).forEach(hookName => {
|
if(Reflect.has(instance, "hooks")) {
|
||||||
instance.hooks[hookName].intercept(makeInterceptorFor(logLabel, tracer)(hookName));
|
Object.keys(instance.hooks).forEach(hookName => {
|
||||||
});
|
instance.hooks[hookName].intercept(makeInterceptorFor(logLabel, tracer)(hookName));
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const interceptAllParserHooks = (moduleFactory, tracer) => {
|
const interceptAllParserHooks = (moduleFactory, tracer) => {
|
||||||
|
@ -356,6 +351,12 @@ const makeNewProfiledTapFn = (hookName, tracer, {
|
||||||
case "sync":
|
case "sync":
|
||||||
return(...args) => { // eslint-disable-line
|
return(...args) => { // eslint-disable-line
|
||||||
const id = ++tracer.counter;
|
const id = ++tracer.counter;
|
||||||
|
// Do not instrument outself due to the CPU
|
||||||
|
// profile needing to be the last event in the trace.
|
||||||
|
if(name === pluginName) {
|
||||||
|
return fn(...args);
|
||||||
|
}
|
||||||
|
|
||||||
tracer.trace.begin({
|
tracer.trace.begin({
|
||||||
name,
|
name,
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -104,6 +104,7 @@ HarmonyImportSpecifierDependency.Template = class HarmonyImportSpecifierDependen
|
||||||
getContent(dep, runtime) {
|
getContent(dep, runtime) {
|
||||||
const exportExpr = runtime.exportFromImport({
|
const exportExpr = runtime.exportFromImport({
|
||||||
module: dep.module,
|
module: dep.module,
|
||||||
|
request: dep.request,
|
||||||
exportName: dep.id,
|
exportName: dep.id,
|
||||||
originModule: dep.originModule,
|
originModule: dep.originModule,
|
||||||
asiSafe: dep.shorthand,
|
asiSafe: dep.shorthand,
|
||||||
|
|
|
@ -6,9 +6,11 @@
|
||||||
|
|
||||||
const ExternalsPlugin = require("../ExternalsPlugin");
|
const ExternalsPlugin = require("../ExternalsPlugin");
|
||||||
|
|
||||||
|
const builtins = require("module").builtinModules || Object.keys(process.binding("natives"));
|
||||||
|
|
||||||
class NodeTargetPlugin {
|
class NodeTargetPlugin {
|
||||||
apply(compiler) {
|
apply(compiler) {
|
||||||
new ExternalsPlugin("commonjs", Object.keys(process.binding("natives"))).apply(compiler);
|
new ExternalsPlugin("commonjs", builtins).apply(compiler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue