UNPKG

@tsed/cli

Version:
39 lines (38 loc) 1.01 kB
import { __decorate } from "tslib"; import { dirname } from "node:path"; import { Injectable } from "@tsed/di"; import { BabelRuntime } from "./BabelRuntime.js"; let WebpackRuntime = class WebpackRuntime extends BabelRuntime { constructor() { super(...arguments); this.name = "webpack"; this.order = 2; } isCompiled() { return true; } files() { return [...super.files(), "webpack.config.js"]; } compile(src, out) { return "tsc && cross-env NODE_ENV=production webpack"; } startProd(main) { return `${this.cmd} ${dirname(main)}/app.bundle.js`; } devDependencies() { return { ...super.devDependencies(), typescript: "latest", "babel-loader": "latest", webpack: "latest", "webpack-cli": "latest" }; } }; WebpackRuntime = __decorate([ Injectable({ type: "runtime" }) ], WebpackRuntime); export { WebpackRuntime };