refactor: avoid runtime config object (#8202)

This commit is contained in:
forehalo
2024-09-13 07:27:11 +00:00
parent c76b4d70b0
commit 25969a34e8
45 changed files with 117 additions and 156 deletions

View File

@@ -1,14 +1,12 @@
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,
})
);
globalThis.BUILD_CONFIG = getRuntimeConfig({
distribution: 'web',
mode: 'development',
channel: 'canary',
static: false,
});
if (typeof window !== 'undefined') {
window.location.search = '?prefixUrl=http://127.0.0.1:3010/';