Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Failed to resolve "extends":"./.svelte-kit/tsconfig.json" #7

Closed
BeeMargarida opened this issue Apr 18, 2022 · 2 comments
Closed

Failed to resolve "extends":"./.svelte-kit/tsconfig.json" #7

BeeMargarida opened this issue Apr 18, 2022 · 2 comments

Comments

@BeeMargarida
Copy link

I don't know if this the correct place to put this problem (if it is not I apologize).
When setting up a project with SvelteKit where its tsconfig.json contains "extends": "./.svelte-kit/tsconfig.json", as it is present in the documentation, it breaks the tests when running vitest. If I delete this line the error does not happen.

More specifically the error below when running vitest --run. When there are several tests, only one of them fails with this error and the others pass:
image

vitest.config.ts

import { extractFromSvelteConfig } from 'vitest-svelte-kit';

export default extractFromSvelteConfig();

Is there something missing, or is this current limitation?

@nickbreaton
Copy link
Owner

nickbreaton commented Apr 18, 2022

This is going to be a limitation of how this project's set up since we're not actually generating the .svelte-kit folder but rather emulating the its vite plugin. Once sveltejs/kit#4329 is addressed hopefully we can just deprecate this project as svelte would expose its plugin fully.

In the meantime, I bet you could build svelte-kit (probably set up in your project as npm run build) before running vitest and it should work for this case. Hopefully that helps.

@BeeMargarida
Copy link
Author

This is going to be a limitation of how this project's set up since we're not actually generating the .svelte-kit folder but rather emulating the its vite plugin. Once sveltejs/kit#4329 is merged hopefully we can just deprecate this project as svelte would expose its plugin fully.

In the meantime, I bet you could build svelte-kit (probably set up in your project as npm run build) before running vitest and it should work for this case. Hopefully that helps.

Thank you for your quick reply. It seems that is the only solution for now, that or saving the tsconfig.json generated.
Thank you again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants