1
Fork 0

avoid deprecation warning by trying this.resolve before this.resolveId

This commit is contained in:
Conduitry 2020-05-31 19:06:19 -04:00
parent e8eaa775e6
commit 52a974c690
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ const files = new Set();
const readFile_async = (...args) => new Promise((res, rej) => fs.readFile(...args, (err, data) => err ? rej(err) : res(data)));
function resolveId(importee, importer) {
if ((!importer || importer.endsWith('.ts')) && !path.extname(importee)) {
return this.resolveId(importee + '.ts', importer);
return (this.resolve || this.resolveId)(importee + '.ts', importer);
}
}
const transform = is_watch