From 3486d2117faac0d83bc093f0c8c21b783b8f9f2d Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 25 May 2020 12:55:26 -0400 Subject: [PATCH] fix: fix unused css filter check on windows --- src/node/server/serverPluginCss.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node/server/serverPluginCss.ts b/src/node/server/serverPluginCss.ts index 7f64c63c70925b..4d906bd04f61e9 100644 --- a/src/node/server/serverPluginCss.ts +++ b/src/node/server/serverPluginCss.ts @@ -12,6 +12,7 @@ import { } from '../utils/cssUtils' import qs from 'querystring' import chalk from 'chalk' +import slash from 'slash' interface ProcessedEntry { css: string @@ -54,7 +55,7 @@ export const cssPlugin: ServerPlugin = ({ root, app, watcher, resolver }) => { /** filter unused files */ if ( !Array.from(processedCSS.keys()).some((processed) => - file.includes(processed) + slash(file).includes(processed) ) && !srcImportMap.has(file) ) {