From 8b88384868bce70eec4d4efbffecacf18d156dcb Mon Sep 17 00:00:00 2001 From: shinmj Date: Wed, 29 Dec 2021 14:19:38 +0900 Subject: [PATCH] =?UTF-8?q?fix,build:=20=ED=99=98=EA=B2=BD=EB=B3=80?= =?UTF-8?q?=EC=88=98=20.env=EC=97=90=EC=84=9C=20=EC=9D=BD=EC=96=B4?= =?UTF-8?q?=EC=98=A4=EB=8F=84=EB=A1=9D=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/portal/next.config.js | 4 +++- frontend/portal/package.json | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/portal/next.config.js b/frontend/portal/next.config.js index 502e4c9..ad01083 100644 --- a/frontend/portal/next.config.js +++ b/frontend/portal/next.config.js @@ -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' diff --git a/frontend/portal/package.json b/frontend/portal/package.json index 5c2690d..adfa64e 100644 --- a/frontend/portal/package.json +++ b/frontend/portal/package.json @@ -7,7 +7,7 @@ "npm": "6.14.7" }, "scripts": { - "dev": "cross-env next dev -p ${PORT-3000}", + "dev": "next dev", "dev:sm": "SITE_ID=3 npm run dev", "dev:lg": "SITE_ID=2 npm run dev", "dev:smWin": "set SITE_ID=3&&npm run dev", @@ -35,7 +35,6 @@ "axios": "^0.21.1", "cookies": "^0.8.0", "cors": "^2.8.5", - "cross-env": "^7.0.3", "date-fns": "^2.23.0", "date-fns-tz": "^1.1.6", "eventsource": "^1.1.0",