Skip to content

Commit 9a7dd49

Browse files
committed
fix: 🐛 prevent supressing generic errors on postcss transformer
Closes: #216
1 parent 60daad4 commit 9a7dd49

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: src/transformers/postcss.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ const transformer: Transformer<Options.Postcss> = async ({
5454
} catch (e) {
5555
/** Something went wrong, do nothing */
5656
// istanbul ignore next
57-
if (e.code === 'MODULE_NOT_FOUND') {
57+
if (
58+
e.code === 'MODULE_NOT_FOUND' &&
59+
e.message.includes(`Cannot find module 'postcss-load-config'`)
60+
) {
5861
console.error(
59-
`[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 ʕ•ᴥ•ʔ`,
62+
`[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.`,
6063
);
6164
} else {
6265
console.error(e);

0 commit comments

Comments
 (0)