How do you handle two versions of an application?
I'm working on the UI of an opensource backup software using among other things tanstack router, react and vite. We want to create a commercial version of the UI which has 1/ the same routes with different contents and 2/ more routes, only available for the commercial release.
For 1/, I can simply rely on a feature flag and on dead code elimination to have a different build between the commercial and the OSS versions.
However, what's the best way for 2/?
My first attempt is to put all my commercial views in a
and initialize the router with:
Is it the way to go, or are there alternatives to consider?
For 1/, I can simply rely on a feature flag and on dead code elimination to have a different build between the commercial and the OSS versions.
However, what's the best way for 2/?
My first attempt is to put all my commercial views in a
src/routes/_commercial, configure tanstack router with:and initialize the router with:
Is it the way to go, or are there alternatives to consider?