fix: Add schema only flag on Medusa app loader (#14502)

* fix(build): Introduce a schema only flag for more heavy light weight loading

* fix(build): cleanup and tests

* Create shy-snails-raise.md

* fix(build): cleanup
This commit is contained in:
Adrien de Peretti
2026-01-09 12:21:28 +01:00
committed by GitHub
parent 66f8fe084c
commit 233ec261be
9 changed files with 243 additions and 20 deletions

View File

@@ -35,7 +35,8 @@ export const initialize = async (
pluginLinksDefinitions?: ModuleJoinerConfig[],
injectedDependencies?: InitializeModuleInjectableDependencies,
cwd?: string,
migrationOnly?: boolean
migrationOnly?: boolean,
schemaOnly?: boolean
): Promise<{ [link: string]: ILinkModule }> => {
const allLinks = {}
const modulesLoadedKeys = MedusaModule.getLoadedModules().map(
@@ -172,6 +173,7 @@ export const initialize = async (
injectedDependencies,
cwd,
migrationOnly,
schemaOnly,
})
allLinks[serviceKey as string] = Object.values(loaded)[0]