-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
For convenience and convention, react router bundles all your server code into one (or one per route) bundle.
That means dev and production code are not available in the exact same way, and make it difficult to have other entry points that can consume shared domain code.
For example, adding a CLI entry point to the project that can consume services, or having a custom server entry point that can check environment variables without duplicating the logic, is challenging.
I have worked around this in some ways, but I think the right solution would be to keep the bare minimum BE code inside the react-router bundles, and make it access the rest of the non-bundled domain code as if it was an external package.
Then, it would be possible to import from there in non-react-router scenarios.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status