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 } }