-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Enable experimental.directRenderScript
option
#7529
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Just a heads up that @delucis is away until Friday, and he should really be the one to take a look at this! |
@sarah11918 This might be a good one to tackle with a mass of Team Docs eyes! The change should be good, but the main thing will be to go through the site carefully checking that nothing has changed visually, so could be a good T&D candidate? If all looks good, we might consider setting this as the default in Starlight too. |
Excellent! We'll review this one Thursday on Talking and Doc'ing and assuming no issues, we'll merge it then! Or, we'll provide feedback as to what might seem off. |
Very interested if this works.. I enabled that for the Astrolicious Starlight site which uses Tailwind and it was broken.. However that might have been caused by the combination of Starlight + Tailwind 🤔 https://discord.com/channels/830184174198718474/1070481941863878697/1219595125336969226 |
Is that related to this?
I don't think we can fix that because that's how the new rendering technique works. You need re-structure/style your elements to ignore the whitespace. |
@bluwy It could be due to that, not sure. However since it's Starlight + Tailwind, there is no way I can restructure them in userland. So that would need to be something Starlight or the Starlight Tailwind integration, would need to do 🤔. (And since the question was if this can also be enabled for all Starlight sites, I don't think it can, but docs doesn't use Tailwind, so it should be good for docs I guess). |
@bluwy One issue reported by Bryce! |
Thanks @BryceRussell! That seems like a real bug, it looks like the @alexanderniebuhr Happy to take a look into it if you can share an example. I think a fix would be to mark certain styles within Starlight to be non-whitespace sensitive so that Tailwind doesn't change it, but I'm not sure where. |
@bluwy forget what I said. It works now, so maybe a recent Astro release fixed it. I tested it two weeks back 🤔 :) |
This should be ready now. The bug above was fixed in withastro/astro#10686 and I've updated Astro to latest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I tested the preview some more and everything is working with no errors in console
Description (required)
Enable
experimental.directRenderScript
option so that scripts are rendered at the correct pages. But mainly also, I found this to improve performance during builds. The hoisted script analyzer before took some work to complete:I navigated around the pages locally and everything seem to work right. One report I got (from Erika) is that there may be whitespace issues (as the script is now rendered where it's declared), but I also don't see it happening locally.
I also updated astro and rollup to latest. The current rollup build time locally for me went from 3m25s to 1m55s.
Related issues & labels (optional)