Created
November 8, 2022 07:44
-
-
Save szymonkorytnicki/98678b127eba3283c4f5a70e774cfffd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// works, get replaced in build time | |
const someVar = process.env.MY_VARIABLE; | |
// doesn't work! How should Next know how to replace it in build time? | |
function getVariable(name) { | |
return process.env[name]; | |
} | |
const someVar = getVariable(MY_VARIABLE); | |
// try this! | |
console.log(process.env); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment