AFFiNE/scripts/setup/global.ts
2024-09-10 04:03:59 +00:00

18 lines
412 B
TypeScript

import { getRuntimeConfig } from '@affine/cli/src/webpack/runtime-config';
import { setupGlobal } from '@affine/env/global';
process.env.RUNTIME_CONFIG = JSON.stringify(
getRuntimeConfig({
distribution: 'web',
mode: 'development',
channel: 'canary',
static: false,
})
);
if (typeof window !== 'undefined') {
window.location.search = '?prefixUrl=http://127.0.0.1:3010/';
}
setupGlobal();