Typed Env in Turborepo
Answered
Nile tilapia posted this in #help-forum
Nile tilapiaOP
I created a Turborepo repo, use Next.js'
typedEnv feature. Used workspace Typescript version and the .next/types/env.d.ts file got generated but intellisense still doesn't suggest env vars. A brand new repo created from create-next-app works fine, but not Turborepo.Answered by Nile tilapia
SOLVED: changed from
to
in
"include": [
"**/*.ts",
"**/*.tsx",
"next-env.d.ts",
"next.config.js",
".next/types/**/*.ts"
],to
"include": [
"**/*.ts",
"**/*.tsx",
"next-env.d.ts",
"next.config.js",
".next/types/**/*.ts",
".next/dev/types/**/*.ts" // added
],in
tsconfig.json1 Reply
Nile tilapiaOP
SOLVED: changed from
to
in
"include": [
"**/*.ts",
"**/*.tsx",
"next-env.d.ts",
"next.config.js",
".next/types/**/*.ts"
],to
"include": [
"**/*.ts",
"**/*.tsx",
"next-env.d.ts",
"next.config.js",
".next/types/**/*.ts",
".next/dev/types/**/*.ts" // added
],in
tsconfig.jsonAnswer