diff --git a/plugins/gatsby-transformer-home-example-code/gatsby-node.js b/plugins/gatsby-transformer-home-example-code/gatsby-node.js index 5965a3ba..4e273ce2 100644 --- a/plugins/gatsby-transformer-home-example-code/gatsby-node.js +++ b/plugins/gatsby-transformer-home-example-code/gatsby-node.js @@ -1,4 +1,5 @@ -const crypto = require(`crypto`); +const crypto = require('crypto'); +const path = require('path'); const createContentDigest = obj => crypto @@ -14,7 +15,7 @@ exports.onCreateNode = async ({actions, node, loadNodeContent}) => { if ( sourceInstanceName === 'content' && - relativeDirectory === 'home/examples' && + relativeDirectory === path.join('home', 'examples') && ext === '.js' ) { const code = await loadNodeContent(node);