I'm trying to do this
if (process.env.NODE_ENV === "local") {
links = [authLink, apolloLogger, uploadLink];
}
But am getting this
(property) NodeJS.ProcessEnv.NODE_ENV: "development" | "production" | "test"
This condition will always return 'false' since the types '"development" | "production" | "test"' and '"local"' have no overlap.ts(2367)
This works fine in JS. The NODE_END is a string.
Oddly (I'm using create-react-app) if I use this, it works
REACT_APP_NODE_ENV=local
if (process.env.REACT_APP_NODE_ENV === "local") {
links = [authLink, apolloLogger, uploadLink];
}