Skip to content

Commit

Permalink
fix(gatsby): fix api function compilation on Windows (#38489)
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Aug 28, 2023
1 parent d1e6aea commit 26feae4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { slash } from "gatsby-core-utils"
import type { LoaderDefinition } from "webpack"

const APIFunctionLoader: LoaderDefinition = async function () {
const params = new URLSearchParams(this.resourceQuery)
const matchPath = params.get(`matchPath`)

const modulePath = this.resourcePath
const modulePath = slash(this.resourcePath)

return /* javascript */ `
const preferDefault = m => (m && m.default) || m
Expand Down

0 comments on commit 26feae4

Please sign in to comment.