Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PurgeCSS extractor needs more default extensions, e.g. 'php' or 'html' #7

Open
polarbirke opened this issue Jul 19, 2021 · 0 comments

Comments

@polarbirke
Copy link
Member

polarbirke commented Jul 19, 2021

Only files matching the configured extenstions are parsed (performance reasons). If we add CSS classes in .html or .php files they will currently always be purged because of the current config:

// conditionally run PurgeCSS if any config (local or global) was found
purgeCss ? $.purgecss({
    content: purgeCssConfig.content,
    extractors: [
        {
            extractor: utilityCssExtractor,
            extensions: ['twig', 'js']
        }
    ],
    safelist: purgeCssConfig.safelist
}) : false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant