Conversation
Vite 7 supports was added to `@tailwindcss/vite` in version `4.1.11`
🦋 Changeset detectedLatest commit: 290622f The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
No, this one is different, they never get fixed even after refreshes (as opposed to the missing styles which appear after a refresh). |
|
@HiDeoo I was able to fix all dev server optimization warnings and prevent needing a restart with this: diff --git a/packages/starlight/index.ts b/packages/starlight/index.ts
index 8b3a782b..d052e1b8 100644
--- a/packages/starlight/index.ts
+++ b/packages/starlight/index.ts
@@ -124,11 +124,10 @@ export default function StarlightIntegration(
absolutePathToLang,
};
- // TODO: refactor once there is a reliable way to detect this, rather than relying on the
- // presence of specific integrations.
- const isNodeCompatibleEnv = !config.integrations.some(
- ({ name }) => name === '@astrojs/cloudflare'
- );
+ const isCloudflareEnv =
+ config.adapter?.name === '@astrojs/cloudflare' ||
+ config.integrations.some(({ name }) => name === '@astrojs/cloudflare');
+ const isNodeCompatibleEnv = !isCloudflareEnv;
updateConfig({
vite: {
@@ -146,15 +145,22 @@ export default function StarlightIntegration(
: {
optimizeDeps: {
include: [
+ '@astrojs/cloudflare/entrypoints/server',
// TODO: once Expressive Code is refactored/fixed, remove this workaround for
// Expressive Code relying on CJS dependencies like postcss not compatible
// with the Cloudflare adapter.
- '@astrojs/starlight>astro-expressive-code',
- '@astrojs/starlight>astro-expressive-code/hast',
- '@astrojs/starlight>astro-expressive-code>css-select',
- '@astrojs/starlight>astro-expressive-code>nth-check',
- '@astrojs/starlight>astro-expressive-code>boolbase',
- '@astrojs/starlight>extend',
+ '@astrojs/starlight>astro-expressive-code/components',
+ '@astrojs/starlight>astro-expressive-code>hast-util-select',
+ '@astrojs/starlight>astro-expressive-code>rehype',
+ '@astrojs/starlight>astro-expressive-code>unist-util-visit',
+ '@astrojs/starlight>astro-expressive-code>rehype-format',
+ '@astrojs/starlight>astro-expressive-code>hastscript',
+ '@astrojs/starlight>astro-expressive-code>hast-util-from-html',
+ '@astrojs/starlight>astro-expressive-code>hast-util-to-string',
+ '@astrojs/starlight>astro-expressive-code>@expressive-code/core>postcss',
+ '@astrojs/starlight>i18next',
+ '@astrojs/starlight>js-yaml',
+ '@astrojs/starlight>klona/lite',
],
},
},withastro/astro#15815 is also needed. Note that this doesn't fix the CSS issues, that's separate. |
delucis
left a comment
There was a problem hiding this comment.
Changes are looking good!
I can update the dependencies to stable releases now if it’s helpful.
| const isCloudflareEnv = | ||
| config.adapter?.name === '@astrojs/cloudflare' || | ||
| config.integrations.some(({ name }) => name === '@astrojs/cloudflare'); | ||
| const isNodeCompatibleEnv = !isCloudflareEnv; |
There was a problem hiding this comment.
Do you know if the plan is for this variable to become available in Astro directly?
There was a problem hiding this comment.
I need to ping back Matthew in the thread we asked about this but didn't want to ping him again today. Depending on the answer, I'll update the comment.
There was a problem hiding this comment.
Don't have such a plan but we can talk about it.
There was a problem hiding this comment.
Oh, there we go, thanks. I'll bring it up later in the thread so we can discuss it 👍
Co-authored-by: delucis <357379+delucis@users.noreply.github.com>

Description
This PR adds support for Astro 6 (currently requires at least version
6.0.0)See #3644 (comment) for preview releases.
Known issues
Build issue on Windows when importing an Astro component with a<script>in MDX using an import aliasReproThe Markdoc example is failing to build as an updated version of@astrojs/markdocwas not published as part of the alpha.Incompatible with Vitest 4Issue4.1.0-beta.4at the momentNot yet used in this PR due to unrelated mocking issues: https://redirect.github.com/vitest-dev/vitest/issues/9742 - https://redirect.github.com/vitest-dev/vitest/issues/9771SSR build issue with explicit URL imports, e.g.import styles from '../styles/custom.css?url&no-inline'ReproExtra CSS emitted in dev depending on the order of visited pagesReproAdding CSS to a component that did not previously had CSS requires a restart of the dev server to take effectReproSSR issue where visiting some pages matching pre-rendered route patterns can crash the serverReproTypechecking error due to Ship Starlight using `.js` + `.d.ts` files #983 and thestarlight-links-validatorplugin not being updated for Zod 4 yet.starlight-links-validatorversion we're using to fix the issue that will be removed once the package is updated and we update to the new version.Previews
Remaining tasks
size-limitCSS size limitassetsInlineLimitvalue is 4K, so it makes sense that the CSS is not inlined and the current behavior seems correct. A great idea from Chris could be that it was previously considered several chunks, each under 4K, and now bundled together, but that would need to be verified.build.assetsInlineLimitcallback variant. Before, this was called individually for each inlinable CSS which were then all inlined together, ending up in a potentially inlined CSS content above the limit. Now, the content is concatenated first and then the callback is called only once for each inlinable CSS concatenated content, which correctly allows to inline the CSS content if the total size is below the limit. To follow up, I updated thesize-limitthreshold in c4bdad0TODO(HiDeoo)comments..changeset/strange-eyes-fold.md