vue项目访问端口及设置

一、vue项目的访问端口

vue项目的访问端口及其设置方式

vue项目目录下config文件夹中的index.js文件

二、端口变化及其设置

vue项目的访问端口及其设置方式

// can be overwritten by process.env.PORT, if port is in use, a free one will be determined

※ 如果不进行端口号修改,默认端口8080,如果端口占用,则会自动调用空闲端口。

vue项目配置端口号

新建 vue.config.js

module.exports = {
    devServer:{
        port:8080,  // 端口号的配置
        open:true   // 自动打开浏览器
    }
}

以上为个人经验,希望能给大家一个参考,也希望大家多多支持。

原文地址:https://blog.csdn.net/qq943686211/article/details/119906641

相关文章:

  • 2021-07-06
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
  • 2021-10-07
  • 2021-07-05
  • 2021-07-25
猜你喜欢
  • 2021-05-31
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2021-07-20
  • 2021-04-01
相关资源
相似解决方案