From 5f6ad1677917700277eb72246c153946ef888f6f Mon Sep 17 00:00:00 2001 From: Sidhartha Chatterjee Date: Fri, 23 Aug 2019 05:50:01 +0530 Subject: [PATCH] update check for default exports --- packages/gatsby/src/redux/actions/public.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/gatsby/src/redux/actions/public.js b/packages/gatsby/src/redux/actions/public.js index 15ec401fcb768..83fd995d570a4 100644 --- a/packages/gatsby/src/redux/actions/public.js +++ b/packages/gatsby/src/redux/actions/public.js @@ -359,6 +359,7 @@ ${reservedFields.map(f => ` * "${f}"`).join(`\n`)} !fileContent.includes(`export default`) && !fileContent.includes(`module.exports`) && !fileContent.includes(`exports.default`) && + !fileContent.includes(`exports["default"]`) && // this check only applies to js and ts, not mdx /\.(jsx?|tsx?)/.test(path.extname(fileName)) ) {