Skip to content

Commit 3b1b6a5

Browse files
gatsbybotLekoArts
andauthored
fix(gatsby): Use windows import helper for validate (#37520) (#37522)
initial (cherry picked from commit 77c9469) Co-authored-by: Lennart <[email protected]>
1 parent 000e23e commit 3b1b6a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/gatsby/src/bootstrap/load-plugins/validate.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
import { resolvePlugin } from "./resolve-plugin"
2222
import { preferDefault } from "../prefer-default"
2323
import { importGatsbyPlugin } from "../../utils/import-gatsby-plugin"
24+
import { maybeAddFileProtocol } from "../resolve-js-file-path"
2425

2526
interface IApi {
2627
version?: string
@@ -193,7 +194,7 @@ const addModuleImport = async (
193194
value: Array<ISubPluginCustomReturn>
194195
): Promise<Array<ISubPluginCustomReturn>> => {
195196
for (const plugin of value) {
196-
const importedModule = await import(plugin.modulePath)
197+
const importedModule = await import(maybeAddFileProtocol(plugin.modulePath))
197198
const pluginModule = preferDefault(importedModule)
198199
plugin.module = pluginModule
199200
}

0 commit comments

Comments
 (0)