MCPcopy
hub / github.com/webpack/webpack / emitRecords

Method emitRecords

lib/Compiler.js:1113–1131  ·  view source on GitHub ↗

* Processes the provided error callback. * @param {ErrorCallback} callback signals when the call finishes * @returns {void}

(callback)

Source from the content-addressed store, hash-verified

1111 * @returns {void}
1112 */
1113 emitRecords(callback) {
1114 if (this.hooks.emitRecords.isUsed()) {
1115 if (this.recordsOutputPath) {
1116 asyncLib.parallel(
1117 [
1118 (cb) => this.hooks.emitRecords.callAsync(cb),
1119 this._emitRecords.bind(this)
1120 ],
1121 (err) => callback(/** @type {Error | null} */ (err))
1122 );
1123 } else {
1124 this.hooks.emitRecords.callAsync(callback);
1125 }
1126 } else if (this.recordsOutputPath) {
1127 this._emitRecords(callback);
1128 } else {
1129 callback(null);
1130 }
1131 }
1132
1133 /**
1134 * Processes the provided error callback.

Callers 2

onCompiledMethod · 0.95
onCompiledMethod · 0.80

Calls 3

_emitRecordsMethod · 0.95
isUsedMethod · 0.80
callbackFunction · 0.50

Tested by

no test coverage detected