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
Without using any libraries in content-folder, vite compiles everything correctly.
Using any library will give the error:
Failed to resolve import "<Your Library>" from "../content-folder/file1.tsx". Does the file exist?
There is one exception: React.
Imports from React, like useState are fine to use and will not break.
Are you confused too? Do you not believe me (I wouldn't either)? Use the stackblitz with the steps to reproduce below.
Why do I want to do this weird stuff
I have multiple little react applications. I do not want to have to update them seperately.
So I want to create a main repo with all the vite, tailwind, typescript, eslint and other configuration, I can clone as a submodule, so I don't have to keep 5 different projects updated.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
I am very confused. I have the following folder structure:
Without using any libraries in
content-folder
, vite compiles everything correctly.Using any library will give the error:
There is one exception: React.
Imports from React, like
useState
are fine to use and will not break.Are you confused too? Do you not believe me (I wouldn't either)? Use the stackblitz with the steps to reproduce below.
Why do I want to do this weird stuff
I have multiple little react applications. I do not want to have to update them seperately. So I want to create a main repo with all the vite, tailwind, typescript, eslint and other configuration, I can clone as a submodule, so I don't have to keep 5 different projects updated.Reproduction
https://stackblitz.com/edit/vitejs-vite-tjryyi
Steps to reproduce
In the stackblitz, execute the following commands:
Failed to resolve import "iconoir-react" from "../code/App.tsx". Does the file exist?
<QuestionMark />
on line 22 in `code/App.tsxuseState
are correctly resolvedSystem Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: