diff --git a/src/create-file-node.js b/src/create-file-node.js index 1a696ddad1a73..d9eeef8f9cca3 100644 --- a/src/create-file-node.js +++ b/src/create-file-node.js @@ -18,9 +18,8 @@ exports.createFileNode = async ( ...parsedSlashed, absolutePath: slashed, // Useful for limiting graphql query with certain parent directory - relativeDirectory: path.relative( - pluginOptions.path || process.cwd(), - parsedSlashed.dir + relativeDirectory: slash( + path.relative(pluginOptions.path || process.cwd(), parsedSlashed.dir) ), }