fix,build: 환경변수 .env에서 읽어오도록 설정

This commit is contained in:
shinmj
2021-12-29 14:19:38 +09:00
parent bffcc1b31b
commit 8b88384868
2 changed files with 4 additions and 3 deletions

View File

@@ -1,7 +1,9 @@
const { i18n } = require('./next-i18next.config')
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
const { loadEnvConfig } = require('@next/env')
loadEnvConfig('./', process.env.NODE_ENV !== 'production')
const port = process.env.PORT
const port = process.env.PORT || 3000
const serverApiUrl = process.env.SERVER_API_URL || 'http://localhost:8000'
const siteId = process.env.SITE_ID || '3'
const mode = siteId === '2' ? 'lg' : siteId === '3' ? 'sm' : 'sm'