File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,10 @@ function adjustOptions<sync extends 'sync' | 'async'>(
8383 throw new Error ( 'Either options.data or options.file must be set.' ) ;
8484 }
8585
86+ // In legacy API, the current working directory is always attempted before
87+ // any load path.
88+ options . includePaths = [ process . cwd ( ) , ...( options . includePaths ?? [ ] ) ] ;
89+
8690 if (
8791 ! isStringOptions ( options ) &&
8892 // The `indentedSyntax` option takes precedence over the file extension in the
@@ -200,9 +204,7 @@ function pluginThis(
200204 context : undefined as unknown as LegacyPluginThis ,
201205 file : options . file ,
202206 data : options . data ,
203- includePaths : [ process . cwd ( ) , ...( options . includePaths ?? [ ] ) ] . join (
204- p . delimiter
205- ) ,
207+ includePaths : ( options . includePaths ?? [ ] ) . join ( p . delimiter ) ,
206208 precision : 10 ,
207209 style : 1 ,
208210 indentType : 0 ,
You can’t perform that action at this time.
0 commit comments