async applyWebpackConfig()

in lib/WebPackWrap.js [257:285]


    async applyWebpackConfig(visualPackage, options = {
        devMode: false,
        generateResources: false,
        generatePbiviz: false,
        minifyJS: true,
        minify: true,
        devServerPort: 8080,
        fast: false,
        compression: 0
    }) {
        const tsconfigPath = visualPackage.buildPath('tsconfig.json');
        const tsconfig = require(tsconfigPath);

        this.pbivizJsonPath = visualPackage.buildPath('pbiviz.json');
        this.pbiviz = require(this.pbivizJsonPath);

        const capabliliesPath = this.pbiviz.capabilities;
        visualPackage.config.capabilities = capabliliesPath;

        const dependenciesPath = this.pbiviz.dependencies && path.join(process.cwd(), this.pbiviz.dependencies);
        const dependenciesFile = fs.existsSync(dependenciesPath) && require(dependenciesPath);
        visualPackage.config.dependencies = typeof dependenciesFile === 'object' ? dependenciesFile : {};

        await WebPackGenerator.prepareFoldersAndFiles(visualPackage);

        let webpackConfig = await this.prepareWebPackConfig(visualPackage, options, tsconfig);

        return { webpackConfig };
    }