Skip to content
Permalink
Browse files

fix: πŸ› prevent supressing generic errors on postcss transformer

βœ… Closes: #216
  • Loading branch information
kaisermann committed Sep 25, 2020
1 parent 60daad4 commit 9a7dd4991ecbb9443bffe1d69b0cc68f513f59a7
Showing with 5 additions and 2 deletions.
  1. +5 βˆ’2 src/transformers/postcss.ts
@@ -54,9 +54,12 @@ const transformer: Transformer<Options.Postcss> = 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);

0 comments on commit 9a7dd49

Please sign in to comment.
You can’t perform that action at this time.