diff --git a/client/coral-framework/loaders/plugins-loader.js b/client/coral-framework/loaders/plugins-loader.js index da304cf76..83bdae33b 100644 --- a/client/coral-framework/loaders/plugins-loader.js +++ b/client/coral-framework/loaders/plugins-loader.js @@ -18,11 +18,14 @@ module.exports = function(source) { const config = this.exec(source, this.resourcePath); const plugins = getPluginList(config); - plugins.map(plugin => `{module: require('plugins/${plugin}/client/index.js'), plugin: '${plugin}'}`); + const list = []; + plugins.forEach(plugin => { + list.push(`{module: require('plugins/${plugin}/client/index.js'), plugin: '${plugin}'}`); + }); return stripIndent` module.exports = [ - ${plugins.join(',')} + ${list.join(',')} ]; `; };