From 9a7dd4991ecbb9443bffe1d69b0cc68f513f59a7 Mon Sep 17 00:00:00 2001 From: Christian Kaisermann Date: Fri, 25 Sep 2020 10:15:10 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20prevent=20supressing=20ge?= =?UTF-8?q?neric=20errors=20on=20postcss=20transformer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: #216 --- src/transformers/postcss.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/transformers/postcss.ts b/src/transformers/postcss.ts index 957a8640..22b87053 100644 --- a/src/transformers/postcss.ts +++ b/src/transformers/postcss.ts @@ -54,9 +54,12 @@ const transformer: Transformer = async ({ } catch (e) { /** Something went wrong, do nothing */ // istanbul ignore next - if (e.code === 'MODULE_NOT_FOUND') { + if ( + e.code === 'MODULE_NOT_FOUND' && + e.message.includes(`Cannot find module 'postcss-load-config'`) + ) { console.error( - `[svelte-preprocess] PostCSS configuration was not passed. If you expect to load it from a file, make sure to install "postcss-load-config" and try again ʕ•ᴥ•ʔ`, + `[svelte-preprocess] PostCSS configuration was not passed. If you expect to load it from a file make sure to install "postcss-load-config" and try again.`, ); } else { console.error(e);