ssr: false
: build script creates a server bundle and deletes it
#12641
Labels
ssr: false
: build script creates a server bundle and deletes it
#12641
I'm using React Router as a...
framework
Reproduction
Prior to v7, we used v6 and component routes. After upgrading to v7 as a framework and setting
ssr: false
, we faced some problems including:@mui/icons-material
imports started to fail. So we added this tovite.config.ts
:@mui/utils
(this is used in@mui
packages' internals).We currently have solved this issue by using the current
vite.config.ts
:ErrorBoundary
when facing 404 error. It complains about the unavailability of browser globals such as local storage. I had assumed that upgrading to v7 and using the SPA mode would be seamless. I have set SSR to false and yet I am facing problems here and there regarding SSR in the prod and dev environments.System Info
Used Package Manager
pnpm
Expected Behavior
Having a complete client-side router that gives us the option of using file-based routing, in case
ssr: false
.Actual Behavior
Server bundle generation during build, and import resolution errors that didn't exist with v6.
The text was updated successfully, but these errors were encountered: