We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64aa114 commit d630b4dCopy full SHA for d630b4d
plugin/src/helpers/config.ts
@@ -74,16 +74,8 @@ function loadGatsbyConfig({ gatsbyRoot }) {
74
return {};
75
}
76
77
- const resolvedGatsbyConfigFile = resolveModule.sync(gatsbyConfigFile, {
78
- extensions: ['.js', '.ts'],
79
- });
80
-
81
- if (!resolvedGatsbyConfigFile) {
82
- return {};
83
- }
84
85
- // eslint-disable-next-line n/global-require, import/no-dynamic-require, @typescript-eslint/no-var-requires
86
- return require(resolvedGatsbyConfigFile);
+ // eslint-disable-next-line n/global-require, import/no-dynamic-require, @typescript-eslint/no-var-requires
+ return require(gatsbyConfigFile) as GatsbyConfig;
87
88
89
function hasPlugin(plugins: PluginRef[], pluginName: string): boolean {
0 commit comments