Plugins: Optionally preload some plugins during frontend app boot (#15266)

* auto load

* update comments

* gofmt

* use preload from json

* fix formatting

* change general plugin loader to app

* Refactoring: Plugin preloading #15266
This commit is contained in:
Ryan McKinley
2019-04-10 23:02:22 -07:00
committed by Torkel Ödegaard
parent 5e48750868
commit d6887bf77f
6 changed files with 27 additions and 1 deletions

View File

@@ -141,7 +141,7 @@ for (const flotDep of flotDeps) {
exposeToPlugin(flotDep, { fakeDep: 1 });
}
function importPluginModule(path: string): Promise<any> {
export function importPluginModule(path: string): Promise<any> {
const builtIn = builtInPlugins[path];
if (builtIn) {
return Promise.resolve(builtIn);