We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1e6aea commit 26feae4Copy full SHA for 26feae4
packages/gatsby/src/internal-plugins/functions/api-function-webpack-loader.ts
@@ -1,10 +1,11 @@
1
+import { slash } from "gatsby-core-utils"
2
import type { LoaderDefinition } from "webpack"
3
4
const APIFunctionLoader: LoaderDefinition = async function () {
5
const params = new URLSearchParams(this.resourceQuery)
6
const matchPath = params.get(`matchPath`)
7
- const modulePath = this.resourcePath
8
+ const modulePath = slash(this.resourcePath)
9
10
return /* javascript */ `
11
const preferDefault = m => (m && m.default) || m
0 commit comments