diff --git a/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts b/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts index 317386800a..ee478a690f 100644 --- a/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts +++ b/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts @@ -161,11 +161,16 @@ export class ApiServer { const registry = new PluginRegistry({ plugins: [] }); const { logLevel } = this.options.config; this.log.info(`Instantiated empty registry, invoking plugin factories...`); + for (const pluginImport of this.options.config.plugins) { const { packageName, options } = pluginImport; this.log.info(`Creating plugin from package: ${packageName}`, options); const pluginOptions = { ...options, logLevel, pluginRegistry: registry }; - const { createPluginFactory } = await import(packageName); + + const { + createPluginFactory, + } = require(/* webpackIgnore: true */ packageName); + const pluginFactory: PluginFactory< ICactusPlugin, any diff --git a/tsconfig.json b/tsconfig.json index 7a41d4499b..07ec0c3051 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,7 +22,7 @@ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ + "removeComments": false, /* Do not emit comments to output. */ // "noEmit": true, /* Do not emit outputs. */ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */