vscode-vite
vscode-vite copied to clipboard
Allow for custom flag settings
Clear and concise description of the problem
I have customized my dev command to be vercel dev to ensure my Serverless Functions for Vercel are usable within this extension. When the command runs, you can see this error:
130 % vercel dev --port=4000
Vercel CLI 30.0.0
WARN! `--port` is deprecated, please use `--listen` instead
> Running Dev Command “vite --port $PORT”
VITE v4.3.9 ready in 145 ms
➜ Local: http://localhost:4000/
➜ Network: use --host to expose
➜ press h to show help
> Ready! Available at http://localhost:4000
WARN! `--port` is deprecated, please use `--listen` instead
Suggested solution
Allow users to specify custom flag names or a flag override field would be the ideal solution.
Alternative
Have a field that allows users to input their own flags and ignore the default port field? Not sure.
Additional context
It looks like --port is hardcoded at the moment:
https://github.com/antfu/vscode-vite/blob/57f6c6b6978b635bd25ab511744a8b5219fcf2f1/src/start.ts#L38
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guide.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
I think maybe having a dotfile configuration would also perhaps be nice so this can be a per-project setting.