ffbt
Version:
Build a Typescript app without pain
23 lines (22 loc) • 716 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MakeBundleStrategy = void 0;
const webpack = require("webpack");
const output_1 = require("../utils/output");
class MakeBundleStrategy {
constructor(webpackConfig) {
this.webpackConfig = webpackConfig;
}
run() {
const compiler = webpack(this.webpackConfig);
const printStats = output_1.printWebpackStats(this.webpackConfig.stats);
compiler.run((err, stats) => {
if (err === null) {
return;
}
printStats(err, stats);
console.log("\nDone 🍺🍺🍺\n");
});
}
}
exports.MakeBundleStrategy = MakeBundleStrategy;