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
I attempted an upgrade to vite 2.4.0-beta.0, and I've now started to get two types of typescript errors which I did not have before.
CSS imports:
src/screens/login/Login.tsx:11:20 - error TS2307: Cannot find module './Login.module.css' or its corresponding type declarations.
11 import styles from './Login.module.css';
And
src/index.tsx:6:33 - error TS2339: Property 'env' does not exist on type 'ImportMeta'.
6 const environment = import.meta.env.MODE;
I have "types": ["vite/client"], in my tsconfig.json, but the vite client types don't seem to be picked up. I get Cannot find type definition file for 'vite/client'.
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 https://github.com/vuejs/vue-next instead.
Describe the bug
I attempted an upgrade to vite 2.4.0-beta.0, and I've now started to get two types of typescript errors which I did not have before.
CSS imports:
And
I have
"types": ["vite/client"],
in mytsconfig.json
, but the vite client types don't seem to be picked up. I getCannot find type definition file for 'vite/client'.
Reproduction
https://codesandbox.io/s/frosty-platform-3i81r?file=/src/index.tsx
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: