gitee之部署vue項目dist目錄


gitee之部署vue項目dist目錄

功能描述:將vue項目中打包后的dist目錄使用Gitte pages部署,使其可以訪問。

問題:部署后文件路徑找不到

解決方法:配置vue.config.js中的publicPath屬性,將部署項目項目名配置在publicPath屬性中,例:

publicPath: '/skymapcoordinatetool/',

注意:

1.publicPath在vue3.3之前為baseUrl屬性,在3.3后廢除

2.outputDir、assetsDir、indexPath屬性必填,例:

outputDir: 'dist',
assetsDir: 'static',
indexPath: 'index.html',

3.在Gitte pages中配置部署目錄時,部署為dist

 

 

鑽研不易,轉載請注明出處、、、、、、

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM