Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prerender does not work with recommended vercel template #12720

Open
lifeiscontent opened this issue Jan 10, 2025 · 0 comments
Open

prerender does not work with recommended vercel template #12720

lifeiscontent opened this issue Jan 10, 2025 · 0 comments
Labels

Comments

@lifeiscontent
Copy link
Contributor

lifeiscontent commented Jan 10, 2025

I'm using React Router as a...

framework

Reproduction

Minimal reproduction: https://codesandbox.io/p/devbox/64pkht?file=%2Fvite.config.ts%3A28%2C1

  1. kill server
  2. run pnpm build see it fail

see it work:

  1. comment out these lines:
    build: {
      assetsInlineLimit: 0,
      sourcemap: "hidden",
      rollupOptions: isSsrBuild
        ? {
            input: "./server/app.ts",
          }
        : undefined,
    },

  1. run pnpm build

System Info

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 AMD EPYC
    Memory: 1.70 GB / 4.01 GB
    Container: Yes
    Shell: Unknown
  Binaries:
    Node: 20.12.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.5.0 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/share/npm-global/bin/pnpm
  npmPackages:
    @react-router/dev: ^7.1.1 => 7.1.1 
    @react-router/express: 7.1.1 => 7.1.1 
    @react-router/node: ^7.1.1 => 7.1.1 
    @react-router/serve: ^7.1.1 => 7.1.1 
    react-router: ^7.1.1 => 7.1.1 
    vite: ^5.4.11 => 5.4.11

Used Package Manager

npm

Expected Behavior

able to build with prerender

Actual Behavior

due to customization of the build in Vite, build fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant