fix(core): avoid expand runtime config everywhere used (#7972)

This commit is contained in:
forehalo
2024-08-26 12:22:52 +00:00
parent 9ea4aaaf37
commit 0209e3fa76
5 changed files with 24 additions and 13 deletions

View File

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