All Questions
3 questions
9
votes
1
answer
8k
views
Is it secure to expose secret keys to a next.js app via environment variables?
As I take it, environment variables prefixed with NEXT_PUBLIC_ will be substituted by their respective values in the resulting bundle.
Is it safe to supply things like API keys, OAuth secrets and the ...
4
votes
1
answer
3k
views
Access Environment Variables from SASS in Next.JS
I am trying to add a variable to my scss files, referenced to .env variable. To achieve this, I've read a few tutorials, and I found this. I need to add this configuration to my next.config.js
const ...
1
vote
2
answers
598
views
How do I setup environment variables for multiple environments?
I have a Next.js application and I have currently got this next.config.js setup to access my .env file when working locally, which works fine:
// Initialize doteenv library
require("dotenv").config();...