Replies: 1 comment 2 replies
-
I also encountered a similar issue. When adding any child route, the development environment still works fine, but the production environment always returns a blank page. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In development mode (after running
npm start
), all routes are performing as expected.After running
npm run build && npm run preview
, in preview or production mode, the routing fails without any error or warning.I'm sharing a few code snippets which should be useful to determine the root cause.
To simplify, I tested this:
This code works fine in both dev and after build.
However, after I add children to any of the routes, will work fine only in dev mode, while after build an empty page is displayed.
Furthermore, after build, the parent element is not displayed.
And this is the
vite.config.mts
code:Any suggestions to what could cause this behavior?
Beta Was this translation helpful? Give feedback.
All reactions