Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svelte.config.ts – Svelte Config TS Support #1919

Closed
ScarletFlash opened this issue Jul 16, 2021 · 2 comments
Closed

svelte.config.ts – Svelte Config TS Support #1919

ScarletFlash opened this issue Jul 16, 2021 · 2 comments

Comments

@ScarletFlash
Copy link

Describe the problem

Overview of available config fields currently is only available from docs.

Describe the proposed solution

It would be great if we had build-in Interface, describes all available fields for config file.
Moreover, it would be great if we had build-in support for .ts-file extension for config files.

Alternatives considered

Importance

would make my life easier

Additional Information

No response

@dummdidumm
Copy link
Member

This interface already exists, and the JSDoc at the top of the file which comes with the starter tepmlates should enable the type hints: /** @type {import('@sveltejs/kit').Config} */ . Adding .ts support for the config files is out of scope since it would require SvelteKit to also install TypeScript or some other form of TS-JS-transpiler for everyone, even if they don't use TS, and it adds additional maintenance overhead for a file that should be pretty simple anyway.

@michaeloliverx
Copy link

I was also searching for this feature because it is supported with vite:

Vite also directly supports TS config files. You can use vite.config.ts with the defineConfig helper as well.

Not essential but its nice to have, especially when you have local custom svelte preprocessors and vite plugins written in TS.

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

No branches or pull requests

3 participants