Open itsezc opened 11 months ago
@ealmloff @jkelleyrtp could this be considered for the 0.6-fullstack milestone?
I think the simplest way to support multi site routing in dioxus is to just run multiple routers on different addresses which you can do in dioxus today. If you want all routers to use the same server function address, you can override the server function address in each router.
Outside of multiple routers, it would be useful to support something like cargo workspace inheritance for Dioxus.toml
settings (although likely not in 0.6)
Specific Demand
Many sites these days consist of the following:
At least this is the case where SaaS, E-commerce and Corporate sites are concerned, often components are shared across these sites to provide users with a consistent experience. Another scenario is providing a slightly different experience based on regions, the use cases are endless and really dependent on the business problem at hand.
Instead of using a monorepo to have multiple Dioxus projects which results in repetitions of configuration (multiple
Dioxus.toml
,tailwind.config.ts
etc.) it would be great if it was possible to extend the router to allow for multiple domains and split routing based on the requested domain.Related:
922
Implement Suggestion
Where file based routing is concerned, not sure if there is an on going specification yet but it would be great if we had the following:
Folder structure for file based routing (if necessary)
Dioxus.toml