I have a javascript project that uses the vite bundle. https://vitejs.dev/
CSS, and JS get minified successfully on https://vercel.com production site
but HTML have still the comments <!-- comments -->
(I am using javascript vanilla, no react)
I've seen the GitHub issue tab, but do not understand anything (and the thing they technically solve aren't listed on the DOCS webpage)
- here: https://github.com/vitejs/vite/pull/793 (i've saw something like
applyconfig, but docs don't show how to use it, orflush)
basically, I want that dev environment have comments that show the details of something,
but on production, the comments don't get pushed.
here I tried to do a simplified example (not a real example) to show the problem:
why production have the <!-- <button> --> while js with all comments get deleted. (and also how to delete spaces, and tabs in HTML for smaller gzip files index.html
I want to be like this:
(here a tool that minify https://www.willpeavy.com/tools/minifier/)
if you tried with vite and don't work,
I will tell you a hint:
from what I know vite use
rollupunder the hood, so maybe there is a config in rollup that can work well for vite, do you find some docs about it?I use vite to not care about config or have less config possible, but maybe is this the case to use configs.