Closed
Description
I'm using React Router as a...
framework
Reproduction
Minimal reproduction: https://codesandbox.io/p/devbox/64pkht?file=%2Fvite.config.ts%3A28%2C1
- kill server
- run
pnpm build
see it fail
see it work:
- comment out these lines:
build: {
assetsInlineLimit: 0,
sourcemap: "hidden",
rollupOptions: isSsrBuild
? {
input: "./server/app.ts",
}
: undefined,
},
- 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.