mirror of
https://github.com/atom/atom.git
synced 2026-01-15 01:48:15 -05:00
Unregister custom package transpilation config after transpilation
This commit is contained in:
@@ -40,6 +40,7 @@ module.exports = function () {
|
||||
pathsToCompile.forEach(transpilePath)
|
||||
}
|
||||
|
||||
CompileCache.removeTranspilerConfigForPath(intermediatePackagePath)
|
||||
rootPackageBackup.restore()
|
||||
intermediatePackageBackup.restore()
|
||||
}
|
||||
|
||||
@@ -29,6 +29,13 @@ class PackageTranspilationRegistry {
|
||||
|
||||
removeTranspilerConfigForPath (packagePath) {
|
||||
delete this.configByPackagePath[packagePath]
|
||||
const packagePathWithSep = packagePath.endsWith(path.sep) ?
|
||||
packagePath : packagePath + path.sep;
|
||||
Object.keys(this.specByFilePath).forEach(filePath => {
|
||||
if (filePath.startsWith(packagePathWithSep)) {
|
||||
delete this.specByFilePath[filePath]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Wraps the transpiler in an object with the same interface
|
||||
|
||||
Reference in New Issue
Block a user