欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長(zhǎng)資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          vue項(xiàng)目怎么修改端口號(hào)

          方法:1、修改“configindex.js”文件夾中的“port”項(xiàng)內(nèi)容即可,“port”就表示端口號(hào),該方法能夠永久修改VUE項(xiàng)目啟動(dòng)端口號(hào);2、利用“module.exports={devServer:{port:端口號(hào),}”修改。

          vue項(xiàng)目怎么修改端口號(hào)

          本文操作環(huán)境:windows10系統(tǒng)、Vue2.9.6版,DELL G3電腦。

          vue項(xiàng)目怎么修改端口號(hào)

          1.Vue 2.x

          config文件夾中有一個(gè)index.js其中部分內(nèi)容如下,port即為端口號(hào),在這里更改即可。

          module.exports = {   dev: {     env: require('./dev.env'),     port: 8080,  // 端口號(hào)     assetsSubDirectory: 'static',     assetsPublicPath: '/',     proxyTable: {},     // CSS Sourcemaps off by default because relative paths are "buggy"     // with this option, according to the CSS-Loader README     // (https://github.com/webpack/css-loader#sourcemaps)     // In our experience, they generally work as expected,     // just be aware of this issue when enabling this option.     cssSourceMap: false,    } };

          vue項(xiàng)目怎么修改端口號(hào)

          2.Vue 3.x

          Vue 3.x中修改端口號(hào)則需要在項(xiàng)目根目錄下創(chuàng)建一個(gè)vue.config.js,內(nèi)容如下。

          module.exports = {   devServer: {     port: 8080,   // 端口號(hào)   } };

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)