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",