0
点赞
收藏
分享

微信扫一扫

VUE3.0 打包在tomcat中运行


VUE3.0 打包在tomcat中运行_端口号


vue 下面新增 vue.config.js文件

内容:

module.exports = {
baseUrl: process.env.NODE_ENV === 'production' ? '/videocontroller-web/' : '/',
// outputDir: 在npm run build时 生成文件的目录 type:string, default:'dist'
outputDir: 'videocontroller-web',
// pages:{ type:Object,Default:undfind }
devServer: {
port: 8888, // 端口号
host: 'localhost',
https: false, // https:{type:Boolean}
open: true, //配置自动启动浏览器
// proxy: 'http://localhost:4000' // 配置跨域处理,只有一个代理
proxy: {
'/api': {
target: 'http://127.0.0.1:60180/',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
},
'/foo': {
target: '<other_url>'
}
}, // 配置多个代理
}
}

VUE3.0 打包在tomcat中运行_自动启动_02


举报

相关推荐

vue3.0

Vue3.0整理

vue3.0进阶

vue3.0 简介

vue3.0使用$ref

前端框架Vue3.0

0 条评论