Using framework mode within a monorepo leads to being unable to import vite configuration from a package #10719
Unanswered
joepurnell1
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have a complicated monorepo structure where we use packages to pull certain configuration for different application usages. Roughly we have a structure like this:
The application level vite config relies on the shared package's react.vite.config which in turn has dependencies on the other packages. This is due to needing to reuse some application level configuration and content configuration across multiple applications.
The configuration files use aliases established withing the tsconfig rather than using absolute file paths.
When we updated the repository from webpack to vite prior to performing the upgrade to react-router framework mode we got this setup working using
vite-tsconfig-paths
coupled with the vite cli flag--configLoader runner
.Moving to react-router framework and using the
react-router dev
command results in a module not found error while trying to resolve the aliases between packages (and from the config file itself).Has anybody encountered similar issues before or has already established using packages within configuration and can give any tips or pointers?
Beta Was this translation helpful? Give feedback.
All reactions