async _emit()

in index.js [165:210]


	async _emit(compilation) {
		const options = this.options;

		const config = await Promise.all([
			getLocalization(options),
			getDependencies(options),
			getCapabilities(options).then((capabilities) =>
				scriptVisual.patchCababilities(options, capabilities)
			),
			getJsContent(options, compilation),
			getCssContent(options, compilation),
		])
			.then(
				([
					stringResources,
					dependencies,
					capabilities,
					jsContent,
					cssContent,
				]) =>
					this.getVisualConfig(
						stringResources,
						capabilities,
						dependencies,
						jsContent,
						cssContent
					)
			)
			.catch((err) => {
				throw err;
			});

		if (!config.dependencies) delete config.dependencies; //delete parameter with null value
		config.visual.guid = `${this.options.visual.guid}${
			options.devMode ? DEBUG : ""
		}`;

		this.additionalAssets.pbivizJSON = JSON.stringify(config, null, 2);

		// update status file for debug server
		this.addStatusFile(compilation);

		if (!this.options.devMode) {
			await this.generateResources(config);
		}
	}