Skip to content

Commit 13dd1f6

Browse files
fixed embedded apps with custom comps not working
1 parent 232bed3 commit 13dd1f6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: client/packages/lowcoder/src/appView/bootstrapAt.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { loadComps } from "comps";
22
import type { AppViewInstanceOptions } from "./AppViewInstance";
33
import { createRoot } from "react-dom/client";
44

5-
loadComps();
6-
75
export async function bootstrapAppAt<I>(
86
appId: string,
97
node: Element | null,
@@ -14,6 +12,8 @@ export async function bootstrapAppAt<I>(
1412
return;
1513
}
1614

15+
loadComps();
16+
1717
const { AppViewInstance } = await import("./AppViewInstance");
1818
return new AppViewInstance(appId, node, createRoot(node), options);
1919
}

Diff for: client/packages/lowcoder/src/comps/comps/customComp/customComp.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ function InnerCustomComponent(props: IProps) {
191191
iframe.addEventListener("load", handleIFrameLoad);
192192

193193
// in dev, load from sdk bundle and on prod load from build package
194-
const src = import.meta.env.DEV
194+
const src = (REACT_APP_BUNDLE_TYPE && REACT_APP_BUNDLE_TYPE === 'sdk')
195+
|| (import.meta.env && import.meta.env.DEV)
195196
? trans('customComponent.entryUrl')
196197
: `${window.location.origin}/custom_component/custom_component.html`;
197198

0 commit comments

Comments
 (0)