diff --git a/src/package-transpilation-registry.js b/src/package-transpilation-registry.js index 83b2ce2f6..6f6fe2b13 100644 --- a/src/package-transpilation-registry.js +++ b/src/package-transpilation-registry.js @@ -32,10 +32,10 @@ class PackageTranspilationRegistry { console.log(">>>>> REMOVING: " + packagePath) delete this.configByPackagePath[packagePath] const packagePathWithSep = packagePath.endsWith(path.sep) ? - packagePath : packagePath + path.sep; + path.join(packagePath) : path.join(packagePath) + path.sep; Object.keys(this.specByFilePath).forEach(filePath => { console.log('checking if ' + filePath + ' starts with ' + packagePathWithSep) - if (filePath.startsWith(packagePathWithSep)) { + if (path.join(filePath).startsWith(packagePathWithSep)) { console.log(' >> REMOVING ' + filePath) delete this.specByFilePath[filePath] }