From c71e6c728c52fa05a79319e4f98b1f204a7d4e2e Mon Sep 17 00:00:00 2001 From: Young Liang Date: Sun, 17 Mar 2024 17:26:02 +0800 Subject: [PATCH] feat: add types in dts --- packages/node-resolve/types/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/node-resolve/types/index.d.ts b/packages/node-resolve/types/index.d.ts index 6bd5db3c2..f27b456cf 100755 --- a/packages/node-resolve/types/index.d.ts +++ b/packages/node-resolve/types/index.d.ts @@ -79,9 +79,11 @@ export interface RollupNodeResolveOptions { /** * If `true`, the plugin will prefer built-in modules (e.g. `fs`, `path`). If `false`, * the plugin will look for locally installed modules of the same name. + * + * If a function is provided, it will be called to determine whether to prefer built-ins. * @default true */ - preferBuiltins?: boolean; + preferBuiltins?: boolean | ((module: string) => boolean); /** * An `Array` which instructs the plugin to limit module resolution to those whose