UNPKG

ffbt

Version:

Build a Typescript app without pain

19 lines (18 loc) 706 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); const path_1 = require("path"); const layer = (projectConfig) => { const pathToReports = path_1.resolve(projectConfig.paths.projectRoot, "bundle-report"); return { plugins: [ new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ analyzerMode: "static", generateStatsFile: true, reportFilename: path_1.resolve(pathToReports, "bundle-analyze.html"), statsFilename: path_1.resolve(pathToReports, "stats.json"), }), ] }; }; module.exports = layer;