Skip to content

Commit

Permalink
fix(gatsby-plugin-mdx): Fix Safari 9 const syntax error (#15644)
Browse files Browse the repository at this point in the history
`SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.`

Gatsby sites using mdx break in Safari 9 (possibly other older browsers) because it's using es6 `const`.
  • Loading branch information
1-800-jono authored and pieh committed Jul 12, 2019
1 parent bfc2891 commit a823463
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-mdx/loaders/mdx-scopes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;`
)
Expand Down

0 comments on commit a823463

Please sign in to comment.