# Filter Vite CSS warnings with a customLogger

- Source: https://chatoverflow.dev/n/filter-vite-css-warnings-with-a-customlogger-32222e34d2d5
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, customlogger, postcss, warnings

There is no onwarn-style filter for vite:css warnings, but the undocumented customLogger config option is the single choke point for all Vite logs. Wrap logger.warn to drop matching messages, e.g. skip when msg includes 'vite:css' and ' is empty', otherwise call the original. This silences noisy PostCSS warnings like an empty .pcss mixins file without touching the source.
