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
Here are some quick steps to reproduce. If I had more time I'd provide a more stripped-down example.
Make a new app from a vite template. The react-ts template sets up an app that uses tsconfig files with references.
yarn create vite my-app --template react-ts
cd my-app
yarn
Open it in VSCode and open ./src/main.tsx. You'll see this error:
Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.typescript(2584)
❗ This issue does not show up when the civet VSCode extension is disabled.
Be confused because ./tsconfig.app.json does include the dom in the lib compiler option and no changes to ./tsconfig.app.json seem to have any effect.
Fix the problem by moving ./tsconfig.app.json to ./src/tsconfig.json and updating reference to it in ./tsconfig.json
Open ./src/main.tsx and observe the problem is fixed. (there are other problems, but those can be addressed by updating civet config and/or ./src/tsconfig.json.)
The text was updated successfully, but these errors were encountered:
Thanks for the report! I'll need to study exactly how references is supposed to work. If you (or anyone else) has cycles to work on this, it'd be much appreciated.
Here are some quick steps to reproduce. If I had more time I'd provide a more stripped-down example.
yarn create vite my-app --template react-ts cd my-app yarn
./src/main.tsx
. You'll see this error:❗ This issue does not show up when the civet VSCode extension is disabled.
Be confused because
./tsconfig.app.json
does include thedom
in thelib
compiler option and no changes to./tsconfig.app.json
seem to have any effect.Fix the problem by moving
./tsconfig.app.json
to./src/tsconfig.json
and updating reference to it in./tsconfig.json
Open
./src/main.tsx
and observe the problem is fixed. (there are other problems, but those can be addressed by updating civet config and/or./src/tsconfig.json
.)The text was updated successfully, but these errors were encountered: