diff --git a/src/builder/plugins/esbuild.ts b/src/builder/plugins/esbuild.ts index ddf7ff49..ffd194ed 100644 --- a/src/builder/plugins/esbuild.ts +++ b/src/builder/plugins/esbuild.ts @@ -91,6 +91,9 @@ export function esbuild(options: EsbuildOptions): Plugin { if (!options.minify) { return null; } + if (/\.d\.(c|m)?tsx?$/.test(fileName)) { + return null; + } const loader = getLoader(fileName); if (!loader) { return null;