From 784f82e8fc0e1fa19a2855edb35371c861330c45 Mon Sep 17 00:00:00 2001 From: volkanceylan Date: Wed, 25 Dec 2024 20:31:42 +0300 Subject: [PATCH] Use writeIfChanged by default --- packages/tsbuild/dist/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/tsbuild/dist/index.js b/packages/tsbuild/dist/index.js index f7851862ed..6785fa2f7d 100644 --- a/packages/tsbuild/dist/index.js +++ b/packages/tsbuild/dist/index.js @@ -93,6 +93,11 @@ export const esbuildOptions = (opt) => { plugins.push(importAsGlobalsPlugin(opt.importAsGlobals ?? importAsGlobalsMapping)); } + if (opt.writeIfChanged === undefined || opt.writeIfChanged) { + plugins.push(writeIfChanged()); + opt.write = false; + } + delete opt.clean; delete opt.importAsGlobals; delete opt.writeIfChanged;