router
router copied to clipboard
fix(examples): use correct entrypoint when serving prod
The server for the "Basic + SSR" (and the wip-with-bling) example is specifiying the wrong file name that gets built into the dist folder.
To reproduce:
- Open the Stackblitz project: https://tanstack.com/router/latest/docs/framework/react/examples/basic-ssr-file-based
-
npm i -
npm run build -
npm run serve
Produces the following error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/projects/wmaivvaxx.github/dist/server/entry-server.tsx' imported from /home/projects/wmaivvaxx.github/server.js
at __node_internal_captureLargerStackTrace2 (https://wmaivvaxxgithub-vsdf.w-staticblitz.com/builtins.575e820e.js:101:5528)
at new NodeError (https://wmaivvaxxgithub-vsdf.w-staticblitz.com/builtins.575e820e.js:101:4214)
at finalizeResolution (https://wmaivvaxxgithub-vsdf.w-staticblitz.com/builtins.575e820e.js:158:11255)