We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5931f9d commit e078811Copy full SHA for e078811
rollup.config.js
@@ -12,10 +12,10 @@ import path from 'path'
12
13
dotenv.config()
14
15
+const fileEnv = process.env.NODE_ENV ? `.env.${process.env.NODE_ENV}` : '.env'
16
+
17
// get the env variables from the .env file relative to the current NODE_ENV
-const ENV_VARS = dotenv.parse(
- fs.readFileSync(path.resolve(__dirname, `.env.${process.env.NODE_ENV}`))
18
-)
+const ENV_VARS = dotenv.parse(fs.readFileSync(path.resolve(__dirname, fileEnv)))
19
20
const valuesEnvToReplace = () => {
21
return Object.entries(ENV_VARS).reduce((acc, [key, val]) => {
0 commit comments