Skip to content

Commit

Permalink
fix: πŸ› prevent supressing generic errors on postcss transformer
Browse files Browse the repository at this point in the history
βœ… Closes: #216
  • Loading branch information
kaisermann committed Sep 25, 2020
1 parent 60daad4 commit 9a7dd49
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/transformers/postcss.ts
Expand Up @@ -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);
Expand Down

0 comments on commit 9a7dd49

Please sign in to comment.