Option to prevent Vite clearScreen on start-up
See original GitHub issueEnvironment
Nuxt CLI v3.0.0-27307420.6a25d3e 22:48:45 RootDir: /srv/codelaunch 22:48:46 Nuxt project info: 22:48:46
- Operating System:
Linux
- Node Version:
v14.17.6
- Nuxt Version:
3.0.0-27307420.6a25d3e
- Package Manager:
unknown
- Bundler:
Vite
- User Config:
srcDir
,server
,vite
- Runtime Modules:
-
- Build Modules:
-
Reproduction
Run npm run dev
Describe the bug
Vite has a clearScreen
CLI option which defaults to true
.
In an attached docker-compose environment, it’s quite annoying to have Vite clear the screen on container start-up, if you’re looking for logs from other services, or initial container logs before vite starts, etc.
Nuxt should be able to proxy the --clearScreen false CLI option to vite. I suppose something like nuxi dev --clearScreen false
?
Additional context
https://vitejs.dev/config/#clearscreen
Logs
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top GitHub Comments
I’m putting in a PR to fix the
nuxi dev --help
issue, as you’re quite right - the original requested behaviour does now work.Please feel free to open a new issue about the ANSI escape sequences, though 🙏I see you’ve done so!@peteromano
nuxi dev --no-clear
works for me.Thanks for mentioning it though,
nuxi dev --help
doesn’t. (And does clear the screen itself, for help… I know some people like it for continuous stuff like webservers, but that’s surely excessive to anyone.)Now just to find why it messes up ANSI escape sequences somehow on exit.