Skip to content

Commit c13012d

Browse files
committed
Fixed watch mode aborting on CSS error
1 parent 36f13cb commit c13012d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/build/transform/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ import { build as esbuild } from "esbuild"
2525
import * as path from "path"
2626
import postcss from "postcss"
2727
import {
28+
NEVER,
2829
Observable,
2930
concat,
3031
defer,
3132
merge,
3233
of
3334
} from "rxjs"
3435
import {
36+
catchError,
3537
endWith,
3638
ignoreElements,
3739
switchMap
@@ -130,6 +132,10 @@ export function transformStyle(
130132
}
131133
})
132134
),
135+
catchError(err => {
136+
console.log(err.formatted || err.message)
137+
return NEVER
138+
}),
133139
switchMap(({ css, map }) => {
134140
const file = digest(options.to, css)
135141
return concat(

0 commit comments

Comments
 (0)