vue 3 vue-cli-service serve vue.config.js package.json docker
“serve”: “vue-cli-service serve”,
Some page modify vue-cli-service serve –host 0.0.0.0 –port 8978
This may in docker failed.
Error: listen EADDRNOTAVAIL: address not available
So some page modify vue.config.js
Use public is Failed!!
devServer: {
public: '0.0.0.0:80',
disableHostCheck: true,
}
Use host port is Correct!!
module.exports = {
chainWebpack: config => {
config.module.rules.delete('eslint');
},
devServer: {
host: '0.0.0.0',
port: '80',
//public: '0.0.0.0:80', //無效
disableHostCheck: true,
}
}
PS:
.Put eslint is maybe get some eslint error, not about host ip port.
.disableHostCheck can remove for try by yourself env.