[ci] format
This commit is contained in:
parent
c20b93c484
commit
0d3a7de527
3 changed files with 10 additions and 11 deletions
|
@ -49,7 +49,7 @@ test.describe('TypeScript resolution -', () => {
|
|||
|
||||
t.beforeAll(async ({ astro }) => {
|
||||
await astro.build();
|
||||
})
|
||||
});
|
||||
|
||||
t.beforeEach(async ({ astro }) => {
|
||||
previewServer = await astro.preview();
|
||||
|
@ -60,5 +60,5 @@ test.describe('TypeScript resolution -', () => {
|
|||
});
|
||||
|
||||
runTest(t);
|
||||
})
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
export function resolveClientDevPath(id: string) {
|
||||
if(id.startsWith('/@fs')) {
|
||||
if (id.startsWith('/@fs')) {
|
||||
// Vite does not resolve .jsx -> .tsx when coming from the client, so clip the extension.
|
||||
if(id.endsWith('.jsx')) {
|
||||
if (id.endsWith('.jsx')) {
|
||||
return id.slice(0, id.length - 4);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,10 +37,10 @@ export class Metadata {
|
|||
}
|
||||
|
||||
resolvePath(specifier: string): string {
|
||||
if(specifier.startsWith('.')) {
|
||||
if (specifier.startsWith('.')) {
|
||||
const resolved = new URL(specifier, this.mockURL).pathname;
|
||||
// Vite does not resolve .jsx -> .tsx when coming from the client, so clip the extension.
|
||||
if(resolved.startsWith('/@fs') && resolved.endsWith('.jsx')) {
|
||||
if (resolved.startsWith('/@fs') && resolved.endsWith('.jsx')) {
|
||||
return resolved.slice(0, resolved.length - 4);
|
||||
}
|
||||
return resolved;
|
||||
|
|
Loading…
Reference in a new issue