router icon indicating copy to clipboard operation
router copied to clipboard

fix(examples): use correct entrypoint when serving prod

Open NimmLor opened this issue 1 year ago • 0 comments

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:

  1. Open the Stackblitz project: https://tanstack.com/router/latest/docs/framework/react/examples/basic-ssr-file-based
  2. npm i
  3. npm run build
  4. 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)

NimmLor avatar May 05 '24 13:05 NimmLor