Hi,
I have an Angular app (let's name it "B") which runs either standalone or in another "container" as a web component with ng elements (let's name the container "A").
The application (B) might load a module lazily (let's call this module "C"). The module contains / runs a Vue app. The Vue runtime _might_ be already provided (by A, if the Angular app runs in that container).
So what I want to do: just load the Vue runtime if necessary. I thought that should be possible with a dynamic import, but cannot get this running.
The idea:
===
if (!window['Vue']) {
import(....)...
}
===
- is this generally possible?
- some webpack magic required?
- do I need to add this snippet in the module or in the component?
- any hints how to do this?
Thank you!
BTW: Stack: ng 11, Vue 2.6.x. esnext already configured.