Skip to content

Commit 0252b23

Browse files
committed
docs: document allowPackageExportsInDirectoryResolve
1 parent 83405a2 commit 0252b23

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

README.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -165,27 +165,28 @@ The following options are aligned with [enhanced-resolve], and is implemented fo
165165

166166
See [index.d.ts](https://github.com/oxc-project/oxc-resolver/blob/main/napi/index.d.ts) for Node.js usage.
167167

168-
| Field | Default | Description |
169-
| ---------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
170-
| alias | | An object of module alias configurations |
171-
| aliasFields | [] | A list of alias fields in description files |
172-
| extensionAlias | {} | An object which maps extension to extension aliases |
173-
| conditionNames | [] | A list of exports field condition names |
174-
| enforceExtension | false | Enforce that a extension from extensions must be used |
175-
| exportsFields | ["exports"] | A list of exports fields in description files |
176-
| extensions | [".js", ".json", ".node"] | A list of extensions which should be tried for files |
177-
| fallback | | Same as `alias`, but only used if default resolving fails |
178-
| fileSystem | | The file system which should be used |
179-
| fullySpecified | false | Request passed to resolve is already fully specified and extensions or main files are not resolved for it (they are still resolved for internal requests) |
180-
| mainFields | ["main"] | A list of main fields in description files |
181-
| mainFiles | ["index"] | A list of main files in directories |
182-
| modules | ["node_modules"] | A list of directories to resolve modules from, can be absolute path or folder name |
183-
| resolveToContext | false | Resolve to a context instead of a file |
184-
| preferRelative | false | Prefer to resolve module requests as relative request and fallback to resolving as module |
185-
| preferAbsolute | false | Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots |
186-
| restrictions | [] | A list of resolve restrictions |
187-
| roots | [] | A list of root paths |
188-
| symlinks | true | Whether to resolve symlinks to their symlinked location |
168+
| Field | Default | Description |
169+
| ------------------------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
170+
| alias | | An object of module alias configurations |
171+
| aliasFields | [] | A list of alias fields in description files |
172+
| extensionAlias | {} | An object which maps extension to extension aliases |
173+
| conditionNames | [] | A list of exports field condition names |
174+
| enforceExtension | false | Enforce that a extension from extensions must be used |
175+
| exportsFields | ["exports"] | A list of exports fields in description files |
176+
| extensions | [".js", ".json", ".node"] | A list of extensions which should be tried for files |
177+
| fallback | | Same as `alias`, but only used if default resolving fails |
178+
| fileSystem | | The file system which should be used |
179+
| fullySpecified | false | Request passed to resolve is already fully specified and extensions or main files are not resolved for it (they are still resolved for internal requests) |
180+
| mainFields | ["main"] | A list of main fields in description files |
181+
| mainFiles | ["index"] | A list of main files in directories |
182+
| modules | ["node_modules"] | A list of directories to resolve modules from, can be absolute path or folder name |
183+
| resolveToContext | false | Resolve to a context instead of a file |
184+
| preferRelative | false | Prefer to resolve module requests as relative request and fallback to resolving as module |
185+
| preferAbsolute | false | Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots |
186+
| restrictions | [] | A list of resolve restrictions |
187+
| roots | [] | A list of root paths |
188+
| symlinks | true | Whether to resolve symlinks to their symlinked location |
189+
| allowPackageExportsInDirectoryResolve | Allow `exports` field in `require('../directory')`. Not part of `enhanced-resolve`. | |
189190

190191
### TypeScript Configuration
191192

0 commit comments

Comments
 (0)