feat(admin, admin-ui, medusa-js, medusa-react, medusa): Support Admin Extensions (#4761)
Co-authored-by: Rares Stefan <948623+StephixOne@users.noreply.github.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Rares Stefan
Oli Juhl
parent
26c78bbc03
commit
f1a05f4725
@@ -1,9 +1,22 @@
|
||||
import ReactDOM from "react-dom/client"
|
||||
import "./assets/styles/global.css"
|
||||
import MedusaApp from "./medusa-app"
|
||||
import { ExtensionsEntry } from "./types/extensions"
|
||||
|
||||
async function run() {
|
||||
const app = new MedusaApp()
|
||||
let exts: ExtensionsEntry[] = []
|
||||
|
||||
try {
|
||||
const { default: extensions } = (await import(
|
||||
// @ts-ignore - this file is generated at build time
|
||||
"./extensions/_main-entry.ts"
|
||||
)) as { default: ExtensionsEntry[] }
|
||||
exts = extensions
|
||||
} catch (_) {
|
||||
// noop - no extensions
|
||||
}
|
||||
|
||||
const app = new MedusaApp({ entries: exts })
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||
app.render()
|
||||
|
||||
Reference in New Issue
Block a user