Sha256: b5d3814b0410875d4d61fefeac7f92aa7f4b4648aa045de5435d52f585743947

Contents?: true

Size: 1.27 KB

Versions: 28

Compression:

Stored size: 1.27 KB

Contents

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
module.exports = function(updatedModules, renewedModules) {
	var unacceptedModules = updatedModules.filter(function(moduleId) {
		return renewedModules && renewedModules.indexOf(moduleId) < 0;
	});
	var log = require("./log");

	if (unacceptedModules.length > 0) {
		log(
			"warning",
			"[HMR] The following modules couldn't be hot updated: (They would need a full reload!)"
		);
		unacceptedModules.forEach(function(moduleId) {
			log("warning", "[HMR]  - " + moduleId);
		});
	}

	if (!renewedModules || renewedModules.length === 0) {
		log("info", "[HMR] Nothing hot updated.");
	} else {
		log("info", "[HMR] Updated modules:");
		renewedModules.forEach(function(moduleId) {
			if (typeof moduleId === "string" && moduleId.indexOf("!") !== -1) {
				var parts = moduleId.split("!");
				log.groupCollapsed("info", "[HMR]  - " + parts.pop());
				log("info", "[HMR]  - " + moduleId);
				log.groupEnd("info");
			} else {
				log("info", "[HMR]  - " + moduleId);
			}
		});
		var numberIds = renewedModules.every(function(moduleId) {
			return typeof moduleId === "number";
		});
		if (numberIds)
			log(
				"info",
				"[HMR] Consider using the NamedModulesPlugin for module names."
			);
	}
};

Version data entries

28 entries across 27 versions & 9 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/webpack/hot/log-apply-result.js
disco_app-0.18.0 test/dummy/node_modules/webpack/hot/log-apply-result.js
disco_app-0.18.2 test/dummy/node_modules/webpack/hot/log-apply-result.js
disco_app-0.16.1 test/dummy/node_modules/webpack/hot/log-apply-result.js
disco_app-0.15.2 test/dummy/node_modules/webpack/hot/log-apply-result.js
disco_app-0.18.4 test/dummy/node_modules/webpack/hot/log-apply-result.js
disco_app-0.18.1 test/dummy/node_modules/webpack/hot/log-apply-result.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/webpack/hot/log-apply-result.js
disco_app-0.14.0 test/dummy/node_modules/webpack/hot/log-apply-result.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/webpack/hot/log-apply-result.js
tang-0.2.1 spec/tang_app/node_modules/webpack/hot/log-apply-result.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/webpack/hot/log-apply-result.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/webpack/hot/log-apply-result.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/webpack/hot/log-apply-result.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/webpack/hot/log-apply-result.js
tang-0.2.0 spec/tang_app/node_modules/webpack/hot/log-apply-result.js
tang-0.1.0 spec/tang_app/node_modules/webpack/hot/log-apply-result.js
tang-0.0.9 spec/tang_app/node_modules/webpack/hot/log-apply-result.js
enju_library-0.3.8 spec/dummy/node_modules/webpack/hot/log-apply-result.js
jester-data-8.0.0 node_modules/webpack/hot/log-apply-result.js