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'>(
83
83
throw new Error ( 'Either options.data or options.file must be set.' ) ;
84
84
}
85
85
86
+ // In legacy API, the current working directory is always attempted before
87
+ // any load path.
88
+ options . includePaths = [ process . cwd ( ) , ...( options . includePaths ?? [ ] ) ] ;
89
+
86
90
if (
87
91
! isStringOptions ( options ) &&
88
92
// The `indentedSyntax` option takes precedence over the file extension in the
@@ -200,9 +204,7 @@ function pluginThis(
200
204
context : undefined as unknown as LegacyPluginThis ,
201
205
file : options . file ,
202
206
data : options . data ,
203
- includePaths : [ process . cwd ( ) , ...( options . includePaths ?? [ ] ) ] . join (
204
- p . delimiter
205
- ) ,
207
+ includePaths : ( options . includePaths ?? [ ] ) . join ( p . delimiter ) ,
206
208
precision : 10 ,
207
209
style : 1 ,
208
210
indentType : 0 ,
You can’t perform that action at this time.
0 commit comments