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

support svelte.config.ts #5867

Closed
Tal500 opened this issue Aug 10, 2022 · 1 comment
Closed

support svelte.config.ts #5867

Tal500 opened this issue Aug 10, 2022 · 1 comment

Comments

@Tal500
Copy link
Contributor

Tal500 commented Aug 10, 2022

Describe the problem

I think that SvelteKit should accept configuration also via typescript, by svelte.config.ts and not just svelte.config.js. For example, vite.config.ts file is already supported by Vite.

This is not only for "fancy" typescript support, I know that many of you will tell me to use JSDoc instead for simple config.
The real reason it's useful (or the real pain otherwise) is for allowing the config file load other typescript files for a computation in the svelte config file.

Describe the proposed solution

Load svelte.config.ts by SvelteKit, whenever svelte.config.js isn't found.
Loading is either via ts-node, or by compiling it to JS internally first, need to see how Vite and Playwright had achieved this.

Alternatives considered

For doing so you need to compile these typescript files before, and then load them to the svelte.config.js file.
This is so bad for automation, and also results with compiled *.js files in the working dir.

Importance

would make my life easier

Additional Information

No response

@dominikg
Copy link
Member

duplicate of #2576

see the discussion in #4031 too and also sveltejs/rfcs#59

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

2 participants