WIP: Upgrade to solid 2 beta#2091
Conversation
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
commit: |
| useAssets_(() => renderAsset(asset, nonce)); | ||
| entity.ssrIdx = ssrRequestAssets.length - 1; | ||
| useAssets_(() => renderAsset(asset, nonce) as any); | ||
| if (ssrRequestAssets) { |
There was a problem hiding this comment.
im not sure if these changes are correct or needed
| // used on native HTML elements during SSR transformation. The previous | ||
| // implementation used JSX (<style {...props.attrs}> etc.) which triggered the | ||
| // bug. Instead we build the HTML strings directly — these assets are only | ||
| // ever rendered during SSR so reactive JSX is unnecessary. |
There was a problem hiding this comment.
these changes are probably unneeded
There was a problem hiding this comment.
seems that they are needed in some capacity
|
We can probably use |
|
needs rebasing |
- Update leftover accessor-style children callbacks to beta.15 semantics: non-keyed <For> and keyed <Show> now pass raw values, not accessors (notes, hackernews, todomvc fixtures + one missed spot in the dev overlay) - Patch terracotta to shim removed @solidjs/web createDynamic export - Align @solidjs/signals in apps/tests with solid-js 2.0.0-beta.15 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # apps/tests/vite.config.ts # packages/start/package.json # packages/start/src/config/index.ts # packages/start/src/fns/handler.ts # packages/start/src/fns/server.ts # packages/start/src/server/handler.ts # pnpm-lock.yaml
- onSettled no longer accepts async callbacks (a returned Promise is an invalid cleanup value) — wrap the async work in a void IIFE across the test routes, and convert main's new server-env route from createEffect(async) to the same pattern - dev overlay: Errored's fallback now receives an accessor, and signal writes inside the boundary's owned scope throw — read the error and defer the push to a microtask Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
In Solid 2, createEffect's compute runs during SSR, so the export check executed on the server — where the "use server" module legitimately still exports testQuery — baking "true" into the markup. Use onSettled (a server no-op) like the other server-function routes so the check runs against the client module, where non-function exports are stripped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
terracotta next.6 migrated to solid 2.0.0-beta.15 (own createDynamic helper, JSX types from @solidjs/web), so the pnpm patch shimming the removed @solidjs/web createDynamic export is no longer needed, and the dev overlay's Select props no longer need the `as any` cast. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
||
| const lazy = !isServer | ||
| ? solidLazy | ||
| : <T extends Component<any>>(fn: () => Promise<{ default: T }>) => solidLazy(withAssets(fn)); |
There was a problem hiding this comment.
Why are you removing all of my css work? 🙈
There was a problem hiding this comment.
I honestly can't remember. Maybe it had issues. Let me try and add it back
|
|
||
| import { pageRoutes } from "./routes.ts"; | ||
|
|
||
| function buildDevManifest(): Record<string, any> { |
There was a problem hiding this comment.
this is the most critical change that was made for v2 i think
Bring back the withAssets logic in shared/lazy.ts (id$$ manifest lookup + useAssets injection with nonce), adapted to beta.15 where lazy() takes a required moduleUrl in SSR: - config/lazy.ts: inject vite-plugin-solid's __SOLID_LAZY_MODULE__ placeholder into user-land lazy() calls before rewriting the solid-js import, since the plugin only injects it for "solid-js" imports - server/handler.ts: resolve unknown moduleUrls in the dev manifest via a Proxy fallback so client hydration can preload lazy modules in dev - css fixture: replace removed createAsync with createMemo, pass an explicit moduleUrl for the import.meta.glob lazy, and fix onSettled returning a non-cleanup value Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The raw-HTML-string workaround existed for a babel-plugin-jsx-dom-expressions spread crash that's fixed in 0.50.0-next.14. The remaining blocker was beta.15's owner-based hydration keys: useAssets thunks run at shell-injection time with no owner, so ssrElement's getNextContextId call threw and killed the server process. Wrapping the asset JSX in <NoHydration> provides an owner with hydration-key generation disabled — correct for head tags, which never hydrate. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR Checklist
Seeing what It take to update SolidStart to use Solid 2.0 beta. The examples work even with solid-router