Conversation
🦋 Changeset detectedLatest commit: 5933875 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Member
|
Thank you — am picking this up in #3576 (I couldn't push to this branch for some reason), so I'll close this |
datstarkey
added a commit
to datstarkey/kit
that referenced
this pull request
Mar 2, 2026
Add write-to-disk + shell-out pipeline for declaration emit, adapted from the approach used in svelte-check's incremental mode (PR sveltejs#2932). When `--incremental` or `--tsgo` is passed, svelte-package: 1. Pre-transpiles .svelte files to .ts via svelte2tsx() with manifest caching 2. Generates an overlay tsconfig with declaration emit settings 3. Spawns tsc (or tsgo from @typescript/native-preview) as a child process 4. Post-processes emitted .d.ts files (alias resolution, sourcemap fixup) The default path (no flags) is completely unchanged. Benchmarks on a 264-component Svelte library: - Baseline (emitDts): ~7.2s every run - --incremental warm: ~3.1s (2.3x faster) - --tsgo cold: ~3.7s (2x faster) - --incremental --tsgo: ~1.6s (4.5x faster) Also bumps svelte2tsx to ~0.7.51 for rewriteExternalImports and emitJsDoc support, and adds @typescript/native-preview as an optional peer dependency.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpx changesetand following the prompts. All changesets should bepatchuntil SvelteKit 1.0Problem
The following directory layout creates an endpoint for
post.spec.jsandpost.md, and the only way to opt out is to make them private modules with an underscore/dot prefix:Some developers might require the exact layout/naming shown, where:
Solution
This PR adds
kit.excludesconfig, which accepts an array ofString,RegExp, orFunction.String- The basename of the file/directory is compared against the string, and it's excluded if matches.RegExp- The basename of the file/directory is tested against the regular expression, and it's excluded if matches.({ filepath, basename }) => boolean- The file/directory is excluded if the function returnstrue.The default would be
[^_.]to match the current behavior. This also would enable users to override the current behavior, allowing for underscore/dot-prefixed files to be included in routing.Example config:
Closes #2930