From fc12cb449b62c4f7bec3116af9f9a6b835e6a4de Mon Sep 17 00:00:00 2001 From: "Piotr N." Date: Wed, 7 Jan 2026 15:53:19 +0000 Subject: [PATCH] Skip rename when source file is not there --- itsl.rollup.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/itsl.rollup.js b/itsl.rollup.js index 11671cf..46c8425 100644 --- a/itsl.rollup.js +++ b/itsl.rollup.js @@ -89,7 +89,13 @@ const Sass = (src, dest, options = sassOptions) => ({ /** * Renames the .temp file to .css overwriting the default javascript output */ - writeBundle: () => fs.renameSync(`${dest}.temp`, dest) + writeBundle: () => { + if (!fs.existsSync(`${dest}.temp`)) { + return; + } + + fs.renameSync(`${dest}.temp`, dest) + } }, ...options.plugins || sassOptions.plugins ]