-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Error when trying to modify Webpack plugins #269
Comments
Perhaps it's because you're not returning the config? That'd explain why Also on PurifyCSS, I haven't used this but with Gatsby, wouldn't this need to be run after the pages are built? Or does the plugin know how to scan React.js components for |
Oh, duh. Thanks for the help. I just submitted a PR to correct the README to work out of the box. As best I can tell, the PurifyCSS plugin knows to scan all React “views”, but I’ve no idea how it does so. Purify itself appears to be disappointingly simple in its workings, merely searching for strings anywhere in the source instead of selectively doing so within, e.g. |
Hmm... that is weird. Thanks for the PR! If you're feeling up to more PRs, add an invariant to the return value of gatsby/lib/utils/webpack.config.js Line 339 in dd2e960
|
@kylegach Did you able to make it work purifycss with gatsby. I have nasty off unused css.. i'm beign to lazy to clean it one by one. |
@Necmttn — Nope. I haven’t had time to try again. If you look at my issue there, it looks like others have attempted a fix. It’s worth noting that purifycss-webpack-plugin and gatsby worked together just fine, btw. The issue I had was in the quality of purifycss’ results with my relatively-crazy CSS classes. If you’re using a more traditional CSS architecture/naming system, e.g. BEM, you should be fine. |
I copy/pasted the example code from the README into a brand-new gatsby-node.js:
Which outputs this error after running
gatsby develop
(using Gatsby 0.10.0):Eventually, I'm trying to change the
production
css loader & plugins to use both extract-text-webpack-plugin and purifycss-webpack-plugin... but I get the error before even attempting that.Thanks for the help.
The text was updated successfully, but these errors were encountered: