Skip to content

Commit 799f657

Browse files
stefanprobstsidharthachatterjee
authored andcommitted
fix(gatsby-source-filesystem): Use forward slashes on relative… (#17048)
1 parent dcf8958 commit 799f657

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/gatsby-source-filesystem/src/create-file-node.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ exports.createFileNode = async (
1818
...parsedSlashed,
1919
absolutePath: slashed,
2020
// Useful for limiting graphql query with certain parent directory
21-
relativeDirectory: path.relative(
22-
pluginOptions.path || process.cwd(),
23-
parsedSlashed.dir
21+
relativeDirectory: slash(
22+
path.relative(pluginOptions.path || process.cwd(), parsedSlashed.dir)
2423
),
2524
}
2625

0 commit comments

Comments
 (0)