Vue 2.x
在config文件夹中有一个index.js其中部分内容如下,port即为端口号
Vue 3.x
在Vue 3.x中修改端口号则需要在项目根目录下创建一个vue.config.js,内容如下。
module.exports = {
devServer:{
port:8081
}
}
Vue 2.x
在config文件夹中有一个index.js其中部分内容如下,port即为端口号
Vue 3.x
在Vue 3.x中修改端口号则需要在项目根目录下创建一个vue.config.js,内容如下。
module.exports = {
devServer:{
port:8081
}
}