Browse Source

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

master
Conduitry 3 months ago
parent
commit
52a974c690
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      index.js

+ 1
- 1
index.js 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

Loading…
Cancel
Save