我有一个完整的堆栈应用程序,其中Vue运行webpack-dev-server,而节点运行在express上。
我的webpack-dev-server配置为在port 8080
上打开Vue,并在port 8081
上进行快速侦听。
但是,即使我的Webpack配置如下,我的Vue应用程序最近也开始默认在port 8081
上运行。
webpack.dev.config.js
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
Vue配置为
config / index.js
host: 'localhost',
port: 8080,
vue和webpack开发依赖项
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.5",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.33.0",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-dev-server": "^3.7.0",
"webpack-merge": "^4.1.0"
vue和webpack依赖项
"vue": "^2.6.10",
"vue-loader": "^14.2.4",
"vue-router": "^3.0.6",
"vuex": "^3.1.1",
"vuex-persistedstate": "^2.5.4",
"webpack-cli": "^3.3.2"
有人知道这可能是什么原因吗?预先感谢!