Skip to content

Commit

Permalink
fix(gatsby): Use windows import helper for validate (#37520) (#37522)
Browse files Browse the repository at this point in the history
initial

(cherry picked from commit 77c9469)

Co-authored-by: Lennart <lekoarts@gmail.com>
  • Loading branch information
ViCo0TeCH and LekoArts committed Jan 23, 2023
1 parent 000e23e commit 3b1b6a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/gatsby/src/bootstrap/load-plugins/validate.ts
Expand Up @@ -21,6 +21,7 @@ import {
import { resolvePlugin } from "./resolve-plugin"
import { preferDefault } from "../prefer-default"
import { importGatsbyPlugin } from "../../utils/import-gatsby-plugin"
import { maybeAddFileProtocol } from "../resolve-js-file-path"

interface IApi {
version?: string
Expand Down Expand Up @@ -193,7 +194,7 @@ const addModuleImport = async (
value: Array<ISubPluginCustomReturn>
): Promise<Array<ISubPluginCustomReturn>> => {
for (const plugin of value) {
const importedModule = await import(plugin.modulePath)
const importedModule = await import(maybeAddFileProtocol(plugin.modulePath))
const pluginModule = preferDefault(importedModule)
plugin.module = pluginModule
}
Expand Down

0 comments on commit 3b1b6a5

Please sign in to comment.