remoteEntry for PureScript, can be only loaded in body #13303
-
|
Hello, I'm trying to integrate small PureScript application in my Angular project. Problem is that, whenever I load remoteEntry and get a module with loadRemoteModule(), I'm only getting module.main() method and not module.default(), which I get from Svelte or Angular builds. Problem is that with using main(), it doesn't check for target parameter and loads the micro frontend module directly into the body. When I use module.default(), for example with Svelte micro frontend app and pass object with target option, which contains element reference, that small application gets rendered in the target element, using main, it doesn't work like that. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I fixed this issue by editing my Main.purs file from here - I've added a function So it looks something like this: |
Beta Was this translation helpful? Give feedback.
I fixed this issue by editing my Main.purs file from here -
I've added a function
defaultwhich accepts Element as an argument, so now when I load the module, I can domodule.default(ElementRef)and application will be loaded in the desired element.So it looks something like this: