feat(dashboard,admin-sdk,admin-shared,admin-vite-plugin): Add support for UI extensions (#7383)
* intial work * update lock * add routes and fix HMR of configs * cleanup * rm imports * rm debug from plugin * address feedback * address feedback
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { InlineConfig } from "vite"
|
||||
import { BundlerOptions } from "../types"
|
||||
import { getViteConfig } from "./config"
|
||||
|
||||
@@ -5,13 +6,10 @@ export async function build(options: BundlerOptions) {
|
||||
const vite = await import("vite")
|
||||
|
||||
const viteConfig = await getViteConfig(options)
|
||||
|
||||
try {
|
||||
await vite.build(
|
||||
vite.mergeConfig(viteConfig, { mode: "production", logLevel: "silent" })
|
||||
)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
throw new Error("Failed to build admin panel")
|
||||
const buildConfig: InlineConfig = {
|
||||
mode: "production",
|
||||
logLevel: "error",
|
||||
}
|
||||
|
||||
await vite.build(vite.mergeConfig(viteConfig, buildConfig))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user