Summary
When building for production, Stack54 emits SSR dynamic chunks into dist/client, while the generated server entry retains imports such as ./client/<chunk>.js. From dist/server/entry.js, those imports resolve to dist/server/client/<chunk>.js, not the emitted dist/client/<chunk>.js.
Impact
Deployments can fail at runtime when the SSR entry dynamically imports optional/infrastructure chunks. Consumers currently need to copy the complete client chunk set into dist/server/client after a successful build.
Expected behavior
Either:
- emit the SSR-referenced chunks under
dist/server/client, or
- rewrite the generated server imports to the actual emitted location, or
- document the required post-build asset step as part of the supported build output.
Reproduction / evidence
A downstream project using Stack54 0.15.0 and Vite 7.3.6 has this workaround in its production build wrapper: https://github.com/joshamaju/relay/blob/master/scripts/build.mjs
The workaround copies dist/client recursively to dist/server/client because the generated server-relative imports otherwise point at missing files.
Please let me know if a minimal fixture or generated output listing would help.
Summary
When building for production, Stack54 emits SSR dynamic chunks into
dist/client, while the generated server entry retains imports such as./client/<chunk>.js. Fromdist/server/entry.js, those imports resolve todist/server/client/<chunk>.js, not the emitteddist/client/<chunk>.js.Impact
Deployments can fail at runtime when the SSR entry dynamically imports optional/infrastructure chunks. Consumers currently need to copy the complete client chunk set into
dist/server/clientafter a successful build.Expected behavior
Either:
dist/server/client, orReproduction / evidence
A downstream project using Stack54 0.15.0 and Vite 7.3.6 has this workaround in its production build wrapper: https://github.com/joshamaju/relay/blob/master/scripts/build.mjs
The workaround copies
dist/clientrecursively todist/server/clientbecause the generated server-relative imports otherwise point at missing files.Please let me know if a minimal fixture or generated output listing would help.