Deployment 是否可以自定义VueJS dist文件夹位置?

Deployment 是否可以自定义VueJS dist文件夹位置?,deployment,vuejs2,Deployment,Vuejs2,要部署运行的VueJS应用程序,请运行npm运行build 这将在您的开发应用程序结构中创建一个dist文件夹。是否可以更改创建此dist文件夹的位置 我使用网页包模板创建VueJS应用程序vue init网页包应用程序名称在vue模板中,您可以在config/index.js文件中更改路径: 构建:{ [...] index:path.resolve(uu dirname,'../dist/index.html'), assetroot:path.resolve(_dirname,../dis

要部署运行的VueJS应用程序,请运行
npm运行build

这将在您的开发应用程序结构中创建一个dist文件夹。是否可以更改创建此dist文件夹的位置


我使用网页包模板创建VueJS应用程序
vue init网页包应用程序名称

在vue模板中,您可以在
config/index.js
文件中更改路径:

构建:{
[...]
index:path.resolve(uu dirname,'../dist/index.html'),
assetroot:path.resolve(_dirname,../dist'),
[...]
},
将两行更改为其中一行(对于绝对路径):

index:path.resolve('/www/dist/index.html'),
assetroot:path.resolve('/www/dist'),
或者,对于亲属:

index:path.resolve(_dirname,'../deploy/public_html/index.html'),
assetroot:path.resolve(_dirname,'../deploy/public_html'),

如果您在Windows环境中,可以使用上述格式或类似的
'C:\\www'
(只需确保转义
\


您使用的是哪种vue模板?vue初始化网页包应用程序名称