Skip to content

Commit

Permalink
Update config to suit updated package
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyEPhipps committed Apr 4, 2024
1 parent 944258c commit bcd62c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
7 changes: 3 additions & 4 deletions config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const fs = require('fs');
const path = require('path');
const paths = require('./paths');
const dotenv = require('dotenv');

// Make sure that including paths.js after env.js will read .env variables.
delete require.cache[require.resolve('./paths')];
Expand Down Expand Up @@ -32,11 +33,9 @@ var dotenvFiles = [
// https://github.com/motdotla/dotenv-expand
dotenvFiles.forEach(dotenvFile => {
if (fs.existsSync(dotenvFile)) {
require('dotenv-expand')(
require('dotenv').config({
dotenv.config({
path: dotenvFile,
})
);
});
}
});

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"chalk": "2.4.1",
"classnames": "^2.2.5",
"core-js": "^2.5.7",
"dotenv": "5.0.1",
"dotenv-expand": "4.2.0",
"dotenv": "^16.4.5",
"fs-extra": "^11.2.0",
"imagemin-gifsicle": "^6.0.1",
"imagemin-mozjpeg": "^8.0.0",
Expand Down
13 changes: 4 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6478,11 +6478,6 @@ dotenv-defaults@^1.0.2:
dependencies:
dotenv "^6.2.0"

dotenv-expand@4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-4.2.0.tgz#def1f1ca5d6059d24a766e587942c21106ce1275"
integrity sha512-pHWVt6L/YkqbBCMb1hG6e7oO0WdMhlapDIibl+BZ9PncVE3i+G77uvNr8GUxW2ItSituOK8QOYC9oOJjwWD94A==

dotenv-expand@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0"
Expand All @@ -6495,10 +6490,10 @@ dotenv-webpack@^1.7.0:
dependencies:
dotenv-defaults "^1.0.2"

dotenv@5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef"
integrity sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow==
dotenv@^16.4.5:
version "16.4.5"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==

dotenv@^6.2.0:
version "6.2.0"
Expand Down

0 comments on commit bcd62c8

Please sign in to comment.