mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 03:42:14 +00:00
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:
committed by
Dan Abramov
parent
333656c363
commit
96398fd271
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user