Sha256: 4c20201264f879ad0eb49cd6d56c127d7aa92860779ead7a9a32f3e346bbf00c

Contents?: true

Size: 623 Bytes

Versions: 11

Compression:

Stored size: 623 Bytes

Contents

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
"use strict";

class NamedModulesPlugin {
	constructor(options) {
		this.options = options || {};
	}

	apply(compiler) {
		compiler.plugin("compilation", (compilation) => {
			compilation.plugin("before-module-ids", (modules) => {
				modules.forEach((module) => {
					if(module.id === null && module.libIdent) {
						module.id = module.libIdent({
							context: this.options.context || compiler.options.context
						});
					}
				});
			});
		});
	}
}

module.exports = NamedModulesPlugin;

Version data entries

11 entries across 7 versions & 4 rubygems

Version Path
ilog-0.4.1 node_modules/webpack/lib/NamedModulesPlugin.js
ilog-0.4.0 node_modules/webpack/lib/NamedModulesPlugin.js
ilog-0.3.3 node_modules/webpack/lib/NamedModulesPlugin.js
optimacms-0.4.3 spec/dummy/node_modules/@rails/webpacker/node_modules/webpack/lib/NamedModulesPlugin.js
optimacms-0.4.3 spec/dummy/node_modules/@rails/webpacker/node_modules/webpack/node_modules/webpack/lib/NamedModulesPlugin.js
optimacms-0.4.3 spec/dummy/node_modules/webpack/lib/NamedModulesPlugin.js
optimacms-0.4.2 spec/dummy/node_modules/@rails/webpacker/node_modules/webpack/lib/NamedModulesPlugin.js
optimacms-0.4.2 spec/dummy/node_modules/@rails/webpacker/node_modules/webpack/node_modules/webpack/lib/NamedModulesPlugin.js
optimacms-0.4.2 spec/dummy/node_modules/webpack/lib/NamedModulesPlugin.js
cortex-0.1.3 spec/dummy/node_modules/webpack/lib/NamedModulesPlugin.js
lanes-0.8.0 node_modules/webpack/lib/NamedModulesPlugin.js