Skip to content

Commit 8e1c688

Browse files
Version Packages (next) (#292)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 528a7bb commit 8e1c688

3 files changed

Lines changed: 48 additions & 1 deletion

File tree

.changeset/pre.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"bump-solid-beta-26",
1313
"bump-solid-beta-28",
1414
"clean-lazy-entries",
15+
"client-build-first-normal-order",
1516
"client-manifest-outdir",
1617
"compiler-package-rename",
1718
"dev-css-and-client-manifest",
@@ -28,6 +29,7 @@
2829
"native-babel-free-refresh",
2930
"native-compiler-option",
3031
"native-server-function-transform",
32+
"root-relative-filter-globs",
3133
"sc-bootstrap-before-hydration-data",
3234
"scoped-server-function-dce",
3335
"server-components-option",

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,50 @@
11
# Changelog
22

3+
## 3.0.0-next.20
4+
5+
### Patch Changes
6+
7+
- 528a7bb: Move the `solid:client-build-first` buildApp hook from `pre` to normal
8+
order, and make its post-order `/complete` companion defer to any other
9+
plugin that declares a non-pre `buildApp` hook of its own.
10+
11+
Pre-order `buildApp` hooks are where host plugins do destructive
12+
preparation: nitro v3's `nitro:prepare` rm -rf's the output directory from
13+
a pre-order hook. Sorted at `pre`, our client build could run before that
14+
cleanup (hook order within `pre` follows plugin registration), so the
15+
client bundle and manifest it had just emitted were wiped, the subsequent
16+
server build baked in the manifest-less fallback, and the production build
17+
served 500s with no client assets — the `solid({ ssr })` + `nitro()`
18+
composition was broken out of the box.
19+
20+
Normal order still satisfies the hook's original purpose (client before
21+
any server-first orchestrator): config-level `builder.buildApp`
22+
orchestrators (@cloudflare/vite-plugin builds workers before the client)
23+
are invoked by Vite only after all pre- and normal-order plugin hooks, and
24+
hook-based orchestrators (nitro's `nitro:main`, cloudflare's companion
25+
hook) declare post order. The `/complete` hook now also treats another
26+
plugin's non-pre `buildApp` hook as a claim on the app build even before
27+
it runs, instead of preempting a post-order orchestrator's staged build
28+
(nitro prerenders and copies public assets before its final server bundle,
29+
and knows which environments to skip). Plain `builder: {}` setups keep the
30+
reinstated build-everything fallback, unchanged.
31+
32+
Covered by a new turnkey e2e mode (builder-prepare) that builds against a
33+
nitro-shaped host: a pre-order output-wiping hook plus a post-order
34+
ssr-building orchestrator that skips already-built environments.
35+
36+
- 60ba309: Resolve relative filter globs against the Vite root instead of `process.cwd()`.
37+
38+
The server-functions plugin's default include glob
39+
(`src/**/*.{jsx,tsx,ts,js,mjs,cjs}`) is relative, and `createFilter` resolved
40+
it against the invocation directory — so running `vite` from anywhere other
41+
than the project root silently skipped server-function compilation entirely
42+
(no transform, no registration). Both filters (the main plugin's
43+
`include`/`exclude` and `serverFunctions.filter`) are now created in
44+
`configResolved` with patterns resolved against `config.root`; user-provided
45+
relative patterns become root-relative too, and absolute patterns are
46+
unaffected.
47+
348
## 3.0.0-next.19
449

550
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vite-plugin-solid",
3-
"version": "3.0.0-next.19",
3+
"version": "3.0.0-next.20",
44
"description": "solid-js integration plugin for vite 6/7/8",
55
"type": "module",
66
"files": [

0 commit comments

Comments
 (0)