Skip to content

Commit

Permalink
Fix missing ENV vars (caused SSR to crash)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadorequest committed Jun 4, 2020
1 parent 9ed7711 commit 44e8060
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ console.debug(`Building Next with NODE_ENV="${process.env.NODE_ENV}" NEXT_PUBLIC
module.exports = withBundleAnalyzer(withSourceMaps({
// target: 'serverless', // Automatically enabled on Vercel, you may need to manually opt-in if you're not using Vercel - See https://nextjs.org/docs/api-reference/next.config.js/build-target#serverless-target
env: {
// XXX All env variables defined in ".env*" files that aren't public (don't start with "NEXT_PUBLIC_") must manually be made available at build time below
// XXX All env variables defined in ".env*" files that aren't public (don't start with "NEXT_PUBLIC_") MUST manually be made available at build time below
// They're necessary locally and on Vercel for runtime execution (SSR, SSG with revalidate, everything that happens server-side will need those)
// See https://nextjs.org/docs/api-reference/next.config.js/environment-variables
// XXX Duplication of the environment variables, this is only used locally
// while now.json:build:env will be used on the Now platform (See https://vercel.com/docs/v2/build-step/#providing-environment-variables)
AIRTABLE_API_KEY: process.env.AIRTABLE_API_KEY,
AIRTABLE_BASE_ID: process.env.AIRTABLE_BASE_ID,
LOCIZE_API_KEY: process.env.LOCIZE_API_KEY,
SENTRY_DSN: process.env.SENTRY_DSN,

Expand Down

0 comments on commit 44e8060

Please sign in to comment.