Skip to content

Commit

Permalink
fix(gatsby): fix api function compilation on Windows (#38489) (#38491)
Browse files Browse the repository at this point in the history
(cherry picked from commit 26feae4)

Co-authored-by: Michal Piechowiak <[email protected]>
  • Loading branch information
gatsbybot and pieh authored Aug 28, 2023
1 parent b6f1a10 commit da050e5
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 da050e5

Please sign in to comment.