-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Use rendered rather than emitted CSS in AMP mode #808
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
Comments
@Rich-Harris I think its absolutely relevant to also think about adding an option for AMP to output AMP compliant HTML to a different folder, apart from the actual HTML. I've given an example in this issue #1308. Also, how can we handle CSS when we use preprocessor, I've described the problem that I faced when I'm using tailwindCSS in this issue #1310 |
Is there any reason to use AMP anymore? Google no longer prioritizes it in search results: https://www.lafoo.com/the-end-of-amp/. I would think you'd be better off not using it and that we'd be better off to drop support for it |
I hope they ditch AMP too but they've recently invested in AMP stories and they are promoting that pretty strongly. I think Google will improve AMP implementation instead of just dropping it. |
Is your feature request related to a problem? Please describe.
AMP pages have a strict (and somewhat arbitrary) limit on the amount of CSS a page can include. They also provide a guarantee that doesn't exist in non-AMP mode, namely that if
condition
isfalse
at SSR time......we can safely omit the styles emitted by
Foo.svelte
.It would be nice if we could take advantage of that and only include styles for components that were rendered, to increase the likelihood of staying beneath the 75kb ceiling.
Describe the solution you'd like
rendered.css
instead of inspecting the module graphHow important is this feature to you?
It depends on the outcome of the research we plan to conduct on how much traffic our app would lose if we told AMP to bugger off once and for all.
The text was updated successfully, but these errors were encountered: