diff --git a/index.ts b/index.ts index 04b6881d4..b861e284c 100644 --- a/index.ts +++ b/index.ts @@ -250,13 +250,13 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): { configParseResult = (compiler).parseJsonConfigFileContent( configFile.config, compiler.sys, - path.dirname(configFilePath) + path.dirname(configFilePath || '') ); } else { configParseResult = (compiler).parseConfigFile( configFile.config, compiler.sys, - path.dirname(configFilePath) + path.dirname(configFilePath || '') ); }