fix(v2): Vite 8 compatible manifest plugin#2080
fix(v2): Vite 8 compatible manifest plugin#2080birkskyum wants to merge 17 commits intosolidjs:mainfrom
Conversation
🦋 Changeset detectedLatest commit: aaa5c51 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
98d0ca2 to
02eb822
Compare
|
when still using vite 7 and this pr, size gets larger 😢 @solidjs/start@alpha: 103.4 kb |
Ugh, that are some rough numbers - considering build size is a key selling point of SolidStart. |
|
I don't know if the build size increase came from this PR, or rather from: |
|
@katywings If increased build size is not coming from this PR, can this be merged now? |
|
I think this also affects Deno runtimes. Here is the result of trying v8/alpha.2/Deno: Task dev deno task kv:reset && vite dev
Task kv:reset deno run scripts/flush-kv.ts
🧹 Flushing Deno KV...
✅ Deleted 0 keys.
8:10:14 AM [vite] (client) Re-optimizing dependencies because vite config has changed
VITE v8.0.8 ready in 615 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
[vite] connected.
🐼 info [hrtime] Extracted in (176.08ms)
Error: Failed to load url /@manifest/ssr/1776345020850/assets?id=./src/entry-client.tsx (resolved id: /@manifest/ssr/1776345020850/assets). Does the file exist?
at loadAndTransform (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/chunks/node.js:24457:31) {
status: 500,
statusText: undefined,
headers: undefined,
data: undefined,
body: undefined,
unhandled: true,
cause: Error: Failed to load url /@manifest/ssr/1776345020850/assets?id=./src/entry-client.tsx (resolved id: /@manifest/ssr/1776345020850/assets). Does the file exist?
at loadAndTransform (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/chunks/node.js:24457:31) {
code: "ERR_LOAD_URL",
runnerError: Error: RunnerError
at reviveInvokeError (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/module-runner.js:539:64)
at Object.invoke (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/module-runner.js:612:11)
at async ModuleRunner.getModuleInformation (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/module-runner.js:1187:7)
at async request (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/module-runner.js:1204:83)
at async Object.getAssets (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/@solidjs+start@2.0.0-alpha.2/node_modules/@solidjs/start/dist/server/manifest/dev-ssr-manifest.js:20:23)
at async createPageEvent (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/@solidjs+start@2.0.0-alpha.2/node_modules/@solidjs/start/dist/server/handler.js:124:6)
at async eval (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/@solidjs+start@2.0.0-alpha.2/node_modules/@solidjs/start/dist/server/handler.js:56:20)
at async /Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/@solidjs+start@2.0.0-alpha.2/node_modules/@solidjs/start/dist/config/dev-server.js:43:44
}
}
Error: Failed to load url /@manifest/ssr/1776345020882/assets?id=./src/entry-client.tsx (resolved id: /@manifest/ssr/1776345020882/assets). Does the file exist?
at loadAndTransform (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/chunks/node.js:24457:31) {
status: 500,
statusText: undefined,
headers: undefined,
data: undefined,
body: undefined,
unhandled: true,
cause: Error: Failed to load url /@manifest/ssr/1776345020882/assets?id=./src/entry-client.tsx (resolved id: /@manifest/ssr/1776345020882/assets). Does the file exist?
at loadAndTransform (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/chunks/node.js:24457:31) {
code: "ERR_LOAD_URL",
runnerError: Error: RunnerError
at reviveInvokeError (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/module-runner.js:539:64)
at Object.invoke (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/module-runner.js:612:11)
at async ModuleRunner.getModuleInformation (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/module-runner.js:1187:7)
at async request (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/vite@8.0.8/node_modules/vite/dist/node/module-runner.js:1204:83)
at async Object.getAssets (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/@solidjs+start@2.0.0-alpha.2/node_modules/@solidjs/start/dist/server/manifest/dev-ssr-manifest.js:20:23)
at async createPageEvent (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/@solidjs+start@2.0.0-alpha.2/node_modules/@solidjs/start/dist/server/handler.js:124:6)
at async eval (/Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/@solidjs+start@2.0.0-alpha.2/node_modules/@solidjs/start/dist/server/handler.js:56:20)
at async /Users/caseybaggz/github/nurl/sanctum/node_modules/.deno/@solidjs+start@2.0.0-alpha.2/node_modules/@solidjs/start/dist/config/dev-server.js:43:44
}
}
^C% |
Moving to vite 8 w/ rolldown removes an entire category of dev/prod differences with vite 7 having esbuild (dev) + rollup (prod).
Towards
This PR contains:
solid-start:manifest-pluginto correctly resolve the client manifest during SSR builds under Vite 8 / Rolldown. It automatically detects the current major Vite version, and then:.vite/manifest.jsondirectly from theglobalThis.START_CLIENT_BUNDLEmemory footprint like before..solid-start/client/.vite/manifest.jsonfrom the filesystem, solvingundefined 'source'TypeErrors caused by changes to Rolldown'sgenerateBundleasset handling.