Skip to content

Commit e248e4e

Browse files
committed
docs: update README
1 parent 2dfc874 commit e248e4e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,29 +68,30 @@ module.exports = {
6868

6969
## Options
7070

71-
- `roots` (Array<string>): The directories to search for modules. Default: `["."]`.
71+
- `roots` (Array<string>): The directories to search for modules. Default: `[process.cwd()]`.
7272

7373
- `alias` (Record<string, string | string[]>): The paths alias. Default: `undefined`.
7474
* The alias can be set as relative paths. relative paths are resolved from the package directory.
7575

7676
- `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.
7979
* If an object, see the `tsconfig` option in the `oxc-resolver` package.
8080

8181
- `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.
8584

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.
8887
* If an object, see the `PackageOptions`.
8988

9089
All other options are passed to the `oxc-resolver` package. See the [oxc-resolver documentation](https://github.com/oxc-project/oxc-resolver#options)
9190

9291
### PackageOptions
9392

93+
A folder with a `package.json` file is considered a package. The `PackageOptions` object can have the following properties:
94+
9495
- `patterns` (string[]): The patterns to search for packages. Default: `["."]`.
9596
- `ignore` (string[]): The directories to ignore. Default: `["**/node_modules/**", "**/test/**", "**/tests/**"]`.
9697
- `includeRoot` (boolean): Weather to include the root directory. Default: `false`.

0 commit comments

Comments
 (0)