From ea53e7095297ea4192490fd58556414cc59a8975 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Tue, 7 Jan 2025 16:25:51 +0800 Subject: [PATCH] fix(types): improve `ESBuildOptions.include / exclude` type to allow `readonly (string | RegExp)[]` (#19146) --- packages/vite/src/node/plugins/esbuild.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vite/src/node/plugins/esbuild.ts b/packages/vite/src/node/plugins/esbuild.ts index 83fa1af4248ab5..a528a21bfe931f 100644 --- a/packages/vite/src/node/plugins/esbuild.ts +++ b/packages/vite/src/node/plugins/esbuild.ts @@ -43,8 +43,8 @@ export const defaultEsbuildSupported = { } export interface ESBuildOptions extends TransformOptions { - include?: string | RegExp | string[] | RegExp[] - exclude?: string | RegExp | string[] | RegExp[] + include?: string | RegExp | ReadonlyArray + exclude?: string | RegExp | ReadonlyArray jsxInject?: string /** * This option is not respected. Use `build.minify` instead.