diff --git a/.changeset/pre.json b/.changeset/pre.json index 08ebbc7..915bc6e 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -36,6 +36,7 @@ "dev-css-and-client-manifest", "dev-external-conditions-fidelity", "dev-false-production-runtime", + "dev-instrument-before-server-functions", "dev-manifest-bridge-and-boundary-modules", "dev-manifest-css-invalidation", "dev-manifest-early-import", @@ -118,12 +119,14 @@ "scoped-server-function-dce", "semi-framework-deps-stay-out-of-optimize", "send-web-response-drain-hang", + "server-component-styles", "server-components-claims-transform", "server-components-define", "server-components-external", "server-components-option", "server-components-single-flight", "server-environments-reload", + "server-function-build-id", "server-function-manifest-ids", "server-functions-client-runtime-prebundle", "server-functions-client-subpath-prebundle", @@ -152,6 +155,7 @@ "start-env-typed", "start-external-server", "start-instrument-early-server-import", + "start-lifecycle-names", "start-mode-terminology", "start-node-entry", "start-render-mode", @@ -164,6 +168,7 @@ "ts-lazy-module-url", "turnkey-ssr", "turnkey-start-option", + "v2-migration-guide", "virtual-manifest-types-subpath", "virtual-manifest-types", "vite-8-minimum", diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c4089a..fcfa9dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 3.0.0-next.53 + +### Patch Changes + +- 2a081c3: Under `vite dev`, a server-function call that arrives before any page has loaded the server handler no longer loads the function's module ahead of `start.serverSetup`. The dev middleware imported the module first and the handler (which runs the server setup module first) second, so the module and everything it imports could load before instrumentation started. It now loads the handler first. +- 53bb865: With `serverFunctions: { components: true }`, stylesheets that a `'use server'` module reaches (directly or through the components it imports) now reach the production client build, so the SSR document links them. The client compile replaces a server module with references, so its imports never joined the client graph: dev looked right, since its CSS crawl walks the SSR graph, but production rendered server components unstyled (#456). The client build now walks what the module imports and imports those stylesheets from its client module. Script modules on the way are only loaded, never imported, so no server code reaches the client bundle, and compile-time CSS plugins such as StyleX still see them. Builds without `components` are unchanged. +- 3b0e262: Production builds now stamp server function calls with a build id (solidjs/solid#4215). The client build adds an `X-Server-Function-Build` header to every non-GET call, and the server build configures the runtime with the same id, read from the client build's `.vite/solid-server-functions.json`. A tab still running the previous deploy now gets a 409 (`unknownFunction: true`) for a function whose id survived the deploy, instead of running it with arguments of another shape. The app's own `prepareRequest` hook keeps working: the plugin wraps `configureServerFunctionsClient` so the build's stamp runs first and the app's hook runs after it. Dev is unchanged, a server built without a client build checks nothing, and a custom `runtime` is left alone. +- 4e64354: Rename `start.setup` to `start.serverRenderSetup` and `start.instrument` to `start.serverSetup`, so the start lifecycle options say where and how often they run: `serverSetup` once before anything else on the server, `middleware` on every request, `serverRenderSetup` before every page render, `clientSetup` once in the browser. The old keys fail at config time with a message naming the replacement. +- 3236eca: Add a "Migrating from vite-plugin-solid" section to the README, and point the rename banner at it. + ## 3.0.0-next.52 ### Patch Changes diff --git a/package.json b/package.json index 298b018..5d982d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@solidjs/vite-plugin", - "version": "3.0.0-next.52", + "version": "3.0.0-next.53", "description": "solid-js integration plugin for Vite", "type": "module", "engines": {