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.
This commit is contained in:
Dustin Schau
2018-11-09 09:54:54 -08:00
committed by Dan Abramov
parent 333656c363
commit 96398fd271

View File

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