-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: Support svelte.config.ts #13935
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 790ced2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The lint error is from eslint which likely trips up on multiple files just with different extensions, best to ignore that directory in the config. |
ugh, conditionally passing --experimental-strip-types is weird. changed test-others to a matrix to be able to test with 22 and 18. In a separate PR we should look into adding node24 to the matrix tests. |
I'm not sure it makes sense to support |
When it was only one exact filename Now that this PR adds checking multiple extensions, its very easy to allow mjs and mts and those are valid even in projects where |
Co-authored-by: Tee Ming <[email protected]>
To me it's nothing about the simplicity of the code, but whether we want to encourage bad practices. There is no reason a SvelteKit project should ever lack |
removed mjs and mts, lets see if someone asks for it. I know there's a few that use vite-plugin-svelte with svelte.config.mjs but SvelteKit can have different constraints. |
Co-authored-by: Ben McCann <[email protected]>
Co-authored-by: Ben McCann <[email protected]>
This PR enables loading
svelte.config.ts
in runtimes that support importing TypeScript files.In deno and bun this should work ootb, in nodejs >=22.6 you can use the
--experimental-strip-types
flag to allow it.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits