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
$env
weren't being imported because I was overridinginclude
intsconfig.json
. This (new?) note intsconfig.json
in 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