chore: lazy import admin-bundler and run scripts during publish (#10996)

This commit is contained in:
Harminder Virk
2025-01-16 20:28:17 +05:30
committed by GitHub
parent 9a742911fe
commit 114b2133aa
3 changed files with 8 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
chore: lazy import admin-bundler and run scripts during publish

View File

@@ -1,4 +1,3 @@
import { plugin } from "@medusajs/admin-bundler"
import { Compiler } from "@medusajs/framework/build-tools"
import { logger } from "@medusajs/framework/logger"
export default async function build({
@@ -15,9 +14,8 @@ export default async function build({
return false
}
const bundler = await import("@medusajs/admin-bundler")
await compiler.buildPluginBackend(tsConfig)
await compiler.buildPluginAdminExtensions({
plugin,
})
await compiler.buildPluginAdminExtensions(bundler)
return true
}

View File

@@ -9,9 +9,9 @@ export default async function localPublishPlugin({
directory: string
}) {
await yalc.publishPackage({
push: true,
workingDir: directory,
changed: true,
replace: true,
scripts: true,
})
}