You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use Yarn workspaces internally in our React applications to make imports shorter and to make a clearer seperation between business logic and packages that could be separate.
Setting this up with Vite and using optimizeDeps.links seems to work for the most part.
However when we change the import in main.tsx for the <App /> component to import App from '@app/test/App' then vite won't recognize it is an React component.
[vite] failed to parse /@modules/@app/test/App.tsx for import rewrite.
web_1 | If you are using JSX, make sure to named the file with the .jsx extension.
Describe the bug
We use Yarn workspaces internally in our React applications to make imports shorter and to make a clearer seperation between business logic and packages that could be separate.
Setting this up with Vite and using
optimizeDeps.links
seems to work for the most part.However when we change the import in
main.tsx
for the<App />
component toimport App from '@app/test/App'
then vite won't recognize it is an React component.However it will find the file just fine.
Reproduction
https://github.com/henrikbjorn/vite-workspaces-issue
System Info
vite
version: 0.20.8The text was updated successfully, but these errors were encountered: