❝关于
❞vue.config.js
的配置,总是需要重复去配置,所以严老湿呢,给大家带来一个简单的小模版,顺带细致讲解一下,最下面有全部集合,我们不是代码的创造者,我们只是代码的搬运工
部署应用包的基本URL
// 部署生产环境和开发环境下的URL:可对当前环境进行区分,baseUrl 从 Vue CLI 3.3 起已弃用,要使用publicPath
publicPath: process.env.NODE_ENV === "production" ? "./" : "./"
生产环境构建文件的目录 defalut: dist
outputDir: "dist",
放置生成的静态文件目录(js css img)
assetsDir: "static",
指定生成的index.html 输出路径 相对 default: index.html
indexPath: "index.html",
指定生成文件名中包含hash default: true
filenam