From 4bbf9d07cb6f64c9f03e6e5e8c6ae11e8a2bebed Mon Sep 17 00:00:00 2001 From: LekoArts Date: Mon, 23 Jan 2023 15:00:06 +0100 Subject: [PATCH] initial --- packages/gatsby/src/bootstrap/load-plugins/validate.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/gatsby/src/bootstrap/load-plugins/validate.ts b/packages/gatsby/src/bootstrap/load-plugins/validate.ts index e91a963548bee..5e091913c3cf2 100644 --- a/packages/gatsby/src/bootstrap/load-plugins/validate.ts +++ b/packages/gatsby/src/bootstrap/load-plugins/validate.ts @@ -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 @@ -193,7 +194,7 @@ const addModuleImport = async ( value: Array ): Promise> => { 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 }