Skip to content

Commit

Permalink
Make dotenv-webpack ensure vars in .env.example are populated
Browse files Browse the repository at this point in the history
This will fail builds that don't have these variables, helping us catch
issues with required variables like API keys.
  • Loading branch information
Shadowfiend committed Dec 15, 2021
1 parent f6ea469 commit 332128e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALCHEMY_KEY=
BLOCKNATIVE_API_KEY=
6 changes: 5 additions & 1 deletion webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ const baseConfig: Configuration = {
},
},
plugins: [
new Dotenv({ defaults: true, systemvars: true }),
new Dotenv({
defaults: true,
systemvars: true,
safe: true,
}),
new ForkTsCheckerWebpackPlugin({
typescript: {
diagnosticOptions: {
Expand Down

0 comments on commit 332128e

Please sign in to comment.