mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-09-20 16:07:33 +03:00
build: enable next server (#2992)
This commit is contained in:
parent
32692bd54a
commit
7f89b197da
@ -45,17 +45,12 @@ if (process.env.COVERAGE === 'true') {
|
||||
}
|
||||
|
||||
const profileTarget = {
|
||||
ac: '100.85.73.88:12001',
|
||||
dev: '100.84.105.99:11001',
|
||||
test: '100.84.105.99:11001',
|
||||
stage: '',
|
||||
prod: 'https://app.affine.pro',
|
||||
local: '127.0.0.1:3000',
|
||||
};
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: 'export',
|
||||
output: process.env.NODE_ENV === 'development' ? 'standalone' : 'export',
|
||||
typescript: {
|
||||
// We use `yarn typecheck` on top level to check types
|
||||
ignoreBuildErrors: true,
|
||||
@ -109,9 +104,7 @@ const nextConfig = {
|
||||
BUILD_DATE: new Date().toISOString(),
|
||||
gitVersion: getGitVersion(),
|
||||
hash: getCommitHash(),
|
||||
serverAPI:
|
||||
profileTarget[process.env.API_SERVER_PROFILE || 'dev'] ??
|
||||
profileTarget.dev,
|
||||
serverAPI: profileTarget.local,
|
||||
editorFlags: blockSuiteFeatureFlags,
|
||||
...buildFlags,
|
||||
},
|
||||
@ -157,6 +150,15 @@ const nextConfig = {
|
||||
],
|
||||
};
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
nextConfig.rewrites = async () => [
|
||||
{
|
||||
source: '/api/auth/:path*/:path2*',
|
||||
destination: 'http://localhost:3010/api/auth/:path*/:path2*',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
const baseDir = process.env.LOCAL_BLOCK_SUITE ?? '/';
|
||||
const withDebugLocal = debugLocal(
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user