From ae2e2de0e4da03d7a0a662a9cf3af15d26c1e741 Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Thu, 13 May 2021 12:00:24 +0200 Subject: [PATCH] fix(gatsby-plugin-mdx): fix gatsby develop on windows (#31396) --- packages/gatsby-plugin-mdx/loaders/mdx-loader.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/gatsby-plugin-mdx/loaders/mdx-loader.js b/packages/gatsby-plugin-mdx/loaders/mdx-loader.js index fdd574914b074..a602ca833c5a4 100644 --- a/packages/gatsby-plugin-mdx/loaders/mdx-loader.js +++ b/packages/gatsby-plugin-mdx/loaders/mdx-loader.js @@ -113,10 +113,9 @@ module.exports = async function mdxLoader(content) { if (isolateMDXComponent && !resourceQuery.includes(`type=component`)) { const { data } = grayMatter(content) - const requestPath = `/${path.relative( - this.rootContext, - this.resourcePath - )}?type=component` + const requestPath = slash( + `/${path.relative(this.rootContext, this.resourcePath)}?type=component` + ) return callback( null,