You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,10 @@ const result = resolveSync("fs", {
86
86
// result === "fs"
87
87
```
88
88
89
+
### `silent?: boolean`
90
+
91
+
If `silent` is set to `true`, the resolver will suppress errors and return `undefined` when a module cannot be resolved, instead of throwing an exception. This is useful for optional dependencies or when you want to handle missing modules gracefully.
92
+
89
93
### `exts?: string[]`
90
94
91
95
An optional array of file extensions to try when resolving files without explicit extensions. Defaults to:
0 commit comments