fix(ecs): resolve ESM require is not defined error (#402)
- Add RuntimeConfig module as standalone runtime environment storage - Core.runtimeEnvironment and Scene.runtimeEnvironment now read from RuntimeConfig - Remove require() call in Scene.ts to fix Node.js ESM compatibility Fixes ReferenceError: require is not defined when using scene.isServer in ESM environment
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
// 核心模块
|
||||
export { Core } from './Core';
|
||||
export { RuntimeConfig } from './RuntimeConfig';
|
||||
export { ServiceContainer, ServiceLifetime } from './Core/ServiceContainer';
|
||||
export type { IService, ServiceType, ServiceIdentifier } from './Core/ServiceContainer';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user