Webpack 配置文件示例:入门指南
{"entry": "./src/main.js", // 入口\n"output": { // 出口\n"path": path.resolve(__dirname, "dist"),\n"filename": "app.js",\n"clean": true // 先清空 dist,然后再输出最新内容\n},\n"plugins": [ // 插件列表\n new HtmlWebpackPlugin({\n template: path.resolve(__dirname, "public/index.html") // 以指定的 html 文件作为生成模板\n })\n]
}
原文地址: http://www.cveoy.top/t/topic/qajy 著作权归作者所有。请勿转载和采集!