Replies: 4 comments
-
Issues are somewhat stale. Try https://github.com/adamchainz/django-minify-html instead, it's more active. |
Beta Was this translation helpful? Give feedback.
-
I've evaluated all the top packages and haven't found one yet that doesn't have an issue because of django's complex templating. At least I found a decent inline js compressor (django-compressor). Would still like to find a good whitespace reduction solution as that would achieve a high level of reduction while (presumably) being pretty safe. |
Beta Was this translation helpful? Give feedback.
-
Can you elaborate on the desire/usecase/benchmarks? In my experience I ignore minification and just let gzip handle compression, which has always seemed to work fine and be completely stable. I think adding minification might optimize bytes over the network slightly, while adding a little extra CPU server-side. And of course an additional complexity in the pipeline via the plugin itself. I could see comment removal being useful. That would allow us to put more comments in our templates without fear of it appearing in the source -- but even a component that is repeated 100 times will have any comments compressed with gzip. Interesting idea |
Beta Was this translation helpful? Give feedback.
-
Keep in mind, if you structure your comments
|
Beta Was this translation helpful? Give feedback.
-
I'm on the search for a minifier to, at a minimum, remove whitespace and comments from the template .html files.
Beta Was this translation helpful? Give feedback.
All reactions