MCPcopy
hub / github.com/webpack/webpack / addEntry

Method addEntry

lib/Compilation.js:2667–2675  ·  lib/Compilation.js::Compilation.addEntry

* Adds the provided string to the compilation. * @param {string} context context path for entry * @param {Dependency} entry entry dependency that should be followed * @param {string | EntryOptions} optionsOrName options or deprecated name of entry * @param {ModuleCallback} callback callback

(context, entry, optionsOrName, callback)

Source from the content-addressed store, hash-verified

2665 * @returns {void} returns
2666 */
2667 addEntry(context, entry, optionsOrName, callback) {
2668 class="cm">// TODO webpack 6 remove
2669 const options =
2670 typeof optionsOrName === class="st">"object"
2671 ? optionsOrName
2672 : { name: optionsOrName };
2673
2674 this._addEntryItem(context, entry, class="st">"dependencies", options, callback);
2675 }
2676
2677 /**
2678 * Adds the provided string to the compilation.

Callers 5

applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80

Calls 1

_addEntryItemMethod · 0.95

Tested by

no test coverage detected