diff --git a/packages/runtime/src/module/index.ts b/packages/runtime/src/module/index.ts index 81d2192beb1..0b27aa4ac07 100644 --- a/packages/runtime/src/module/index.ts +++ b/packages/runtime/src/module/index.ts @@ -137,7 +137,11 @@ class Module { id: string, ) { function defineModuleId(res: any, id: string) { - if (res && typeof res === 'object') { + if ( + res && + typeof res === 'object' && + !Object.getOwnPropertyDescriptor(res, Symbol.for('mf_module_id')) + ) { Object.defineProperty(res, Symbol.for('mf_module_id'), { value: id, enumerable: false,