Sha256: f8ceca48c2271809de0fd87ea4f7271aa43d76f85126994143bf7af8c712ed02

Contents?: true

Size: 669 Bytes

Versions: 10

Compression:

Stored size: 669 Bytes

Contents

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

class ModuleDependencyTemplateAsRequireId {

	apply(dep, source, outputOptions, requestShortener) {
		if(!dep.range) return;
		const comment = outputOptions.pathinfo ?
			`/*! ${requestShortener.shorten(dep.request)} */ ` : "";
		let content;
		if(dep.module)
			content = `__webpack_require__(${comment}${JSON.stringify(dep.module.id)})`;
		else
			content = require("./WebpackMissingModule").module(dep.request);
		source.replace(dep.range[0], dep.range[1] - 1, content);
	}
}
module.exports = ModuleDependencyTemplateAsRequireId;

Version data entries

10 entries across 6 versions & 3 rubygems

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