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
How to get critical css from multiple external URLs? #215
Comments
I'm also looking for this! Maybe |
Here is the code to get critical css from multiple external URL:
|
relates to #320 |
@jahvi If inlining you don't need to concatenate them, just load the critical CSS unique to that page template. |
I'm inlining them, the problem is that I don't have that much control over what to load when (because of limitations on the CMS system) so in our case it would be a lot simpler to inline all critical path css in the head. For now @mainak-grmtech solutions works very well as a workaround. |
We'll consider adding this feature to v2.1 after the rewrite. |
I currently have the following gulpfile.js that fetches the critical css from a couple URLs and creates 2 separate files:
As you can see the only reason I'm creating the
critical-*.css
files is to later concatenate them and remove duplicate content into a singlecritical.css
file. Is there a more efficient way to do this? I've been trying to use the generated critical css as part of a stream like on the README but I haven't been able to get it to work using external URLs.The text was updated successfully, but these errors were encountered: