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.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/b594b262-89ea-49fd-8e47-4afe005bd6fdn%40googlegroups.com.

Reply via email to