From 52a974c690d56f32d2fcbf532f6448ff32adfa4d Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 31 May 2020 19:06:19 -0400 Subject: [PATCH] avoid deprecation warning by trying this.resolve before this.resolveId --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 5214450..1b9ae3d 100644 --- a/index.js +++ b/index.js @@ -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