fix(esm): don't emit module shorthand warning (#11596)

This commit is contained in:
Pavel Feldman 2022-01-24 11:22:56 -08:00 committed by GitHub
parent 4d42f6a1c4
commit 9542b007cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -89,9 +89,8 @@ export function transformHook(code: string, filename: string, tsconfig: TsConfig
relative = relative.replace(/\//g, path.sep);
const result = path.resolve(tsconfig.baseUrl || '', relative);
for (const extension of extensions) {
// TODO: We can't cover this one with the hash!
if (fs.existsSync(result + extension))
return result;
return result + extension;
}
}
return name;

View file

@ -135,6 +135,7 @@ test('should respect baseurl w/o paths', async ({ runInlineTest }) => {
`,
});
expect(result.output).not.toContain('Could not');
expect(result.passed).toBe(1);
expect(result.exitCode).toBe(0);
});