Skip to content

Allow custom tag processors/minifiers #382

@fregante

Description

@fregante

A bit of a stretch, but maybe it would make html-minifier easier to extend and less reliant on the maintainers, should other "plugins" come along (base64 minifier? jade templates? frameworktron-3000 awesomizer?)

This would allow me to just pop in a configuration like the following to add support for #381:

    {
        customMinifiers: [
            {
                regex: /<svg>.*<\/svg>/, // lazy regex
                parser: function (content) {
                    return svgo.optimize(content);
                }
            }
        ]
    }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions