fix(esm): don't emit module shorthand warning (#11596)
This commit is contained in:
parent
4d42f6a1c4
commit
9542b007cf
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue