Open xgqfrms opened 2 years ago
webpack.config.js
let devServerPort = 8088; for (let args of process.argv) { if (args.startsWith('--port=')) { const port = args.replace('--port=', ''); if (port) { devServerPort = parseInt(port); } } }
$ --port=8090 && npm run dev $ --port=8090 npm run dev
process.argv
优缺点