File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { TemplatesGenConfig } from "./src/commands/generate-templates/configurat
6
6
import { CodeGenConfig } from "./src/configuration.js" ;
7
7
import { HTTP_CLIENT } from "./src/constants.js" ;
8
8
import { generateApi , generateTemplates } from "./src/index.js" ;
9
+ import { pathToFileURL } from "url" ;
9
10
10
11
const templateGenBaseConfig = new TemplatesGenConfig ( { } ) ;
11
12
@@ -282,7 +283,7 @@ const generateCommand = defineCommand({
282
283
if ( args [ "custom-config" ] ) {
283
284
try {
284
285
customConfigPath = path . resolve ( process . cwd ( ) , args [ "custom-config" ] ) ;
285
- customConfig = await import ( customConfigPath ) ;
286
+ customConfig = await import ( pathToFileURL ( customConfigPath ) . toString ( ) ) ;
286
287
customConfig = customConfig . default || customConfig ;
287
288
} catch ( error ) {
288
289
consola . error ( "Error loading custom config:" , error ) ;
You can’t perform that action at this time.
0 commit comments