diff --git a/packages/gatsby-plugin-mdx/loaders/mdx-scopes.js b/packages/gatsby-plugin-mdx/loaders/mdx-scopes.js index d67ebf177fed3..0f873ce403209 100644 --- a/packages/gatsby-plugin-mdx/loaders/mdx-scopes.js +++ b/packages/gatsby-plugin-mdx/loaders/mdx-scopes.js @@ -12,7 +12,7 @@ module.exports = function() { files .map( (file, i) => - `const scope_${i} = require('${slash( + `var scope_${i} = require('${slash( path.join(abs, file) )}').default;` )