How to use environment variable in react-static? #1465
Answered
by
paulnguyen-mn
paulnguyen-mn
asked this question in
General
-
Hi everyone,
I've tried to create |
Beta Was this translation helpful? Give feedback.
Answered by
paulnguyen-mn
Jun 25, 2020
Replies: 1 comment 2 replies
-
Yay, finally I found the answer.
Done, now I can access to environment variables in static.config.js 😉 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
paulnguyen-mn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yay, finally I found the answer.
I need to use
dotenv
package to achieve it.Here is my steps:
dotenv
package:.env
filestatic.config.js
Done, now I can access to environment variables in static.config.js 😉