Closed parallelmedical closed 3 years ago
We are still in the progress of finalizing the API but here is an example of how it looks like right now:
thanks, i actually just got it working
webpack alias
'dicomViewer': path.join(__dirname, 'src/whiteboardApps/dicom/src/index.tsx'),
then when joining whiteboard rom
let src = () => import('dicomViewer'); const wrapped = async () => { if (typeof src === "function") { const mod = await src(); return "default" in mod ? mod.default : mod; } else { return src; } };
WindowManager.register({kind: "test", src: wrapped})
I've built a custom plugin using this framework however avoided using svelte.
trying to workout how to port to webpack 4 or ability pass netlessapp type for src instead of string.
any guidance on how i would go about doing this?
export type AddAppParams = { kind: string; // app 地址(本地 app 不需要传) src?: string; // 窗口配置 options?: AddAppOptions; // 初始化 attributes attributes?: any; };