fix(medusa, modules-sdk, modules): Module loading missing dependencies + remote query reference issue (#5468)
This commit is contained in:
committed by
GitHub
parent
725ba9bb9b
commit
a45da9215d
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
ExternalModuleDeclaration,
|
||||
InternalModuleDeclaration,
|
||||
MODULE_PACKAGE_NAMES,
|
||||
MedusaModule,
|
||||
MODULE_PACKAGE_NAMES,
|
||||
Modules,
|
||||
} from "@medusajs/modules-sdk"
|
||||
import { IProductModuleService, ModulesSdkTypes } from "@medusajs/types"
|
||||
@@ -20,13 +20,15 @@ export const initialize = async (
|
||||
): Promise<IProductModuleService> => {
|
||||
const serviceKey = Modules.PRODUCT
|
||||
|
||||
const loaded = await MedusaModule.bootstrap<IProductModuleService>(
|
||||
serviceKey,
|
||||
MODULE_PACKAGE_NAMES[Modules.PRODUCT],
|
||||
options as InternalModuleDeclaration | ExternalModuleDeclaration,
|
||||
moduleDefinition,
|
||||
injectedDependencies
|
||||
)
|
||||
const loaded = await MedusaModule.bootstrap<IProductModuleService>({
|
||||
moduleKey: serviceKey,
|
||||
defaultPath: MODULE_PACKAGE_NAMES[Modules.PRODUCT],
|
||||
declaration: options as
|
||||
| InternalModuleDeclaration
|
||||
| ExternalModuleDeclaration,
|
||||
injectedDependencies,
|
||||
moduleExports: moduleDefinition,
|
||||
})
|
||||
|
||||
return loaded[serviceKey]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user