Skip to content

Commit 97714df

Browse files
committed
Fix .env context
New dotenv lib stores parsed configs under “parsed” key.
1 parent 37ebdd9 commit 97714df

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build/tasks/app-pages.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,12 @@ function getPageContextExternal(file) {
166166
// Environmental variables
167167
env = dotenv.config({
168168
path: path.resolve(config.rootDir, '.env')
169-
});
169+
}) || {};
170+
171+
env.parsed = env.parsed || {};
170172

171173
//
172-
extend(context, env);
174+
extend(context, env.parsed);
173175

174176
// Package data
175177
context.pkg = require('../../package.json');

0 commit comments

Comments
 (0)