Skip to content

Commit

Permalink
fix(gatsby): support export { X as default } syntax when checking i…
Browse files Browse the repository at this point in the history
…f page template files have default export (#17752)
  • Loading branch information
Schmavery authored and pieh committed Sep 20, 2019
1 parent cc0d4ca commit b785583
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/gatsby/src/redux/actions/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ ${reservedFields.map(f => ` * "${f}"`).join(`\n`)}
!fileContent.includes(`module.exports`) &&
!fileContent.includes(`exports.default`) &&
!fileContent.includes(`exports["default"]`) &&
!fileContent.match(/export \{.* as default.*\}/s) &&
// this check only applies to js and ts, not mdx
/\.(jsx?|tsx?)/.test(path.extname(fileName))
) {
Expand Down

0 comments on commit b785583

Please sign in to comment.