OmgItsKuei
CDCloudflare Developers
•Created by OmgItsKuei on 3/7/2025 in #pages-help
React-Vite project how to have multiple pages?
I want to make mydomain.com able to also navigate to child pages at various url segments.
Current:
mydomain.com
Goal:
mydomain.com
mydomain.com/contact
mydomain.com/about
mydomain.com/about/founders
..etc other url segments
Do NOT want variables in url segments/No dynamic url segments like:
mydomain.com/products/1 ❌
mydomain.com/products/2 ❌
mydomain.com/products/3 ❌ So far I tried configuring Vite to have multiple rollupOptions.input but didn't get it to build correctly, need to spend more time to figure that out but also not sure if that's the right approach. And I tried installing react-router 7 as a library and that builds and runs correctly locally but bricks build when deployed to Cloudflare Pages with errors about no Wrangler.tomal What should I do to get /contact and /about etc to work for my Cloudflare Pages React + Vite? Still plan on keeping it static/no backend/no db.
mydomain.com/products/3 ❌ So far I tried configuring Vite to have multiple rollupOptions.input but didn't get it to build correctly, need to spend more time to figure that out but also not sure if that's the right approach. And I tried installing react-router 7 as a library and that builds and runs correctly locally but bricks build when deployed to Cloudflare Pages with errors about no Wrangler.tomal What should I do to get /contact and /about etc to work for my Cloudflare Pages React + Vite? Still plan on keeping it static/no backend/no db.
7 replies