-
Notifications
You must be signed in to change notification settings - Fork 35
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
Script to insert the minimal CSS in your HTML #94
Comments
Psst... I know one tool |
We should definitely do a better job of explaining, in the README about how react-snap uses minimalcss. It probably belongs more to #93 though. |
As soon as you publish latest version of code to npm, I will update it in |
Did any script to inject CSS into html get written? Would be a huge help for something I'm working on! |
@JohnAllen Nothing got added to this repo and I think that's good. It's just too many "it depends". For example, I have my own blog that uses If you're looking for inspiration you should definitely look at |
Cool. I think what I need/will use is this: https://github.com/Automattic/juice. Want to extra CSS from all files (html, CSS + JS) and inline it. |
No. That's something entirely different. What tools like <link rel=stylesheet href=/bloated.css>
</head> ...into this... <style>
...minimal CSS extracted from bloated.css...
</style>
<link rel=preload as=style href=/bloated.css>
</head> |
I get that. The other thing is what I need though. |
First of all;
minimalcss
should be about generating that minimal CSS. That's the core and it's good to only have 1 core function.I have my own hacky solutions (that work because the scope is tight) that change the HTML (e.g.
build/index.html
) so that it first loads the minimal CSS and then lazy loads in the CSS with JavaScript.It would be nice to build such a script into the repo so it can be shared and improved on collectively.
Another option is to build this script into a separate repo and separate npmjs.com package.
The text was updated successfully, but these errors were encountered: