Repository: webpack/webpack
Pull request #6384 (2018-01-25 18:08:05)

Add "single" option to RuntimeChunkPlugin
**What kind of change does this PR introduce?**

Add config option `optimization.runtimeChunk: 'single'` to generate a single runtime chunk for all entrypoints instead of each entrypoint getting their own runtime.

**Did you add tests for your changes?**

Basic tests for the existence of runtime files, nothing that tests that the contents of the runtime file are generated correctly.

**If relevant, link to documentation update:**

<!-- Link PR from webpack/webpack.js.org here, or N/A -->

**Summary**

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
My company's webpack setup involves including multiple entrypoint files on a page, so adding a separate runtime chunk for each entrypoint results in too many parallel loading chunks.

See @sokra's comment in the alpha.5 issue: https://github.com/webpack/webpack/issues/6357#issuecomment-360435877

**Does this PR introduce a breaking change?**

No, just a new option in the config and the RuntimeChunkPlugin.

**Other information**

Let me know if you approve of the way I am handling passing in the option. Once I get a 👍 I'll update docs and add tests. I mostly wanted to make sure you won't want to allow a custom name for the runtime chunk.

jsf-clabot: [![CLA assistant check](https://cla.js.foundation/pull/badge/not_signed)](https://cla.js.foundation/webpack/webpack?pullRequest=6384) <br/>Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla.js.foundation/webpack/webpack?pullRequest=6384) before we can accept your contribution.<br/>
webpack-bot: <!-- identifier: ci-result -->

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

Patch:
diff --git a/lib/Compiler.js b/lib/Compiler.js
index bc54f681b..f205cfb30 100644
--- a/lib/Compiler.js
+++ b/lib/Compiler.js
@@ -28,7 +28,7 @@ class Compiler extends Tapable {
 		super();
 		this.hooks = {
 			shouldEmit: new SyncBailHook(["compilation"]),
-			done: new AsyncSeriesHook(["stats"]),
+			done: new SyncHook(["stats"]),
 			additionalPass: new AsyncSeriesHook([]),
 			beforeRun: new AsyncSeriesHook(["compilation"]),
 			run: new AsyncSeriesHook(["compilation"]),
@@ -171,11 +171,8 @@ class Compiler extends Tapable {
 				const stats = new Stats(compilation);
 				stats.startTime = startTime;
 				stats.endTime = Date.now();
-				this.hooks.done.callAsync(stats, err => {
-					if(err) return callback(err);
-					return callback(null, stats);
-				});
-				return;
+				this.hooks.done.call(stats);
+				return callback(null, stats);
 			}
 
 			this.emitAssets(compilation, err => {
@@ -187,13 +184,11 @@ class Compiler extends Tapable {
 					const stats = new Stats(compilation);
 					stats.startTime = startTime;
 					stats.endTime = Date.now();
-					this.hooks.done.callAsync(stats, err => {
-						if(err) return callback(err);
+					this.hooks.done.call(stats);
 
-						this.hooks.additionalPass.callAsync(err => {
-							if(err) return callback(err);
-							this.compile(onCompiled);
-						});
+					this.hooks.additionalPass.callAsync(err => {
+						if(err) return callback(err);
+						this.compile(onCompiled);
 					});
 					return;
 				}
@@ -204,10 +199,8 @@ class Compiler extends Tapable {
 					const stats = new Stats(compilation);
 					stats.startTime = startTime;
 					stats.endTime = Date.now();
-					this.hooks.done.callAsync(stats, err => {
-						if(err) return callback(err);
-						return callback(null, stats);
-					});
+					this.hooks.done.call(stats);
+					return callback(null, stats);
 				});
 			});
 		};
diff --git a/lib/ConstPlugin.js b/lib/ConstPlugin.js
index 05df375a1..f285bf1fb 100644
--- a/lib/ConstPlugin.js
+++ b/lib/ConstPlugin.js
@@ -9,7 +9,7 @@ const ParserHelpers = require("./ParserHelpers");
 
 const getQuery = (request) => {
 	const i = request.indexOf("?");
-	return i !== -1 ? request.substr(i) : "";
+	return request.includes("?") ? request.substr(i) : "";
 };
 
 const collectDeclaration = (declarations, pattern) => {
diff --git a/lib/ContextModule.js b/lib/ContextModule.js
index eb68215b6..22eefbaa6 100644
--- a/lib/ContextModule.js
+++ b/lib/ContextModule.js
@@ -17,8 +17,11 @@ class ContextModule extends Module {
 	// resolveDependencies: (fs: FS, options: ContextOptions, (err: Error?, dependencies: Dependency[]) => void) => void
 	// options: ContextOptions
 	constructor(resolveDependencies, options) {
-		let resource;
-		let resourceQuery;
+		super("javascript/dynamic");
+
+		// Info from Factory
+		this.resolveDependencies = resolveDependencies;
+		let resource, resourceQuery;
 		const queryIdx = options.resource.indexOf("?");
 		if(queryIdx >= 0) {
 			resource = options.resource.substr(0, queryIdx);
@@ -27,15 +30,11 @@ class ContextModule extends Module {
 			resource = options.resource;
 			resourceQuery = "";
 		}
-
-		super("javascript/dynamic", resource);
-
-		// Info from Factory
-		this.resolveDependencies = resolveDependencies;
 		this.options = Object.assign({}, options, {
 			resource: resource,
 			resourceQuery: resourceQuery
 		});
+		this.context = this.options.resource;
 		if(options.resolveOptions !== undefined)
 			this.resolveOptions = options.resolveOptions;
 
diff --git a/lib/DelegatedModule.js b/lib/DelegatedModule.js
index 0ba3bf6fd..b336d0038 100644
--- a/lib/DelegatedModule.js
+++ b/lib/DelegatedModule.js
@@ -13,7 +13,7 @@ const DelegatedExportsDependency = require("./dependencies/DelegatedExportsDepen
 
 class DelegatedModule extends Module {
 	constructor(sourceRequest, data, type, userRequest, originalRequest) {
-		super("javascript/dynamic", null);
+		super("javascript/dynamic");
 
 		// Info from Factory
 		this.sourceRequest = sourceRequest;
diff --git a/lib/DllModule.js b/lib/DllModule.js
index be798d5da..a65ce47be 100644
--- a/lib/DllModule.js
+++ b/lib/DllModule.js
@@ -9,9 +9,10 @@ const RawSource = require("webpack-sources").RawSource;
 
 class DllModule extends Module {
 	constructor(context, dependencies, name, type) {
-		super("javascript/dynamic", context);
+		super("javascript/dynamic");
 
 		// Info from Factory
+		this.context = context;
 		this.dependencies = dependencies;
 		this.name = name;
 		this.type = type;
diff --git a/lib/ExternalModule.js b/lib/ExternalModule.js
index 048291370..0ee8076f2 100644
--- a/lib/ExternalModule.js
+++ b/lib/ExternalModule.js
@@ -11,7 +11,7 @@ const Template = require("./Template");
 
 class ExternalModule extends Module {
 	constructor(request, type, userRequest) {
-		super("javascript/dynamic", null);
+		super("javascript/dynamic");
 
 		// Info from Factory
 		this.request = request;
diff --git a/lib/Module.js b/lib/Module.js
index f4d82bf82..affc3f977 100644
--- a/lib/Module.js
+++ b/lib/Module.js
@@ -25,10 +25,9 @@ const sortByDebugId = (a, b) => {
 
 class Module extends DependenciesBlock {
 
-	constructor(type, context = null) {
+	constructor(type) {
 		super();
 		this.type = type;
-		this.context = context;
 
 		// Unique Id
 		this.debugId = debugId++;
@@ -38,6 +37,8 @@ class Module extends DependenciesBlock {
 		this.renderedHash = undefined;
 
 		// Info from Factory
+		// TODO refactor: pass as constructor argument
+		this.context = null;
 		this.resolveOptions = EMPTY_RESOLVE_OPTIONS;
 		this.factoryMeta = {};
 
diff --git a/lib/MultiModule.js b/lib/MultiModule.js
index 1c983fe88..dfd25d468 100644
--- a/lib/MultiModule.js
+++ b/lib/MultiModule.js
@@ -11,9 +11,10 @@ const RawSource = require("webpack-sources").RawSource;
 class MultiModule extends Module {
 
 	constructor(context, dependencies, name) {
-		super("javascript/dynamic", context);
+		super("javascript/dynamic");
 
 		// Info from Factory
+		this.context = context;
 		this.dependencies = dependencies;
 		this.name = name;
 	}
diff --git a/lib/NormalModule.js b/lib/NormalModule.js
index 32c8acee0..5f956c958 100644
--- a/lib/NormalModule.js
+++ b/lib/NormalModule.js
@@ -75,7 +75,7 @@ class NormalModule extends Module {
 		generator,
 		resolveOptions
 	}) {
-		super(type, getContext(resource));
+		super(type);
 
 		// Info from Factory
 		this.request = request;
@@ -85,6 +85,7 @@ class NormalModule extends Module {
 		this.parser = parser;
 		this.generator = generator;
 		this.resource = resource;
+		this.context = getContext(resource);
 		this.loaders = loaders;
 		if(resolveOptions !== undefined)
 			this.resolveOptions = resolveOptions;
diff --git a/lib/RawModule.js b/lib/RawModule.js
index a7ea6db6e..f650e28e2 100644
--- a/lib/RawModule.js
+++ b/lib/RawModule.js
@@ -11,7 +11,7 @@ const RawSource = require("webpack-sources").RawSource;
 module.exports = class RawModule extends Module {
 
 	constructor(source, identifier, readableIdentifier) {
-		super("javascript/dynamic", null);
+		super("javascript/dynamic");
 		this.sourceStr = source;
 		this.identifierStr = identifier || this.sourceStr;
 		this.readableIdentifierStr = readableIdentifier || this.identifierStr;
diff --git a/lib/Stats.js b/lib/Stats.js
index 90aa33058..0556b19e5 100644
--- a/lib/Stats.js
+++ b/lib/Stats.js
@@ -105,7 +105,6 @@ class Stats {
 		const showEnv = optionOrLocalFallback(options.env, false);
 		const showVersion = optionOrLocalFallback(options.version, true);
 		const showTimings = optionOrLocalFallback(options.timings, true);
-		const showBuiltAt = optionOrLocalFallback(options.builtAt, true);
 		const showAssets = optionOrLocalFallback(options.assets, true);
 		const showEntrypoints = optionOrLocalFallback(options.entrypoints, true);
 		const showChunks = optionOrLocalFallback(options.chunks, !forToString);
@@ -134,7 +133,6 @@ class Stats {
 		const sortModules = optionsOrFallback(options.modulesSort, "id");
 		const sortChunks = optionsOrFallback(options.chunksSort, "id");
 		const sortAssets = optionsOrFallback(options.assetsSort, "");
-		const showOutputPath = optionOrLocalFallback(options.outputPath, !forToString);
 
 		if(!showCachedModules) {
 			excludeModules.push((ident, module) => !module.built);
@@ -256,10 +254,6 @@ class Stats {
 			obj.time = this.endTime - this.startTime;
 		}
 
-		if(showBuiltAt && this.endTime) {
-			obj.builtAt = this.endTime;
-		}
-
 		if(showEnv && options._env) {
 			obj.env = options._env;
 		}
@@ -272,9 +266,6 @@ class Stats {
 				hash: this.compilation.hash
 			});
 		}
-		if(showOutputPath) {
-			obj.outputPath = this.compilation.mainTemplate.outputOptions.path;
-		}
 		if(showAssets) {
 			const assetsByFile = {};
 			const compilationAssets = Object.keys(compilation.assets);
@@ -625,14 +616,6 @@ class Stats {
 			colors.normal("ms");
 			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) {
 			colors.normal("Environment (--env): ");
 			colors.bold(JSON.stringify(obj.env, null, 2));
diff --git a/lib/Watching.js b/lib/Watching.js
index 38ca67fbf..28268c445 100644
--- a/lib/Watching.js
+++ b/lib/Watching.js
@@ -59,13 +59,11 @@ class Watching {
 							const stats = new Stats(compilation);
 							stats.startTime = this.startTime;
 							stats.endTime = Date.now();
-							this.compiler.hooks.done.callAsync(stats, err => {
-								if(err) return this._done(err);
+							this.compiler.hooks.done.call(stats);
 
-								this.compiler.hooks.additionalPass.callAsync(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;
 						}
@@ -95,14 +93,13 @@ class Watching {
 			return;
 		}
 
-		this.compiler.hooks.done.callAsync(stats, () => {
-			this.handler(null, stats);
-			if(!this.closed) {
-				this.watch(Array.from(compilation.fileDependencies), Array.from(compilation.contextDependencies), Array.from(compilation.missingDependencies));
-			}
-			for(const cb of this.callbacks) cb();
-			this.callbacks.length = 0;
-		});
+		this.compiler.hooks.done.call(stats);
+		this.handler(null, stats);
+		if(!this.closed) {
+			this.watch(Array.from(compilation.fileDependencies), Array.from(compilation.contextDependencies), Array.from(compilation.missingDependencies));
+		}
+		for(const cb of this.callbacks) cb();
+		this.callbacks.length = 0;
 	}
 
 	watch(files, dirs, missing) {
diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js
index 617911ebd..a24a91ac9 100644
--- a/lib/WebpackOptionsApply.js
+++ b/lib/WebpackOptionsApply.js
@@ -291,7 +291,7 @@ class WebpackOptionsApply extends OptionsApply {
 		if(options.optimization.splitChunks)
 			new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler);
 		if(options.optimization.runtimeChunk)
-			new RuntimeChunkPlugin().apply(compiler);
+			new RuntimeChunkPlugin(options.optimization.runtimeChunk).apply(compiler);
 		if(options.optimization.noEmitOnErrors)
 			new NoEmitOnErrorsPlugin().apply(compiler);
 		if(options.optimization.namedModules)
diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js
index 431631189..d2c041216 100644
--- a/lib/WebpackOptionsDefaulter.js
+++ b/lib/WebpackOptionsDefaulter.js
@@ -181,6 +181,19 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
 			test: /[\\/]node_modules[\\/]/,
 			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.namedModules", "make", options => options.mode === "development");
 		this.set("optimization.namedChunks", "make", options => options.mode === "development");
diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js
index 3b3aeffeb..375814f70 100644
--- a/lib/debug/ProfilingPlugin.js
+++ b/lib/debug/ProfilingPlugin.js
@@ -130,8 +130,6 @@ function createTrace(outPath) {
 	};
 }
 
-const pluginName = "ProfilingPlugin";
-
 class ProfilingPlugin {
 	// TODO: Add plugin schema validation here since there are options.
 	constructor(opts) {
@@ -152,7 +150,7 @@ class ProfilingPlugin {
 			compiler.resolverFactory.hooks[hookName].intercept(makeInterceptorFor("Resolver", tracer)(hookName));
 		});
 
-		compiler.hooks.compilation.tap(pluginName, (compilation, {
+		compiler.hooks.compilation.tap("ProfilingPlugin", (compilation, {
 			normalModuleFactory,
 			contextModuleFactory
 		}) => {
@@ -165,7 +163,7 @@ class ProfilingPlugin {
 
 		// We need to write out the CPU profile when we are all done.
 		compiler.hooks.done.tap({
-			name: pluginName,
+			name: "ProfilingPlugin",
 			stage: Infinity
 		}, () => {
 			tracer.profiler.stopProfiling().then((parsedResults) => {
@@ -266,11 +264,9 @@ const interceptTemplateInstancesFrom = (compilation, tracer) => {
 };
 
 const interceptAllHooksFor = (instance, tracer, logLabel) => {
-	if(Reflect.has(instance, "hooks")) {
-		Object.keys(instance.hooks).forEach(hookName => {
-			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) => {
@@ -360,12 +356,6 @@ const makeNewProfiledTapFn = (hookName, tracer, {
 		case "sync":
 			return(...args) => { // eslint-disable-line
 				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({
 					name,
 					id,
diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js
index eed84d2c8..d497e6c71 100644
--- a/lib/optimize/ConcatenatedModule.js
+++ b/lib/optimize/ConcatenatedModule.js
@@ -194,7 +194,7 @@ const getPathInAst = (ast, node) => {
 
 class ConcatenatedModule extends Module {
 	constructor(rootModule, modules) {
-		super("javascript/esm", null);
+		super("javascript/esm");
 		super.setChunks(rootModule._chunks);
 
 		// Info from Factory
diff --git a/lib/optimize/RuntimeChunkPlugin.js b/lib/optimize/RuntimeChunkPlugin.js
index a004d07fb..0aa1cd07f 100644
--- a/lib/optimize/RuntimeChunkPlugin.js
+++ b/lib/optimize/RuntimeChunkPlugin.js
@@ -5,7 +5,11 @@
 "use strict";
 
 module.exports = class RuntimeChunkPlugin {
-	constructor(options) {}
+	constructor(options) {
+		this.options = Object.assign({
+			name: entrypoint => `runtime~${entrypoint.name}`
+		}, options);
+	}
 
 	apply(compiler) {
 		compiler.hooks.thisCompilation.tap("RuntimeChunkPlugin", compilation => {
@@ -13,7 +17,11 @@ module.exports = class RuntimeChunkPlugin {
 				for(const entrypoint of compilation.entrypoints.values()) {
 					const chunk = entrypoint.getRuntimeChunk();
 					if(chunk.getNumberOfModules() > 0) {
-						const newChunk = compilation.addChunk(entrypoint.name + "-runtime");
+						let name = this.options.name;
+						if(typeof name === "function") {
+							name = name(entrypoint);
+						}
+						const newChunk = compilation.addChunk(name);
 						entrypoint.unshiftChunk(newChunk);
 						newChunk.addGroup(entrypoint);
 						entrypoint.setRuntimeChunk(newChunk);
diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json
index 7340daaac..6975483dc 100644
--- a/schemas/WebpackOptions.json
+++ b/schemas/WebpackOptions.json
@@ -1484,7 +1484,34 @@
         },
         "runtimeChunk": {
           "description": "Create an additional chunk which contains only the webpack runtime and chunk hash maps",
-          "type": "boolean"
+          "oneOf": [
+            {
+              "type": "boolean"
+            },
+            {
+              "enum": [
+                "single",
+                "multiple"
+              ]
+            },
+            {
+              "type": "object",
+              "additionalProperties": false,
+              "properties": {
+                "name": {
+                  "description": "The name or name factory for the runtime chunks",
+                  "oneOf": [
+                    {
+                      "type": "string"
+                    },
+                    {
+                      "instanceof": "Function"
+                    }
+                  ]
+                }
+              }
+            }
+          ]
         },
         "noEmitOnErrors": {
           "description": "Avoid emitting assets when errors occur",
@@ -1655,10 +1682,6 @@
               "type": "boolean",
               "description": "add timing information"
             },
-            "builtAt": {
-              "type": "boolean",
-              "description": "add built at time information"
-            },
             "performance": {
               "type": "boolean",
               "description": "add performance hint flags"
@@ -1826,10 +1849,6 @@
               "type": "boolean",
               "description": "Add public path information"
             },
-            "outputPath": {
-              "type": "boolean",
-              "description": "Add output path information"
-            },
             "providedExports": {
               "type": "boolean",
               "description": "show exports provided by modules"


Test patch:
diff --git a/test/Stats.unittest.js b/test/Stats.unittest.js
index 065ffa318..dcd9e9d19 100644
--- a/test/Stats.unittest.js
+++ b/test/Stats.unittest.js
@@ -4,7 +4,6 @@
 require("should");
 
 const Stats = require("../lib/Stats");
-const packageJson = require("../package.json");
 
 describe("Stats", () => {
 	describe("Error Handling", () => {
@@ -95,9 +94,6 @@ describe("Stats", () => {
 				children: [],
 				hash: "1234",
 				mainTemplate: {
-					outputOptions: {
-						path: ""
-					},
 					getPublicPath: () => "path"
 				},
 				compiler: {
@@ -108,46 +104,6 @@ describe("Stats", () => {
 			obj.errors[0].should.be.equal("firstError");
 		});
 	});
-	describe("toJson", () => {
-		it("returns plain object representation", () => {
-			const mockStats = new Stats({
-				errors: [],
-				warnings: [],
-				assets: [],
-				entrypoints: new Map(),
-				chunks: [],
-				modules: [],
-				children: [],
-				hash: "1234",
-				mainTemplate: {
-					outputOptions: {
-						path: "/"
-					},
-					getPublicPath: () => "path"
-				},
-				compiler: {
-					context: ""
-				}
-			});
-			const result = mockStats.toJson();
-			result.should.deepEqual({
-				assets: [],
-				assetsByChunkName: {},
-				children: [],
-				chunks: [],
-				entrypoints: {},
-				filteredAssets: 0,
-				filteredModules: 0,
-				errors: [],
-				hash: "1234",
-				modules: [],
-				outputPath: "/",
-				publicPath: "path",
-				version: packageJson.version,
-				warnings: []
-			});
-		});
-	});
 	describe("Presets", () => {
 		describe("presetToOptions", () => {
 			it("returns correct object with 'Normal'", () => {
diff --git a/test/StatsTestCases.test.js b/test/StatsTestCases.test.js
index 05da606c6..35dd4e1ca 100644
--- a/test/StatsTestCases.test.js
+++ b/test/StatsTestCases.test.js
@@ -88,16 +88,14 @@ describe("StatsTestCases", () => {
 				if(!hasColorSetting) {
 					actual = actual
 						.replace(/\u001b\[[0-9;]*m/g, "")
-						.replace(/[0-9]+(\s?ms)/g, "X$1")
-						.replace(/^(\s*Built at:) (.*)$/gm, "$1 Thu Jan 01 1970 00:00:00 GMT");
+						.replace(/[0-9]+(\s?ms)/g, "X$1");
 				} else {
 					actual = actual
 						.replace(/\u001b\[1m\u001b\[([0-9;]*)m/g, "<CLR=$1,BOLD>")
 						.replace(/\u001b\[1m/g, "<CLR=BOLD>")
 						.replace(/\u001b\[39m\u001b\[22m/g, "</CLR>")
 						.replace(/\u001b\[([0-9;]*)m/g, "<CLR=$1>")
-						.replace(/[0-9]+(<\/CLR>)?(\s?ms)/g, "X$1$2")
-						.replace(/^(\s*Built at:) (.*)$/gm, "$1 Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT");
+						.replace(/[0-9]+(<\/CLR>)?(\s?ms)/g, "X$1$2");
 				}
 
 				actual = actual
diff --git a/test/configCases/plugins/profiling-plugin/index.js b/test/configCases/plugins/profiling-plugin/index.js
index bd111552c..a3e4de9bd 100644
--- a/test/configCases/plugins/profiling-plugin/index.js
+++ b/test/configCases/plugins/profiling-plugin/index.js
@@ -1,5 +1,3 @@
-import "./test.json";
-
 it("should generate a events.json file", () => {
     var fs = require("fs"),
         path = require("path"),
@@ -15,4 +13,4 @@ it("should have proper setup record inside of the json stream", () => {
     // convert json stream to valid
     var source = JSON.parse(fs.readFileSync(path.join(os.tmpdir(), "events.json"), "utf-8").toString() + "{}]");
     source[0].id.should.eql(1);
-});
+});
\ No newline at end of file
diff --git a/test/configCases/plugins/profiling-plugin/test.json b/test/configCases/plugins/profiling-plugin/test.json
deleted file mode 100644
index c7580e22a..000000000
--- a/test/configCases/plugins/profiling-plugin/test.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "json": "should work"
-}
diff --git a/test/statsCases/aggressive-splitting-entry/expected.txt b/test/statsCases/aggressive-splitting-entry/expected.txt
index f11f0b979..94e20c07d 100644
--- a/test/statsCases/aggressive-splitting-entry/expected.txt
+++ b/test/statsCases/aggressive-splitting-entry/expected.txt
@@ -2,7 +2,6 @@ Hash: 1d3bfcee111df03fa6251d3bfcee111df03fa625
 Child fitting:
     Hash: 1d3bfcee111df03fa625
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
                       Asset      Size  Chunks             Chunk Names
     706f97eb6a2b8fb1a17e.js  1.05 KiB       0  [emitted]  
     a65f8652fd07c12d0049.js  9.92 KiB       1  [emitted]  
@@ -28,7 +27,6 @@ Child fitting:
 Child content-change:
     Hash: 1d3bfcee111df03fa625
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
                       Asset      Size  Chunks             Chunk Names
     706f97eb6a2b8fb1a17e.js  1.05 KiB       0  [emitted]  
     a65f8652fd07c12d0049.js  9.92 KiB       1  [emitted]  
diff --git a/test/statsCases/aggressive-splitting-on-demand/expected.txt b/test/statsCases/aggressive-splitting-on-demand/expected.txt
index 303da3802..abe1b68d3 100644
--- a/test/statsCases/aggressive-splitting-on-demand/expected.txt
+++ b/test/statsCases/aggressive-splitting-on-demand/expected.txt
@@ -1,6 +1,5 @@
 Hash: af168fd06ab994207f62
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
                   Asset      Size  Chunks             Chunk Names
 031881c6ced2f576ff79.js  1.94 KiB       5  [emitted]  
 ba1a8dd27d611254d495.js  1.93 KiB       0  [emitted]  
diff --git a/test/statsCases/async-commons-chunk-auto/webpack.config.js b/test/statsCases/async-commons-chunk-auto/webpack.config.js
index 11bed473a..1bcd43b45 100644
--- a/test/statsCases/async-commons-chunk-auto/webpack.config.js
+++ b/test/statsCases/async-commons-chunk-auto/webpack.config.js
@@ -2,7 +2,6 @@ const path = require("path");
 const stats = {
 	hash: false,
 	timings: false,
-	builtAt: false,
 	assets: false,
 	chunks: true,
 	chunkOrigins: true,
diff --git a/test/statsCases/async-commons-chunk/webpack.config.js b/test/statsCases/async-commons-chunk/webpack.config.js
index a1ffaa9d9..0267bba92 100644
--- a/test/statsCases/async-commons-chunk/webpack.config.js
+++ b/test/statsCases/async-commons-chunk/webpack.config.js
@@ -9,7 +9,6 @@ module.exports = {
 	stats: {
 		hash: false,
 		timings: false,
-		builtAt: false,
 		assets: false,
 		chunks: true,
 		chunkOrigins: true,
diff --git a/test/statsCases/chunks-development/expected.txt b/test/statsCases/chunks-development/expected.txt
index 1ecbd13bb..2513298b5 100644
--- a/test/statsCases/chunks-development/expected.txt
+++ b/test/statsCases/chunks-development/expected.txt
@@ -1,6 +1,5 @@
 Hash: 5ce1f032cffdff8368b5
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
       Asset       Size  Chunks             Chunk Names
 0.bundle.js  530 bytes       0  [emitted]  
 1.bundle.js  394 bytes       1  [emitted]  
diff --git a/test/statsCases/chunks/expected.txt b/test/statsCases/chunks/expected.txt
index 0f438ee56..d84662f29 100644
--- a/test/statsCases/chunks/expected.txt
+++ b/test/statsCases/chunks/expected.txt
@@ -1,6 +1,5 @@
 Hash: 7870601bc1a1a4f9c4c1
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
       Asset       Size  Chunks             Chunk Names
 0.bundle.js  152 bytes       0  [emitted]  
 1.bundle.js  289 bytes       1  [emitted]  
diff --git a/test/statsCases/circular-correctness/webpack.config.js b/test/statsCases/circular-correctness/webpack.config.js
index 8be75aa1e..ffb3a6458 100644
--- a/test/statsCases/circular-correctness/webpack.config.js
+++ b/test/statsCases/circular-correctness/webpack.config.js
@@ -7,7 +7,6 @@ module.exports = {
 	stats: {
 		hash: false,
 		timings: false,
-		builtAt: false,
 		assets: false,
 		chunks: true,
 		chunkModules: true,
diff --git a/test/statsCases/color-disabled/expected.txt b/test/statsCases/color-disabled/expected.txt
index 2351c1b6e..caeb85c5c 100644
--- a/test/statsCases/color-disabled/expected.txt
+++ b/test/statsCases/color-disabled/expected.txt
@@ -1,6 +1,5 @@
 Hash: 5ebdffcace96139575ac
 Time: Xms
-Built at: Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT
   Asset      Size  Chunks             Chunk Names
 main.js  2.61 KiB       0  [emitted]  main
 Entrypoint main = main.js
diff --git a/test/statsCases/color-enabled-custom/expected.txt b/test/statsCases/color-enabled-custom/expected.txt
index 0f8ac7758..51a7a2e6c 100644
--- a/test/statsCases/color-enabled-custom/expected.txt
+++ b/test/statsCases/color-enabled-custom/expected.txt
@@ -1,6 +1,5 @@
 Hash: <CLR=BOLD>5ebdffcace96139575ac</CLR>
 Time: <CLR=BOLD>X</CLR>ms
-Built at: Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT
   <CLR=BOLD>Asset</CLR>      <CLR=BOLD>Size</CLR>  <CLR=BOLD>Chunks</CLR>  <CLR=39,BOLD><CLR=22>           <CLR=39,BOLD><CLR=22><CLR=BOLD>Chunk Names</CLR>
 <CLR=32>main.js</CLR>  2.61 KiB       <CLR=BOLD>0</CLR>  <CLR=32>[emitted]</CLR>  main
 Entrypoint <CLR=BOLD>main</CLR> = <CLR=32>main.js</CLR>
diff --git a/test/statsCases/color-enabled/expected.txt b/test/statsCases/color-enabled/expected.txt
index cff1a8a5f..483a4ca98 100644
--- a/test/statsCases/color-enabled/expected.txt
+++ b/test/statsCases/color-enabled/expected.txt
@@ -1,6 +1,5 @@
 Hash: <CLR=BOLD>5ebdffcace96139575ac</CLR>
 Time: <CLR=BOLD>X</CLR>ms
-Built at: Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT
   <CLR=BOLD>Asset</CLR>      <CLR=BOLD>Size</CLR>  <CLR=BOLD>Chunks</CLR>  <CLR=39,BOLD><CLR=22>           <CLR=39,BOLD><CLR=22><CLR=BOLD>Chunk Names</CLR>
 <CLR=32,BOLD>main.js</CLR>  2.61 KiB       <CLR=BOLD>0</CLR>  <CLR=32,BOLD>[emitted]</CLR>  main
 Entrypoint <CLR=BOLD>main</CLR> = <CLR=32,BOLD>main.js</CLR>
diff --git a/test/statsCases/commons-chunk-min-size-0/expected.txt b/test/statsCases/commons-chunk-min-size-0/expected.txt
index a75756eaa..4fb49f232 100644
--- a/test/statsCases/commons-chunk-min-size-0/expected.txt
+++ b/test/statsCases/commons-chunk-min-size-0/expected.txt
@@ -1,6 +1,5 @@
 Hash: 2a374ac6d98475951384
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
               Asset       Size  Chunks             Chunk Names
          entry-1.js   5.49 KiB       0  [emitted]  entry-1
 vendor-1~entry-1.js  314 bytes       1  [emitted]  vendor-1~entry-1
diff --git a/test/statsCases/commons-chunk-min-size-Infinity/expected.txt b/test/statsCases/commons-chunk-min-size-Infinity/expected.txt
index 01d57b0e0..4126cd96f 100644
--- a/test/statsCases/commons-chunk-min-size-Infinity/expected.txt
+++ b/test/statsCases/commons-chunk-min-size-Infinity/expected.txt
@@ -1,6 +1,5 @@
 Hash: d86d9e4d7a615c762442
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
       Asset       Size  Chunks             Chunk Names
  entry-1.js   5.49 KiB       0  [emitted]  entry-1
 vendor-1.js  314 bytes       1  [emitted]  vendor-1
diff --git a/test/statsCases/commons-plugin-issue-4980/expected.txt b/test/statsCases/commons-plugin-issue-4980/expected.txt
index 2b0c41ec4..1fc3b2498 100644
--- a/test/statsCases/commons-plugin-issue-4980/expected.txt
+++ b/test/statsCases/commons-plugin-issue-4980/expected.txt
@@ -2,7 +2,6 @@ Hash: cdd753ac70c5ff3b74bedd7e476c27a1777b4d27
 Child
     Hash: cdd753ac70c5ff3b74be
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
                              Asset       Size  Chunks             Chunk Names
                             app.js   5.58 KiB       0  [emitted]  app
     vendor.a86979cc789cd5f9d78f.js  619 bytes       1  [emitted]  vendor
@@ -15,7 +14,6 @@ Child
 Child
     Hash: dd7e476c27a1777b4d27
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
                              Asset       Size  Chunks             Chunk Names
                             app.js    5.6 KiB       0  [emitted]  app
     vendor.a86979cc789cd5f9d78f.js  619 bytes       1  [emitted]  vendor
diff --git a/test/statsCases/define-plugin/expected.txt b/test/statsCases/define-plugin/expected.txt
index 5e6ce8d03..9f37c44bb 100644
--- a/test/statsCases/define-plugin/expected.txt
+++ b/test/statsCases/define-plugin/expected.txt
@@ -2,7 +2,6 @@ Hash: 40b9288c7b06181fe56c92fc98986ee18223c384
 Child
     Hash: 40b9288c7b06181fe56c
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
       Asset      Size  Chunks             Chunk Names
     main.js  2.63 KiB       0  [emitted]  main
     Entrypoint main = main.js
@@ -10,7 +9,6 @@ Child
 Child
     Hash: 92fc98986ee18223c384
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
       Asset      Size  Chunks             Chunk Names
     main.js  2.63 KiB       0  [emitted]  main
     Entrypoint main = main.js
diff --git a/test/statsCases/exclude-with-loader/expected.txt b/test/statsCases/exclude-with-loader/expected.txt
index 6a1fa77a8..00f70c2b1 100644
--- a/test/statsCases/exclude-with-loader/expected.txt
+++ b/test/statsCases/exclude-with-loader/expected.txt
@@ -1,6 +1,5 @@
 Hash: 8ba560cc1610e1d6a812
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
     Asset      Size  Chunks             Chunk Names
 bundle.js  3.05 KiB       0  [emitted]  main
  + 1 hidden asset
diff --git a/test/statsCases/external/expected.txt b/test/statsCases/external/expected.txt
index 44e5b822d..b7538a4e2 100644
--- a/test/statsCases/external/expected.txt
+++ b/test/statsCases/external/expected.txt
@@ -1,6 +1,5 @@
 Hash: bceb26d8b2be7c67df1d
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
   Asset      Size  Chunks             Chunk Names
 main.js  2.74 KiB       0  [emitted]  main
 Entrypoint main = main.js
diff --git a/test/statsCases/filter-warnings/expected.txt b/test/statsCases/filter-warnings/expected.txt
index 8a3ccbb49..1e805e86e 100644
--- a/test/statsCases/filter-warnings/expected.txt
+++ b/test/statsCases/filter-warnings/expected.txt
@@ -2,7 +2,6 @@ Hash: 29c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c98
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
@@ -22,49 +21,42 @@ Child
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
@@ -84,7 +76,6 @@ Child
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
@@ -104,7 +95,6 @@ Child
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
@@ -124,7 +114,6 @@ Child
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
@@ -144,7 +133,6 @@ Child
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
@@ -164,7 +152,6 @@ Child
 Child
     Hash: 29c7e69ca39c982193b9
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  2.19 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
diff --git a/test/statsCases/graph-correctness-entries/webpack.config.js b/test/statsCases/graph-correctness-entries/webpack.config.js
index f6f18dc87..7b762d698 100644
--- a/test/statsCases/graph-correctness-entries/webpack.config.js
+++ b/test/statsCases/graph-correctness-entries/webpack.config.js
@@ -10,7 +10,6 @@ module.exports = {
 	stats: {
 		hash: false,
 		timings: false,
-		builtAt: false,
 		assets: false,
 		chunks: true,
 		chunkModules: true,
diff --git a/test/statsCases/graph-correctness-modules/webpack.config.js b/test/statsCases/graph-correctness-modules/webpack.config.js
index f6f18dc87..7b762d698 100644
--- a/test/statsCases/graph-correctness-modules/webpack.config.js
+++ b/test/statsCases/graph-correctness-modules/webpack.config.js
@@ -10,7 +10,6 @@ module.exports = {
 	stats: {
 		hash: false,
 		timings: false,
-		builtAt: false,
 		assets: false,
 		chunks: true,
 		chunkModules: true,
diff --git a/test/statsCases/import-context-filter/expected.txt b/test/statsCases/import-context-filter/expected.txt
index 0409ac977..2e6bc18da 100644
--- a/test/statsCases/import-context-filter/expected.txt
+++ b/test/statsCases/import-context-filter/expected.txt
@@ -1,6 +1,5 @@
 Hash: 3812be209526ddc2730f
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
    Asset       Size  Chunks             Chunk Names
     0.js  305 bytes       0  [emitted]  
     1.js  314 bytes       1  [emitted]  
diff --git a/test/statsCases/import-weak/expected.txt b/test/statsCases/import-weak/expected.txt
index 330c3a009..0f5b94f17 100644
--- a/test/statsCases/import-weak/expected.txt
+++ b/test/statsCases/import-weak/expected.txt
@@ -1,6 +1,5 @@
 Hash: a9db7f3b329c4330e089
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
    Asset       Size  Chunks             Chunk Names
     0.js  149 bytes       0  [emitted]  
 entry.js   7.63 KiB       1  [emitted]  entry
diff --git a/test/statsCases/limit-chunk-count-plugin/expected.txt b/test/statsCases/limit-chunk-count-plugin/expected.txt
index 8c4fe669f..f6fb9afc9 100644
--- a/test/statsCases/limit-chunk-count-plugin/expected.txt
+++ b/test/statsCases/limit-chunk-count-plugin/expected.txt
@@ -2,7 +2,6 @@ Hash: 1c28a2310b8d6ad1d2eae9e095881f37f449e557b0dba9af2a29d62e7d950cfed055ea39ea
 Child 1 chunks:
     Hash: 1c28a2310b8d6ad1d2ea
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
         Asset      Size  Chunks             Chunk Names
     bundle.js  5.52 KiB       0  [emitted]  main
     Entrypoint main = bundle.js
@@ -16,7 +15,6 @@ Child 1 chunks:
 Child 2 chunks:
     Hash: e9e095881f37f449e557
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
           Asset       Size  Chunks             Chunk Names
     0.bundle.js  912 bytes       0  [emitted]  
       bundle.js   7.14 KiB       1  [emitted]  main
@@ -32,7 +30,6 @@ Child 2 chunks:
 Child 3 chunks:
     Hash: b0dba9af2a29d62e7d95
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
           Asset       Size  Chunks             Chunk Names
     0.bundle.js  774 bytes       0  [emitted]  
     1.bundle.js  245 bytes       1  [emitted]  
@@ -50,7 +47,6 @@ Child 3 chunks:
 Child 4 chunks:
     Hash: 0cfed055ea39eaf47f56
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
           Asset       Size  Chunks             Chunk Names
     0.bundle.js  236 bytes       0  [emitted]  
     1.bundle.js  245 bytes       1  [emitted]  
diff --git a/test/statsCases/max-modules-default/expected.txt b/test/statsCases/max-modules-default/expected.txt
index 8f9eb8e47..c2ba05757 100644
--- a/test/statsCases/max-modules-default/expected.txt
+++ b/test/statsCases/max-modules-default/expected.txt
@@ -1,6 +1,5 @@
 Hash: 0fd8ab10acd7dd67da45
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
   Asset      Size  Chunks             Chunk Names
 main.js  5.85 KiB       0  [emitted]  main
 Entrypoint main = main.js
diff --git a/test/statsCases/max-modules/expected.txt b/test/statsCases/max-modules/expected.txt
index ff575da13..a0a27ddf4 100644
--- a/test/statsCases/max-modules/expected.txt
+++ b/test/statsCases/max-modules/expected.txt
@@ -1,6 +1,5 @@
 Hash: 0fd8ab10acd7dd67da45
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
   Asset      Size  Chunks             Chunk Names
 main.js  5.85 KiB       0  [emitted]  main
 Entrypoint main = main.js
diff --git a/test/statsCases/module-deduplication-named/webpack.config.js b/test/statsCases/module-deduplication-named/webpack.config.js
index 039f03011..c7831a494 100644
--- a/test/statsCases/module-deduplication-named/webpack.config.js
+++ b/test/statsCases/module-deduplication-named/webpack.config.js
@@ -11,7 +11,6 @@ module.exports = {
 	stats: {
 		hash: false,
 		timings: false,
-		builtAt: false,
 		chunks: true,
 		chunkModules: true,
 		modules: false
diff --git a/test/statsCases/module-deduplication/webpack.config.js b/test/statsCases/module-deduplication/webpack.config.js
index 039f03011..c7831a494 100644
--- a/test/statsCases/module-deduplication/webpack.config.js
+++ b/test/statsCases/module-deduplication/webpack.config.js
@@ -11,7 +11,6 @@ module.exports = {
 	stats: {
 		hash: false,
 		timings: false,
-		builtAt: false,
 		chunks: true,
 		chunkModules: true,
 		modules: false
diff --git a/test/statsCases/module-trace-disabled-in-error/expected.txt b/test/statsCases/module-trace-disabled-in-error/expected.txt
index 103e60f89..97007ebf9 100644
--- a/test/statsCases/module-trace-disabled-in-error/expected.txt
+++ b/test/statsCases/module-trace-disabled-in-error/expected.txt
@@ -1,5 +1,4 @@
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
   Asset      Size  Chunks  Chunk Names
 main.js  2.79 KiB       0  main
 Entrypoint main = main.js
diff --git a/test/statsCases/module-trace-enabled-in-error/expected.txt b/test/statsCases/module-trace-enabled-in-error/expected.txt
index d76fcbffa..ee5409f2d 100644
--- a/test/statsCases/module-trace-enabled-in-error/expected.txt
+++ b/test/statsCases/module-trace-enabled-in-error/expected.txt
@@ -1,5 +1,4 @@
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
   Asset      Size  Chunks  Chunk Names
 main.js  2.79 KiB       0  main
 Entrypoint main = main.js
diff --git a/test/statsCases/named-chunks-plugin-async/expected.txt b/test/statsCases/named-chunks-plugin-async/expected.txt
index dccda5b41..d2b497c4e 100644
--- a/test/statsCases/named-chunks-plugin-async/expected.txt
+++ b/test/statsCases/named-chunks-plugin-async/expected.txt
@@ -1,6 +1,5 @@
 Hash: 16c09fc31f1686ee930a
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
                      Asset       Size                   Chunks             Chunk Names
 chunk-containing-__a_js.js  453 bytes  chunk-containing-__a_js  [emitted]  
 chunk-containing-__b_js.js  173 bytes  chunk-containing-__b_js  [emitted]  
diff --git a/test/statsCases/named-chunks-plugin/expected.txt b/test/statsCases/named-chunks-plugin/expected.txt
index 13e6502ba..73a7dc7a2 100644
--- a/test/statsCases/named-chunks-plugin/expected.txt
+++ b/test/statsCases/named-chunks-plugin/expected.txt
@@ -1,6 +1,5 @@
 Hash: 8b9265d1f4b67c8201f5
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
     Asset       Size  Chunks             Chunk Names
  entry.js   5.34 KiB   entry  [emitted]  entry
 vendor.js  269 bytes  vendor  [emitted]  vendor
diff --git a/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt b/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt
index 8e2e9d07c..3dd6c184f 100644
--- a/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt
+++ b/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt
@@ -1,6 +1,5 @@
 Hash: 6f576d572dc2e6e75ac3
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
     Asset      Size  Chunks  Chunk Names
  child.js  2.61 KiB          
 bundle.js  2.61 KiB       0  main
diff --git a/test/statsCases/optimize-chunks/expected.txt b/test/statsCases/optimize-chunks/expected.txt
index 633576295..c1803d309 100644
--- a/test/statsCases/optimize-chunks/expected.txt
+++ b/test/statsCases/optimize-chunks/expected.txt
@@ -1,6 +1,5 @@
 Hash: 6032753dfe117b1c3893
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
             Asset       Size  Chunks             Chunk Names
           cir1.js  299 bytes       0  [emitted]  cir1
             ab.js  183 bytes       1  [emitted]  ab
diff --git a/test/statsCases/parse-error/webpack.config.js b/test/statsCases/parse-error/webpack.config.js
index 1bc2a16d0..234dd9439 100644
--- a/test/statsCases/parse-error/webpack.config.js
+++ b/test/statsCases/parse-error/webpack.config.js
@@ -5,7 +5,6 @@ module.exports = {
 	entry: "./index",
 	stats: {
 		timings: false,
-		builtAt: false,
 		hash: false,
 		modules: true,
 		chunks: false
diff --git a/test/statsCases/performance-disabled/expected.txt b/test/statsCases/performance-disabled/expected.txt
index 311838388..1488c0ef5 100644
--- a/test/statsCases/performance-disabled/expected.txt
+++ b/test/statsCases/performance-disabled/expected.txt
@@ -1,5 +1,4 @@
 Time: <CLR=BOLD>X</CLR>ms
-Built at: Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT
   <CLR=BOLD>Asset</CLR>       <CLR=BOLD>Size</CLR>  <CLR=BOLD>Chunks</CLR>  <CLR=39,BOLD><CLR=22>           <CLR=39,BOLD><CLR=22><CLR=BOLD>Chunk Names</CLR>
    <CLR=32,BOLD>0.js</CLR>  152 bytes       <CLR=BOLD>0</CLR>  <CLR=32,BOLD>[emitted]</CLR>  
    <CLR=32,BOLD>1.js</CLR>  289 bytes       <CLR=BOLD>1</CLR>  <CLR=32,BOLD>[emitted]</CLR>  
diff --git a/test/statsCases/performance-error/expected.txt b/test/statsCases/performance-error/expected.txt
index f9b67149c..74601b211 100644
--- a/test/statsCases/performance-error/expected.txt
+++ b/test/statsCases/performance-error/expected.txt
@@ -1,5 +1,4 @@
 Time: <CLR=BOLD>X</CLR>ms
-Built at: Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT
   <CLR=BOLD>Asset</CLR>       <CLR=BOLD>Size</CLR>  <CLR=BOLD>Chunks</CLR>  <CLR=39,BOLD><CLR=22>           <CLR=39,BOLD><CLR=22>       <CLR=BOLD>Chunk Names</CLR>
    <CLR=32,BOLD>0.js</CLR>  152 bytes       <CLR=BOLD>0</CLR>  <CLR=32,BOLD>[emitted]</CLR>         
    <CLR=32,BOLD>1.js</CLR>  289 bytes       <CLR=BOLD>1</CLR>  <CLR=32,BOLD>[emitted]</CLR>         
diff --git a/test/statsCases/performance-no-async-chunks-shown/expected.txt b/test/statsCases/performance-no-async-chunks-shown/expected.txt
index 1ec302a09..95639f3ba 100644
--- a/test/statsCases/performance-no-async-chunks-shown/expected.txt
+++ b/test/statsCases/performance-no-async-chunks-shown/expected.txt
@@ -1,5 +1,4 @@
 Time: <CLR=BOLD>X</CLR>ms
-Built at: Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT
   <CLR=BOLD>Asset</CLR>      <CLR=BOLD>Size</CLR>  <CLR=BOLD>Chunks</CLR>  <CLR=39,BOLD><CLR=22>           <CLR=39,BOLD><CLR=22>       <CLR=BOLD>Chunk Names</CLR>
 <CLR=33,BOLD>main.js</CLR>   <CLR=33,BOLD>296 KiB</CLR>       <CLR=BOLD>0</CLR>  <CLR=32,BOLD>[emitted]</CLR>  <CLR=33,BOLD>[big]</CLR>  main
  <CLR=32,BOLD>sec.js</CLR>  2.95 KiB       <CLR=BOLD>1</CLR>  <CLR=32,BOLD>[emitted]</CLR>         sec
diff --git a/test/statsCases/performance-no-hints/expected.txt b/test/statsCases/performance-no-hints/expected.txt
index 00f1efafc..408aaf7a1 100644
--- a/test/statsCases/performance-no-hints/expected.txt
+++ b/test/statsCases/performance-no-hints/expected.txt
@@ -1,5 +1,4 @@
 Time: <CLR=BOLD>X</CLR>ms
-Built at: Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT
   <CLR=BOLD>Asset</CLR>       <CLR=BOLD>Size</CLR>  <CLR=BOLD>Chunks</CLR>  <CLR=39,BOLD><CLR=22>           <CLR=39,BOLD><CLR=22>       <CLR=BOLD>Chunk Names</CLR>
    <CLR=32,BOLD>0.js</CLR>  152 bytes       <CLR=BOLD>0</CLR>  <CLR=32,BOLD>[emitted]</CLR>         
    <CLR=32,BOLD>1.js</CLR>  289 bytes       <CLR=BOLD>1</CLR>  <CLR=32,BOLD>[emitted]</CLR>         
diff --git a/test/statsCases/performance-oversize-limit-error/expected.txt b/test/statsCases/performance-oversize-limit-error/expected.txt
index 23e8b18d7..fc0401887 100644
--- a/test/statsCases/performance-oversize-limit-error/expected.txt
+++ b/test/statsCases/performance-oversize-limit-error/expected.txt
@@ -1,5 +1,4 @@
 Time: <CLR=BOLD>X</CLR>ms
-Built at: Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT
   <CLR=BOLD>Asset</CLR>     <CLR=BOLD>Size</CLR>  <CLR=BOLD>Chunks</CLR>  <CLR=39,BOLD><CLR=22>           <CLR=39,BOLD><CLR=22>       <CLR=BOLD>Chunk Names</CLR>
 <CLR=33,BOLD>main.js</CLR>  <CLR=33,BOLD>296 KiB</CLR>       <CLR=BOLD>0</CLR>  <CLR=32,BOLD>[emitted]</CLR>  <CLR=33,BOLD>[big]</CLR>  main
  <CLR=33,BOLD>sec.js</CLR>  <CLR=33,BOLD>296 KiB</CLR>       <CLR=BOLD>1</CLR>  <CLR=32,BOLD>[emitted]</CLR>  <CLR=33,BOLD>[big]</CLR>  sec
diff --git a/test/statsCases/preset-detailed/expected.txt b/test/statsCases/preset-detailed/expected.txt
index a2576f9dd..5d3433a90 100644
--- a/test/statsCases/preset-detailed/expected.txt
+++ b/test/statsCases/preset-detailed/expected.txt
@@ -1,6 +1,5 @@
 Hash: d748792ec03ede1f69dc
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
   Asset       Size  Chunks             Chunk Names
    0.js  152 bytes       0  [emitted]  
    1.js  289 bytes       1  [emitted]  
diff --git a/test/statsCases/preset-mixed-array/webpack.config.js b/test/statsCases/preset-mixed-array/webpack.config.js
index 937dffe6d..ca9b7998f 100644
--- a/test/statsCases/preset-mixed-array/webpack.config.js
+++ b/test/statsCases/preset-mixed-array/webpack.config.js
@@ -22,7 +22,6 @@ module.exports = [
 			entrypoints: true,
 			hash: false,
 			timings: false,
-			builtAt: false,
 			chunks: false,
 			assets: false
 		}
diff --git a/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt b/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt
index dc0321e6a..1e88ec95c 100644
--- a/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt
+++ b/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt
@@ -1,5 +1,4 @@
 Time: <CLR=BOLD>X</CLR>ms
-Built at: Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT
       <CLR=BOLD>Asset</CLR>       <CLR=BOLD>Size</CLR>  <CLR=BOLD>Chunks</CLR>  <CLR=39,BOLD><CLR=22>           <CLR=39,BOLD><CLR=22>       <CLR=BOLD>Chunk Names</CLR>
        <CLR=32,BOLD>0.js</CLR>  182 bytes       <CLR=BOLD>0</CLR>  <CLR=32,BOLD>[emitted]</CLR>         
        <CLR=32,BOLD>1.js</CLR>  319 bytes       <CLR=BOLD>1</CLR>  <CLR=32,BOLD>[emitted]</CLR>         
diff --git a/test/statsCases/preset-normal-performance/expected.txt b/test/statsCases/preset-normal-performance/expected.txt
index 2eb11a5e6..4b6661e61 100644
--- a/test/statsCases/preset-normal-performance/expected.txt
+++ b/test/statsCases/preset-normal-performance/expected.txt
@@ -1,5 +1,4 @@
 Time: <CLR=BOLD>X</CLR>ms
-Built at: Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT
   <CLR=BOLD>Asset</CLR>       <CLR=BOLD>Size</CLR>  <CLR=BOLD>Chunks</CLR>  <CLR=39,BOLD><CLR=22>           <CLR=39,BOLD><CLR=22>       <CLR=BOLD>Chunk Names</CLR>
    <CLR=32,BOLD>0.js</CLR>  152 bytes       <CLR=BOLD>0</CLR>  <CLR=32,BOLD>[emitted]</CLR>         
    <CLR=32,BOLD>1.js</CLR>  289 bytes       <CLR=BOLD>1</CLR>  <CLR=32,BOLD>[emitted]</CLR>         
diff --git a/test/statsCases/preset-normal/expected.txt b/test/statsCases/preset-normal/expected.txt
index 322ddb915..d5267e1ba 100644
--- a/test/statsCases/preset-normal/expected.txt
+++ b/test/statsCases/preset-normal/expected.txt
@@ -1,6 +1,5 @@
 Hash: d748792ec03ede1f69dc
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
   Asset       Size  Chunks             Chunk Names
    0.js  152 bytes       0  [emitted]  
    1.js  289 bytes       1  [emitted]  
diff --git a/test/statsCases/preset-verbose/expected.txt b/test/statsCases/preset-verbose/expected.txt
index e15daa8cd..242d87043 100644
--- a/test/statsCases/preset-verbose/expected.txt
+++ b/test/statsCases/preset-verbose/expected.txt
@@ -1,6 +1,5 @@
 Hash: d748792ec03ede1f69dc
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
   Asset       Size  Chunks             Chunk Names
    0.js  152 bytes       0  [emitted]  
    1.js  289 bytes       1  [emitted]  
diff --git a/test/statsCases/resolve-plugin-context/expected.txt b/test/statsCases/resolve-plugin-context/expected.txt
index 183e14eeb..cd10ee295 100644
--- a/test/statsCases/resolve-plugin-context/expected.txt
+++ b/test/statsCases/resolve-plugin-context/expected.txt
@@ -1,6 +1,5 @@
 Hash: 20d34a938ae78cffd3f2
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
     Asset      Size  Chunks             Chunk Names
 bundle.js  3.01 KiB       0  [emitted]  main
 Entrypoint main = bundle.js
diff --git a/test/statsCases/reverse-sort-modules/expected.txt b/test/statsCases/reverse-sort-modules/expected.txt
index f2aeb6375..bd1fe6fca 100644
--- a/test/statsCases/reverse-sort-modules/expected.txt
+++ b/test/statsCases/reverse-sort-modules/expected.txt
@@ -1,6 +1,5 @@
 Hash: 0fd8ab10acd7dd67da45
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
   Asset      Size  Chunks             Chunk Names
 main.js  5.85 KiB       0  [emitted]  main
 Entrypoint main = main.js
diff --git a/test/statsCases/runtime-chunk-single/e1.js b/test/statsCases/runtime-chunk-single/e1.js
new file mode 100644
index 000000000..d8e371ad4
--- /dev/null
+++ b/test/statsCases/runtime-chunk-single/e1.js
@@ -0,0 +1,1 @@
+module.exports = "entry1";
diff --git a/test/statsCases/runtime-chunk-single/e2.js b/test/statsCases/runtime-chunk-single/e2.js
new file mode 100644
index 000000000..a5a3b0d88
--- /dev/null
+++ b/test/statsCases/runtime-chunk-single/e2.js
@@ -0,0 +1,1 @@
+module.exports = "entry2";
diff --git a/test/statsCases/runtime-chunk-single/expected.txt b/test/statsCases/runtime-chunk-single/expected.txt
new file mode 100644
index 000000000..77f5b8296
--- /dev/null
+++ b/test/statsCases/runtime-chunk-single/expected.txt
@@ -0,0 +1,2 @@
+Entrypoint e1 = runtime.js e1.js
+Entrypoint e2 = runtime.js e2.js
\ No newline at end of file
diff --git a/test/statsCases/runtime-chunk-single/webpack.config.js b/test/statsCases/runtime-chunk-single/webpack.config.js
new file mode 100644
index 000000000..0a10b262f
--- /dev/null
+++ b/test/statsCases/runtime-chunk-single/webpack.config.js
@@ -0,0 +1,21 @@
+module.exports = {
+	mode: "development",
+	entry: {
+		e1: "./e1",
+		e2: "./e2"
+	},
+	output: {
+		filename: "[name].js"
+	},
+	stats: {
+		hash: false,
+		timings: false,
+		builtAt: false,
+		assets: false,
+		modules: false,
+		reasons: true
+	},
+	optimization: {
+		runtimeChunk: "single"
+	}
+};
diff --git a/test/statsCases/runtime-chunk/e1.js b/test/statsCases/runtime-chunk/e1.js
new file mode 100644
index 000000000..d8e371ad4
--- /dev/null
+++ b/test/statsCases/runtime-chunk/e1.js
@@ -0,0 +1,1 @@
+module.exports = "entry1";
diff --git a/test/statsCases/runtime-chunk/e2.js b/test/statsCases/runtime-chunk/e2.js
new file mode 100644
index 000000000..a5a3b0d88
--- /dev/null
+++ b/test/statsCases/runtime-chunk/e2.js
@@ -0,0 +1,1 @@
+module.exports = "entry2";
diff --git a/test/statsCases/runtime-chunk/expected.txt b/test/statsCases/runtime-chunk/expected.txt
new file mode 100644
index 000000000..0eb0020bc
--- /dev/null
+++ b/test/statsCases/runtime-chunk/expected.txt
@@ -0,0 +1,2 @@
+Entrypoint e1 = runtime~e1.js e1.js
+Entrypoint e2 = runtime~e2.js e2.js
\ No newline at end of file
diff --git a/test/statsCases/runtime-chunk/webpack.config.js b/test/statsCases/runtime-chunk/webpack.config.js
new file mode 100644
index 000000000..0abe241e7
--- /dev/null
+++ b/test/statsCases/runtime-chunk/webpack.config.js
@@ -0,0 +1,21 @@
+module.exports = {
+	mode: "development",
+	entry: {
+		e1: "./e1",
+		e2: "./e2"
+	},
+	output: {
+		filename: "[name].js"
+	},
+	stats: {
+		hash: false,
+		timings: false,
+		builtAt: false,
+		assets: false,
+		modules: false,
+		reasons: false
+	},
+	optimization: {
+		runtimeChunk: "multiple"
+	}
+};
diff --git a/test/statsCases/scope-hoisting-bailouts/expected.txt b/test/statsCases/scope-hoisting-bailouts/expected.txt
index bb6ecb35e..1de266f94 100644
--- a/test/statsCases/scope-hoisting-bailouts/expected.txt
+++ b/test/statsCases/scope-hoisting-bailouts/expected.txt
@@ -1,6 +1,5 @@
 Hash: 8ea520d39e2a8caaf145
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
 Entrypoint index = index.js
 Entrypoint entry = entry.js
    [0] ./entry.js 32 bytes {0} {1} [built]
diff --git a/test/statsCases/scope-hoisting-multi/expected.txt b/test/statsCases/scope-hoisting-multi/expected.txt
index d7e2883f8..cb9084259 100644
--- a/test/statsCases/scope-hoisting-multi/expected.txt
+++ b/test/statsCases/scope-hoisting-multi/expected.txt
@@ -2,7 +2,6 @@ Hash: f987d10439866c1320274e05ad6ebdcc88f97d91
 Child
     Hash: f987d10439866c132027
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
     Entrypoint first = vendor.js first.js
     Entrypoint second = vendor.js second.js
        [0] ./common_lazy_shared.js 25 bytes {0} {1} {2} [built]
@@ -19,7 +18,6 @@ Child
 Child
     Hash: 4e05ad6ebdcc88f97d91
     Time: Xms
-    Built at: Thu Jan 01 1970 00:00:00 GMT
     Entrypoint first = vendor.js first.js
     Entrypoint second = vendor.js second.js
        [0] ./common_lazy_shared.js 25 bytes {0} {1} {2} [built]
diff --git a/test/statsCases/simple-more-info/expected.txt b/test/statsCases/simple-more-info/expected.txt
index 9c59b74cf..bae1ea0d9 100644
--- a/test/statsCases/simple-more-info/expected.txt
+++ b/test/statsCases/simple-more-info/expected.txt
@@ -1,6 +1,5 @@
 Hash: 1911bed74c47698d017f
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
     Asset      Size  Chunks             Chunk Names
 bundle.js  2.61 KiB       0  [emitted]  main
 Entrypoint main = bundle.js
diff --git a/test/statsCases/simple-more-info/webpack.config.js b/test/statsCases/simple-more-info/webpack.config.js
index 6b5ab815e..868f8447c 100644
--- a/test/statsCases/simple-more-info/webpack.config.js
+++ b/test/statsCases/simple-more-info/webpack.config.js
@@ -14,7 +14,6 @@ module.exports = {
 		cachedAssets: true,
 		source: true,
 		errorDetails: true,
-		publicPath: true,
-		outputPath: true,
+		publicPath: true
 	}
 };
diff --git a/test/statsCases/simple/expected.txt b/test/statsCases/simple/expected.txt
index 7d74e52ad..47c02ed13 100644
--- a/test/statsCases/simple/expected.txt
+++ b/test/statsCases/simple/expected.txt
@@ -1,6 +1,5 @@
 Hash: f0bbd0723c33cf044c2f
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
     Asset      Size  Chunks             Chunk Names
 bundle.js  2.89 KiB    main  [emitted]  main
 Entrypoint main = bundle.js
diff --git a/test/statsCases/split-chunks/webpack.config.js b/test/statsCases/split-chunks/webpack.config.js
index e34f6c342..c8ad3e02f 100644
--- a/test/statsCases/split-chunks/webpack.config.js
+++ b/test/statsCases/split-chunks/webpack.config.js
@@ -1,7 +1,6 @@
 const stats = {
 	hash: false,
 	timings: false,
-	builtAt: false,
 	assets: false,
 	chunks: true,
 	chunkOrigins: true,
diff --git a/test/statsCases/tree-shaking/expected.txt b/test/statsCases/tree-shaking/expected.txt
index 5615b339f..935245b65 100644
--- a/test/statsCases/tree-shaking/expected.txt
+++ b/test/statsCases/tree-shaking/expected.txt
@@ -1,6 +1,5 @@
 Hash: 612f7baf263b811351ca
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
     Asset      Size  Chunks             Chunk Names
 bundle.js  7.27 KiB       0  [emitted]  main
 Entrypoint main = bundle.js
diff --git a/test/statsCases/warnings-uglifyjs/expected.txt b/test/statsCases/warnings-uglifyjs/expected.txt
index 5d82023e8..a0e19a9b2 100644
--- a/test/statsCases/warnings-uglifyjs/expected.txt
+++ b/test/statsCases/warnings-uglifyjs/expected.txt
@@ -1,6 +1,5 @@
 Hash: 646a540e1a95f55e1b8c
 Time: Xms
-Built at: Thu Jan 01 1970 00:00:00 GMT
     Asset      Size  Chunks             Chunk Names
 bundle.js  2.19 KiB       0  [emitted]  main
 Entrypoint main = bundle.js