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

client/packages/lowcoder/src/appView/bootstrapAt.tsx

Lines changed: 2 additions & 2 deletions
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
}

client/packages/lowcoder/src/comps/comps/customComp/customComp.tsx

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy