New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove HTML comments from production build #1452
Comments
I am trying
But that's probably not what I'm looking for |
Maybe you can try this simple plugin https://github.com/vbenjs/vite-plugin-html |
@anncwb that would probably remove HTML comments from the index.html file, but not from component templates, right? Those get compiled into JS. |
@MartinMalinda Sorry, I got it wrong. This plugin may not suit your needs |
You are referring to comments in Vue templates, right? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It seems like Vite 1.0 removed HTML comments from the build and the default behavior changed to preserve the comments by default.
Is there a way to set it back to previous behavior? I have mostly notes to myself and other todo-like notes that I'd wish not to be included in the production build:)). I can imagine the build being tiny bit smaller too.
Maybe I can set this to false somewhere in the config?
vite/packages/vite/types/terser.d.ts
Line 43 in 3a27fa3
The text was updated successfully, but these errors were encountered: