Sha256: 84cd3931724c3da4992954edc4366d5f656754dbecbb447571a30ffc01abdf67

Contents?: true

Size: 960 Bytes

Versions: 11

Compression:

Stored size: 960 Bytes

Contents

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
"use strict";
const SingleEntryDependency = require("./dependencies/SingleEntryDependency");

class SingleEntryPlugin {
	constructor(context, entry, name) {
		this.context = context;
		this.entry = entry;
		this.name = name;
	}

	apply(compiler) {
		compiler.plugin("compilation", (compilation, params) => {
			const normalModuleFactory = params.normalModuleFactory;

			compilation.dependencyFactories.set(SingleEntryDependency, normalModuleFactory);
		});

		compiler.plugin("make", (compilation, callback) => {
			const dep = SingleEntryPlugin.createDependency(this.entry, this.name);
			compilation.addEntry(this.context, dep, this.name, callback);
		});
	}

	static createDependency(entry, name) {
		const dep = new SingleEntryDependency(entry);
		dep.loc = name;
		return dep;
	}
}

module.exports = SingleEntryPlugin;

Version data entries

11 entries across 7 versions & 4 rubygems

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