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

[BUG] Compatibility with purgecss v2 #73

Closed
LuXDAmore opened this issue Jan 27, 2020 · 4 comments · Fixed by #84
Closed

[BUG] Compatibility with purgecss v2 #73

LuXDAmore opened this issue Jan 27, 2020 · 4 comments · Fixed by #84
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@LuXDAmore
Copy link

LuXDAmore commented Jan 27, 2020

I've update to the new version of PurgeCSS (v2.0.3) and there is an issue now during the build:

TypeError: Class constructor extractor cannot be invoked without 'new'

@LuXDAmore
Copy link
Author

There is an issue opened on the repo of PurgeCSS

@LuXDAmore
Copy link
Author

Fixed for me with:

{
    purgeCSS: {
        extractors: () => [
            {
                extractor: content => ( content || '' ).match(
                    /[A-z0-9-:\\/]+/g
                ),
                extensions: [
                    'html',
                    'vue',
                    'js',
                ],
            },
        ],
    },
}

@manniL manniL added bug Something isn't working help wanted Extra attention is needed labels Jan 30, 2020
@manniL
Copy link
Member

manniL commented Jan 30, 2020

Upgrading to PurgeCSS 2 should be part of the next major version 👍🏻

@simllll
Copy link
Contributor

simllll commented Jan 30, 2020

Just created a PR including a backwards compatible function check, therefore a non breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants