HTML comments in prod env #417
Replies: 2 comments 1 reply
-
Personally, I don't care about the comments in production. Some do, some don't. I can see both sides though. If there's a performant way to automate this that doesn't create too much debt, I'm all for it. It would have to make sure not to add comments to Livewire components though, as that'll break them (they can only have one root element). Do you have any thoughts on a possible solution? Really nice if you want to contribute. |
Beta Was this translation helpful? Give feedback.
-
Hey there, I started with an addon to remove comments on prod: https://github.com/delz-dev/RemoveHtmlComments It's working but still not perfect with mounted routes and such … I someone want's to help finishing it – you're welcome |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
HTML comments around partials are displayed in prod
Describe the solution you'd like
Either a partial or custom Statamic tag that displays the comment if debug mode is enabled
Happy to contribute the change but wanted to get feedback before implementing.
Beta Was this translation helpful? Give feedback.
All reactions