@@ -68,29 +68,30 @@ module.exports = {
68
68
69
69
## Options
70
70
71
- - ` roots ` (Array<string >): The directories to search for modules. Default: ` ["." ] ` .
71
+ - ` roots ` (Array<string >): The directories to search for modules. Default: ` [process.cwd() ] ` .
72
72
73
73
- ` alias ` (Record<string, string | string[ ] >): The paths alias. Default: ` undefined ` .
74
74
* The alias can be set as relative paths. relative paths are resolved from the package directory.
75
75
76
76
- ` tsconfig ` (boolean | string | object): Weather to use the ` tsconfig.json ` file. Default: ` true ` .
77
- * If ` true ` , the resolver will try to find the ` tsconfig.json ` file in the package directory .
78
- * If a string, the resolver will try to find the file in the specified path .
77
+ * If ` true ` , the resolver will try to find the ` tsconfig.json ` file close to the source file .
78
+ * If a string, it's the name of the file to search for .
79
79
* If an object, see the ` tsconfig ` option in the ` oxc-resolver ` package.
80
80
81
81
- ` jsconfig ` (boolean | string | object): Weather to use the ` jsconfig.json ` file. Default: ` true ` .
82
- * If ` true ` , the resolver will try to find the ` jsconfig.json ` file in the package directory.
83
- * If a string, the resolver will try to find the file in the specified path.
84
- * If an object, see the ` jsconfig ` option in the ` oxc-resolver ` package.
82
+ * If ` true ` , the resolver will try to find the ` jsconfig.json ` file close to the source file.
83
+ * If a string, it's the name of the file to search for.
85
84
86
- - ` packages ` (string[ ] | PackageOptions): The directories to search for packages. Default: ` undefined ` .
87
- * If an array, the resolver will search for packages in the specified directories .
85
+ - ` packages ` (string[ ] | PackageOptions): The patterns or options to search for packages. Default: ` undefined ` .
86
+ * If an array, the resolver will search for packages in the specified patterns .
88
87
* If an object, see the ` PackageOptions ` .
89
88
90
89
All other options are passed to the ` oxc-resolver ` package. See the [ oxc-resolver documentation] ( https://github.com/oxc-project/oxc-resolver#options )
91
90
92
91
### PackageOptions
93
92
93
+ A folder with a ` package.json ` file is considered a package. The ` PackageOptions ` object can have the following properties:
94
+
94
95
- ` patterns ` (string[ ] ): The patterns to search for packages. Default: ` ["."] ` .
95
96
- ` ignore ` (string[ ] ): The directories to ignore. Default: ` ["**/node_modules/**", "**/test/**", "**/tests/**"] ` .
96
97
- ` includeRoot ` (boolean): Weather to include the root directory. Default: ` false ` .
0 commit comments