-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Class constructor <FooBar> cannot be invoked without 'new' #276
Comments
The class based extractor has been removed on version 2 in favor of a function. |
Ok, worked, moved to below function instead of former class const svelteExtractor = ( content ) => {
const regExp = new RegExp(/[A-Za-z0-9-_:/]+/g)
const matchedTokens = []
let match = regExp.exec(content)
while (match) {
if (match[0].startsWith('class:')) {
matchedTokens.push(match[0].substring(6))
} else {
matchedTokens.push(match[0])
}
match = regExp.exec(content)
}
return matchedTokens
} thanks! closing... |
This was referenced Jan 29, 2020
polarbirke
added a commit
to webfactory/webfactory-gulp-preset
that referenced
this issue
Jan 18, 2021
The class based extractor has been removed from FullHuman/purgecss in favor of a function. src: FullHuman/purgecss#276 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After upgrading from 2.0.4 to 2.0.5 I'm getting this error on the dev console when I run my rollup config in my Svelte project:
In my rollup config I got
SvelteExtractor
which worked fine until today's upgradehttps://gist.github.com/evdama/253e7a78b0c3a2e6ec875963e6bdd339#file-rollup-config-js-L37
SvelteExtractor
is used in line 74https://gist.github.com/evdama/253e7a78b0c3a2e6ec875963e6bdd339#file-rollup-config-js-L74
If I change above line to
extractor: new SvelteExtractor()
the inital error goes away but is replaced byThe text was updated successfully, but these errors were encountered: