Browse Source

fix: attempt to fix windows issues with example code snippets (#1385)

This PR may (!?) fix the issue with windows support the GraphQL query
not running. Will need to be validated by someone on Windows, but this
_seems_ like it'll work.
main
Dustin Schau 6 years ago
committed by Dan Abramov
parent
commit
96398fd271
  1. 5
      plugins/gatsby-transformer-home-example-code/gatsby-node.js

5
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);

Loading…
Cancel
Save