From c13012da3dc3440cf922ad0a4c71226671a0d1e8 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 27 Feb 2021 18:21:02 +0100 Subject: [PATCH] Fixed watch mode aborting on CSS error --- tools/build/transform/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/build/transform/index.ts b/tools/build/transform/index.ts index 511827be6..9ab8f99d0 100644 --- a/tools/build/transform/index.ts +++ b/tools/build/transform/index.ts @@ -25,6 +25,7 @@ import { build as esbuild } from "esbuild" import * as path from "path" import postcss from "postcss" import { + NEVER, Observable, concat, defer, @@ -32,6 +33,7 @@ import { of } from "rxjs" import { + catchError, endWith, ignoreElements, switchMap @@ -130,6 +132,10 @@ export function transformStyle( } }) ), + catchError(err => { + console.log(err.formatted || err.message) + return NEVER + }), switchMap(({ css, map }) => { const file = digest(options.to, css) return concat(