From a54373775b5ba2114cbfc7b40d26720746d1045d Mon Sep 17 00:00:00 2001 From: xuegan Date: Tue, 20 Feb 2024 18:48:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dwindows=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=8BtsWatchFilterLoader=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=88=A4=E6=96=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/utils/ts-loader-watch-run-loader-filter.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/webpack-plugin/lib/utils/ts-loader-watch-run-loader-filter.js b/packages/webpack-plugin/lib/utils/ts-loader-watch-run-loader-filter.js index eb93027bc4..80e38a5969 100644 --- a/packages/webpack-plugin/lib/utils/ts-loader-watch-run-loader-filter.js +++ b/packages/webpack-plugin/lib/utils/ts-loader-watch-run-loader-filter.js @@ -1,7 +1,10 @@ +const toPosix = require('./to-posix') + module.exports = (loaders, loaderIndex) => { for (let i = loaderIndex; i >= 0; i--) { const currentLoader = loaders[i] - if (currentLoader.path.endsWith('node_modules/ts-loader/dist/stringify-loader.js')) { + const currentLoaderPath = toPosix(currentLoader.path) + if (currentLoaderPath.endsWith('node_modules/ts-loader/dist/stringify-loader.js')) { return i } }