Skip to content
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

Option to preserve html comments #1420

Closed
jods4 opened this issue Jan 7, 2021 · 3 comments
Closed

Option to preserve html comments #1420

jods4 opened this issue Jan 7, 2021 · 3 comments

Comments

@jods4
Copy link
Contributor

jods4 commented Jan 7, 2021

Is your feature request related to a problem? Please describe.
Removing all comments in HTML files is a bit heavy-handed.

I was trying to port an application that makes uses of Knockout.js to Vite, which uses comments for templating.
In this specific instance, removing <!-- ko: ... --> and <!-- /ko --> comments results in a broken application.

Describe the solution you'd like
An option to configure the regex used to strip comments would be nice, with maybe false meaning don't strip comments at all.

@yyx990803
Copy link
Member

I don't think Vite removes comments from HTML. Can you open a bug report instead?

@yyx990803 yyx990803 reopened this Jan 7, 2021
@yyx990803
Copy link
Member

Oh I thought you were talking about build!

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants