总结
vue中发布相关的部署路径
1.new Router({
base: ‘/npmvue/dist/,
routes
})
浏览器url访问路径前缀,所有的url都会有,比如route里边的path:’/home’, 那最后访问的路径就是:localhost:8080/mpvue/dist/home
2. vue.config.js 里边的 publicPath: ‘/mpvue/dist/’
是index.html中静态资源的路径,css,js的路径。
3. 所有接口的前缀地址
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_URL // 所有api 的 base_url
})