How to import types for environment variables loaded from $env
#6544
-
|
I'm trying to use environment variables from |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
You shouldn't have to define anything! Make sure you're using the latest version of SvelteKit and if that doesn't work try restarting the language server or deleting the |
Beta Was this translation helpful? Give feedback.
-
|
I figured out that the types for
|
Beta Was this translation helpful? Give feedback.
I figured out that the types for
$envweren't being imported because I was overridingincludeintsconfig.json. This (new?) note intsconfig.jsonin the SvelteKit skeleton project was the clue:If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes from the referenced tsconfig.json - TypeScript does not merge them in