Basically i want to create a dynamic plugin system. I need to be able to deploy new plugins without having to redeploy the main plugin system.
Basically if I was to use SystemJS i could just do something like
System.import(url).then(plugin => {
this.createComponent(plugin.default);
});
url
being the dynamic thing - could read this from a db or config, etc.
The above could would work - except i use the Angular CLI, which uses Webpack. Using the CLI is a choice made to simply the whole project - so I'm stuck with Webpack and the CLI.
Since the Angular CLI does a lot of abstraction, I can't modify the webpack config (well I can, but then i have to maintain it manually, which again would break the simplicity).
Webpack is not a module loading, but a bundler - meaning it is supposed to know these modules beforehand, and i can't just drop a new module somewhere and update the config for it to load it dynamically.
What would my options be here?
EDIT: Webpack has its own System.import, but it has some checking to see if the url is static or dynamic. I could live with passing a static folder and having to drop plugins into that folder - that just doesn't seem to work from anywhere but inside the application itself.
entryComponents
when loading components dynamically ? – Milad