I have a vue app created with the webpack-simple template.
I want to use an static port, so I hard code the port in the devServer property in the file webpack.config.js
devServer: {
historyApiFallback: true,
noInfo: true,
overlay: true,
port: 1123
},
The first time that I run npm run dev everything works fine. After I close the process with ctrl+c
(using git bash in windows) and retry running npm run dev an error occurs telling me that the port is currently in use. If I change the port the first time it works then it repeats the same error (again and again).
I check the processs that is using the ports and it's node. I don't understand why node keep listening to those ports after I hit ctrl+c
.
My dev script:
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot"
Info
OS: Windows
Terminal: Git Bash
Node: v9.5.0
NPM: v5.6.0
Webpack: 3.6.0
Webpack-Dev-Server: 2.9.1