move HydrationScript to HeadContent#7296
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 307d025
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview1 package(s) bumped directly, 3 bumped as dependents. 🟩 Patch bumps
|
| </head> | ||
| <body> | ||
| <HeadContent /> | ||
| <Solid.Suspense>{children}</Solid.Suspense> |
There was a problem hiding this comment.
This should really be Solid.Loading for v2
Bundle Size Benchmarks
Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better. |
| ) : ( | ||
| <Portal mount={document.head}>{content()}</Portal> | ||
| <> | ||
| <HydrationScript /> |
There was a problem hiding this comment.
do we need in both places? if its already in content?
| </head> | ||
| <body> | ||
| <HeadContent /> | ||
| <Suspense>{props.children}</Suspense> |
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud is proposing a fix for your failed CI:
We merged the duplicate @solidjs/web import statements in HeadContent.tsx into a single import to fix the ESLint import/no-duplicates and import/order violations. When HydrationScript was moved into HeadContent, it was added as a separate import after the existing { Portal, isServer } import from the same package. Consolidating them into import { HydrationScript, Portal, isServer } from '@solidjs/web' resolves both errors.
Tip
✅ We verified this fix by re-running @tanstack/solid-router:test:eslint.
diff --git a/packages/solid-router/src/HeadContent.tsx b/packages/solid-router/src/HeadContent.tsx
index cb12386e46..7b27f4a939 100644
--- a/packages/solid-router/src/HeadContent.tsx
+++ b/packages/solid-router/src/HeadContent.tsx
@@ -1,10 +1,9 @@
import { For } from 'solid-js'
-import { Portal, isServer } from '@solidjs/web'
+import { HydrationScript, Portal, isServer } from '@solidjs/web'
import { Asset } from './Asset'
import { useRouter } from './useRouter'
import { useTags } from './headContentUtils'
import type { AssetCrossOriginConfig } from '@tanstack/router-core'
-import { HydrationScript } from '@solidjs/web'
export interface HeadContentProps {
assetCrossOrigin?: AssetCrossOriginConfig
Or Apply changes locally with:
npx nx-cloud apply-locally o8LD-W3ic
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
Make solid-start (v2) similar to react start
Before (solid v2)
After (solid v2 and react)