Skip to content

Commit

Permalink
fix: support cjs modules when loading typography config (#10610)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekhmet authored and DSchau committed Dec 21, 2018
1 parent 93bf83b commit 2f7303d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-typography/src/gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ if (process.env.BUILD_STAGE === `develop`) {
React = require(`react`)
GoogleFont = require(`react-typography`).GoogleFont
// typography links to the file set in "pathToConfigModule"
typography = require(`./.cache/typography.js`).default
const typographyConfig = require(`./.cache/typography.js`)
typography = typographyConfig.default || typographyConfig

exports.onClientEntry = () => {
// Inject the CSS Styles
Expand Down

0 comments on commit 2f7303d

Please sign in to comment.