chore: lazy import admin-bundler and run scripts during publish (#10996)
This commit is contained in:
5
.changeset/thick-books-walk.md
Normal file
5
.changeset/thick-books-walk.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
chore: lazy import admin-bundler and run scripts during publish
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ export default async function localPublishPlugin({
|
||||
directory: string
|
||||
}) {
|
||||
await yalc.publishPackage({
|
||||
push: true,
|
||||
workingDir: directory,
|
||||
changed: true,
|
||||
replace: true,
|
||||
scripts: true,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user