typescript-react-query failing to parse process.env #5443
-
Description this works for the fetcher To Reproduce Expected behavior const res = await fetch(process.env.ENDPOINT as string, {
...
headers: {apikey:process.env.APIKEY},
...
}); instead produces (note the "" in the headers JSON) const res = await fetch(process.env.ENDPOINT as string, {
...
headers: {"apikey":"process.env.APIKEY"},
...
}); Additional context It is important that generated/committed code should not include API keys / sensitive information for security. Posible solutions
The first would be fast, but not great for security. I haven't thought of a great way to do the latter, but may be willing to submit an issue or PR based on feedback. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@jonathanstanley It seems like an issue, please report this under |
Beta Was this translation helpful? Give feedback.
@jonathanstanley It seems like an issue, please report this under
Issues
section with a reproduction and we'll look into that. Thank you!