(err, _compilation)
| 201 | * @returns {void} |
| 202 | */ |
| 203 | const onCompiled = (err, _compilation) => { |
| 204 | if (err) return this._done(err, _compilation); |
| 205 | |
| 206 | const compilation = /** @type {Compilation} */ (_compilation); |
| 207 | |
| 208 | if (this.compiler.hooks.shouldEmit.call(compilation) === false) { |
| 209 | return this._done(null, compilation); |
| 210 | } |
| 211 | |
| 212 | process.nextTick(() => { |
| 213 | const logger = compilation.getLogger("webpack.Compiler"); |
| 214 | logger.time("emitAssets"); |
| 215 | this.compiler.emitAssets(compilation, (err) => { |
| 216 | logger.timeEnd("emitAssets"); |
| 217 | if (err) return this._done(err, compilation); |
| 218 | if (this.invalid) return this._done(null, compilation); |
| 219 | |
| 220 | logger.time("emitRecords"); |
| 221 | this.compiler.emitRecords((err) => { |
| 222 | logger.timeEnd("emitRecords"); |
| 223 | if (err) return this._done(err, compilation); |
| 224 | |
| 225 | if (compilation.hooks.needAdditionalPass.call()) { |
| 226 | compilation.needAdditionalPass = true; |
| 227 | |
| 228 | compilation.startTime = /** @type {number} */ ( |
| 229 | this.startTime |
| 230 | ); |
| 231 | compilation.endTime = Date.now(); |
| 232 | logger.time("done hook"); |
| 233 | const stats = new Stats(compilation); |
| 234 | this.compiler.hooks.done.callAsync(stats, (err) => { |
| 235 | logger.timeEnd("done hook"); |
| 236 | if (err) return this._done(err, compilation); |
| 237 | |
| 238 | this.compiler.hooks.additionalPass.callAsync((err) => { |
| 239 | if (err) return this._done(err, compilation); |
| 240 | this.compiler.compile(onCompiled); |
| 241 | }); |
| 242 | }); |
| 243 | return; |
| 244 | } |
| 245 | return this._done(null, compilation); |
| 246 | }); |
| 247 | }); |
| 248 | }); |
| 249 | }; |
| 250 | this.compiler.compile(onCompiled); |
| 251 | }); |
| 252 | }; |
nothing calls this directly
no test coverage detected