Skip to content

Combine with purgecss #28

@technic

Description

@technic

Hi,

Thanks a lot for this cool plugin!

I am trying to understand what is the order of css plugins and how to customize it. What I want to achieve is to apply fontmin after purgecss. (https://purgecss.com/plugins/webpack.html)

I use font-awesome, and import it to css. The webpack outputs very small and lightweight css file, where only few icons are present.
However fontmin still includes all icons in the font. After small debugging I put the following line in the source code

console.log(item.asset.source())

What I see is that the source code that fontmin sees the unporcessed css file, it is minified but not purged. And includes all icons.
If I replace my original css file with the postporcess one, which has only limited number of icons, then fontmin works as expected and cuts the web font files significanlty.

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