Skip to content

Commit

Permalink
better etection of production env
Browse files Browse the repository at this point in the history
  • Loading branch information
jesstelford committed May 31, 2021
1 parent 6939493 commit 9f73796
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions next.config.js
@@ -1,8 +1,9 @@
// From https://spectrum.chat/zeit/general/unable-to-import-module-now-launcher-error~2662f0ba-4186-402f-b1db-2e3c43d8689a?m=MTU0MjcyOTQ3NzkxMQ==
const { PHASE_PRODUCTION_SERVER } =
process.env.NODE_ENV === 'development'
? {}
: require('next-server/constants');
: !process.env.NOW_REGION
? require('next/constants')
: require('next-server/constants');

module.exports = (phase, { defaultConfig }) => {
if (phase === PHASE_PRODUCTION_SERVER) {
Expand Down

0 comments on commit 9f73796

Please sign in to comment.