Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"bump-solid-beta-26",
"bump-solid-beta-28",
"clean-lazy-entries",
"client-build-first-normal-order",
"client-manifest-outdir",
"compiler-package-rename",
"dev-css-and-client-manifest",
Expand All @@ -28,6 +29,7 @@
"native-babel-free-refresh",
"native-compiler-option",
"native-server-function-transform",
"root-relative-filter-globs",
"sc-bootstrap-before-hydration-data",
"scoped-server-function-dce",
"server-components-option",
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
# Changelog

## 3.0.0-next.20

### Patch Changes

- 528a7bb: Move the `solid:client-build-first` buildApp hook from `pre` to normal
order, and make its post-order `/complete` companion defer to any other
plugin that declares a non-pre `buildApp` hook of its own.

Pre-order `buildApp` hooks are where host plugins do destructive
preparation: nitro v3's `nitro:prepare` rm -rf's the output directory from
a pre-order hook. Sorted at `pre`, our client build could run before that
cleanup (hook order within `pre` follows plugin registration), so the
client bundle and manifest it had just emitted were wiped, the subsequent
server build baked in the manifest-less fallback, and the production build
served 500s with no client assets — the `solid({ ssr })` + `nitro()`
composition was broken out of the box.

Normal order still satisfies the hook's original purpose (client before
any server-first orchestrator): config-level `builder.buildApp`
orchestrators (@cloudflare/vite-plugin builds workers before the client)
are invoked by Vite only after all pre- and normal-order plugin hooks, and
hook-based orchestrators (nitro's `nitro:main`, cloudflare's companion
hook) declare post order. The `/complete` hook now also treats another
plugin's non-pre `buildApp` hook as a claim on the app build even before
it runs, instead of preempting a post-order orchestrator's staged build
(nitro prerenders and copies public assets before its final server bundle,
and knows which environments to skip). Plain `builder: {}` setups keep the
reinstated build-everything fallback, unchanged.

Covered by a new turnkey e2e mode (builder-prepare) that builds against a
nitro-shaped host: a pre-order output-wiping hook plus a post-order
ssr-building orchestrator that skips already-built environments.

- 60ba309: Resolve relative filter globs against the Vite root instead of `process.cwd()`.

The server-functions plugin's default include glob
(`src/**/*.{jsx,tsx,ts,js,mjs,cjs}`) is relative, and `createFilter` resolved
it against the invocation directory — so running `vite` from anywhere other
than the project root silently skipped server-function compilation entirely
(no transform, no registration). Both filters (the main plugin's
`include`/`exclude` and `serverFunctions.filter`) are now created in
`configResolved` with patterns resolved against `config.root`; user-provided
relative patterns become root-relative too, and absolute patterns are
unaffected.

## 3.0.0-next.19

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-solid",
"version": "3.0.0-next.19",
"version": "3.0.0-next.20",
"description": "solid-js integration plugin for vite 6/7/8",
"type": "module",
"files": [
Expand Down