MCPcopy
hub / github.com/webpack/webpack / cont

Method cont

lib/Compilation.js:3810–3858  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3808 this.logger.timeEnd("module assets");
3809
3810 const cont = () => {
3811 this.logger.time("process assets");
3812 this.hooks.processAssets.callAsync(this.assets, (err) => {
3813 if (err) {
3814 return finalCallback(
3815 makeWebpackError(err, "Compilation.hooks.processAssets")
3816 );
3817 }
3818 this.hooks.afterProcessAssets.call(this.assets);
3819 this.logger.timeEnd("process assets");
3820 this.assets =
3821 /** @type {CompilationAssets} */
3822 (
3823 this._backCompat
3824 ? soonFrozenObjectDeprecation(
3825 this.assets,
3826 "Compilation.assets",
3827 "DEP_WEBPACK_COMPILATION_ASSETS",
3828 `BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
3829 Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
3830 Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.`
3831 )
3832 : Object.freeze(this.assets)
3833 );
3834
3835 this.summarizeDependencies();
3836 if (shouldRecord) {
3837 this.hooks.record.call(
3838 this,
3839 /** @type {Records} */
3840 (this.records)
3841 );
3842 }
3843
3844 if (this.hooks.needAdditionalSeal.call()) {
3845 this.unseal();
3846 return this.seal(callback);
3847 }
3848 return this.hooks.afterSeal.callAsync((err) => {
3849 if (err) {
3850 return finalCallback(
3851 makeWebpackError(err, "Compilation.hooks.afterSeal")
3852 );
3853 }
3854 this.fileSystemInfo.logStatistics();
3855 finalCallback();
3856 });
3857 });
3858 };
3859
3860 this.logger.time("create chunk assets");
3861 if (this.hooks.shouldGenerateChunkAssets.call() !== false) {

Callers

nothing calls this directly

Calls 9

summarizeDependenciesMethod · 0.95
unsealMethod · 0.95
sealMethod · 0.95
makeWebpackErrorFunction · 0.85
timeMethod · 0.80
timeEndMethod · 0.80
freezeMethod · 0.80
logStatisticsMethod · 0.80
callMethod · 0.45

Tested by

no test coverage detected