基于 Vue + Webpack 工具
# 全局安装(也可以局部安装)
npm i buzz-cli -g
buzz new demo
buzz serve
buzz build
# 默认配置,可以通过buzz.config.js来覆盖
module.exports = {
// webpack相关的配置的默认值
const config = {
// 项目入口
entryPath: "./src/index.js",
// 输出目录
outputDir: "dist",
// 静态资源目录
assetsDir: "assets",
// 生成的html名称
htmlName: "index.html",
// 公共路径
publicPath: "/"
};
// 构建过程中的钩子,包含before和after
const hooks = {};
return {
config,
hooks
};
};