diff --git a/babel-plugin-add-module-to-define.js b/babel-plugin-add-module-to-define.js index 2169daed0b2..27794724ab6 100644 --- a/babel-plugin-add-module-to-define.js +++ b/babel-plugin-add-module-to-define.js @@ -72,7 +72,7 @@ module.exports = ({ template, types }) => { var rawContents = fs.readFileSync(file); var subplugins = JSON.parse(rawContents); - for (const [component, path] of Object.entries(subplugins)) { + for (const [component, path] of Object.entries(subplugins.plugintypes)) { if (path) { moodlePlugins[path] = component; } @@ -202,4 +202,4 @@ module.exports = ({ template, types }) => { } } }; -}; \ No newline at end of file +};