Is there a way to consistently serve a Vue CLI project on a specific port, like 8888
? I've tried various methods without success.
- Adjusting the serve script in
package.json
to include the flag--port 8888
Updating the
devServer
option invue.config.js
. I set it asdevServer: { port: 8888 }
Attempting to specify the port while serving the project with a command like
npm run serve -- --port 8888
Unfortunately, none of these approaches have worked for me. Can someone guide me on the correct way to achieve this?