vue assetsPublicPath


vue 中 /config/index.js,  assetsPublicPath 的作用是便於訪問打包后的靜態資源,默認是相對於根 /,

當然如果直接把dist文件夾當成根來配置域名 可以什么都不用做。

這種情況主要用於 訪問的地址不是根, 類似這種 http://local.wk.com/pro/frontend-vue/nssp/trunk/channel/dist/index.html,

這時想要訪問dist下的資源就需要改 assetsPublicPath : / 為 assetsPublicPath: '/pro/frontend-vue/nssp/trunk/channel/dist/',


免責聲明!

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



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