Skip to content

Minify Liquid files #29

@mike-diff

Description

@mike-diff

Not that it would be huge gains but it would be cool to minify the entire liquid file to reduce html bloat and white spaces.
There is this method
https://gist.github.com/sskylar/7557528

{% capture html %}
<html>
 ...
</html>
{% endcapture %}{{ html | strip_newlines | replace:'	','' | replace:'    ','' | replace:'  ',' ' }}

But I am thinking. maybe there is a way to do this through webpack build on top of this.
This might help: kangax/html-minifier#856
Worst Case Scenario: https://www.npmjs.com/package/html-minifier-cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions