✨ frontend add
This commit is contained in:
26
frontend/portal/next.config.js
Normal file
26
frontend/portal/next.config.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const { i18n } = require('./next-i18next.config')
|
||||
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
|
||||
|
||||
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'
|
||||
|
||||
module.exports = {
|
||||
i18n,
|
||||
env: {
|
||||
PORT: port,
|
||||
PROXY_HOST: process.env.PROXY_HOST || `http://localhost:${port}`,
|
||||
MODE: mode,
|
||||
SERVER_API_URL: serverApiUrl,
|
||||
SITE_ID: siteId,
|
||||
},
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/server/:path*',
|
||||
destination: `${serverApiUrl}/:path*`,
|
||||
},
|
||||
]
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user