UNPKG

@edwardxyt/gws-cli

Version:

这是一个web脚手架工具,用于生成基于webpack5,生成typescript+react17+mobx5+reactRouter6的应用。初衷是要解决多入口,多环境。单独编译单独运行的脚手架。做到小而美。拒绝锦上添花。

33 lines (31 loc) 1.08 kB
const webpack_production_config = require("../config/webpack.vendor.config"); const webpack = require("webpack"); const debug = require("debug"); const echo = debug("compile:vendor"); const log = console.log; webpack_production_config().then(config => { webpack(config).run((err, stats) => { if (err) { echo("webpack compile vendor fail 编译错误!"); echo(err); } else { echo( `------------------------------ start ------------------------------` ); process.stdout.write( stats.toString({ colors: true, modules: false, children: false, chunks: false, warnings: false, chunkModules: false }) + "\n\n" ); echo("webpack compile vendor complete 编译完成"); echo( `------------------------------- end ------------------------------` ); } }); });