Closed
Description
Describe the bug
A basic vite + react + react-router app works in dev but breaks in prod
DEV:
Also the build breaks if the command is run using pnpm:
Aliases are also not recognized if experimental.enableNativePlugin is true
Reproduction
https://codesandbox.io/p/github/Thiagolino8/repro/main
Steps to reproduce
Run npm install
, npm run build
and npm run preview
System Info
System:
OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1355U
Memory: 6.24 GB / 15.31 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 24.1.0 - /run/user/1846332781/fnm_multishells/101596_1748953649673/bin/node
npm: 11.3.0 - /run/user/1846332781/fnm_multishells/101596_1748953649673/bin/npm
pnpm: 10.11.0 - /run/user/1846332781/fnm_multishells/101596_1748953649673/bin/pnpm
bun: 1.2.15 - ~/.bun/bin/bun
npmPackages:
@vitejs/plugin-react: ^4.5.0 => 4.5.1
rolldown-vite: 6.3.16
Used Package Manager
npm
Logs
npm run preview browser console
Error handled by React Router default ErrorBoundary: TypeError: e is not a functionValidations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs and the Rolldown-related guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.