docs: update hooks page - #16417
Merged
Merged
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/9900ae127ccc2878c612ee1666c7fa05f740c5abOpen in |
🦋 Changeset detectedLatest commit: 9900ae1 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 |
… alias instead of SvelteKit's canonical `$lib/...` alias
This commit fixes the issue reported at documentation/docs/30-advanced/20-hooks.md:286
## Bug
In `documentation/docs/30-advanced/20-hooks.md`, two code-example imports were changed to use `#lib`:
* Line 286: `import * as db from '#lib/server/database';`
* Line 359: `import { Vector } from '#lib/math';`
`$lib` is the canonical SvelteKit path alias (documented in `documentation/docs/98-reference/26-$lib.md`) and is used in 70+ other places across the docs. `#lib` is not a valid SvelteKit alias and appeared nowhere else in the repository — confirmed via grep, which returned only these two lines.
## Trigger / Impact
Any reader copying these snippets would get a broken import, since `#lib` does not resolve in a standard SvelteKit project. The change was unrelated to the PR's intended purpose (updating anchor links). The `// @errors: 2307` directive suppresses module-not-found errors in the docs build, so the typo was not caught by type-checking.
## Fix
Restored both imports to `$lib/server/database` and `$lib/math`. Confirmed no remaining `#lib/` occurrences in the repo.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: Rich-Harris <hello@rich-harris.dev>
Member
Author
|
gonna self-merge this to cut a release, which we need so that the docs can build. gah this is a mess |
Merged
Rich-Harris
pushed a commit
that referenced
this pull request
Jul 19, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @sveltejs/kit@2.70.1 ### Patch Changes - docs: update links to hooks documentation ([#16417](#16417)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Rich-Harris
added a commit
that referenced
this pull request
Jul 19, 2026
so confused about how these changes got missed from #16417
Contributor
|
Thanks for porting this. Really sorry. I ended my night right before all this. Noted for future docs PRs that change anchors. |
Member
Author
|
not your fault! if anyone should have anticipated this it's me |
renovate Bot
added a commit
to cigaleapp/cigale
that referenced
this pull request
Jul 27, 2026
##### [v2.70.1](https://github.com/sveltejs/kit/blob/HEAD/packages/kit/CHANGELOG.md#2701) ##### Patch Changes - docs: update links to hooks documentation ([#16417](sveltejs/kit#16417)) ##### [v2.70.0](https://github.com/sveltejs/kit/blob/HEAD/packages/kit/CHANGELOG.md#2700) ##### Minor Changes - feat: move `defineEnvVars` to `@sveltejs/kit/env` ([#16378](sveltejs/kit#16378)) ##### Patch Changes - fix: enable CSRF protection in builds with a non-production `NODE_ENV` value ([#16313](sveltejs/kit#16313)) ##### [v2.69.3](https://github.com/sveltejs/kit/blob/HEAD/packages/kit/CHANGELOG.md#2693) ##### Patch Changes - fix: detect destructured `load` and `actions` exports during type generation ([#16329](sveltejs/kit#16329)) - fix: ensure CSS URL references are absolute when `paths.relative` is `false` ([#16315](sveltejs/kit#16315)) - fix: align MAX\_COOKIE\_SIZE with RFC 6265bis ([#16322](sveltejs/kit#16322))
renovate Bot
added a commit
to cigaleapp/cigale
that referenced
this pull request
Jul 27, 2026
##### [v2.70.1](https://github.com/sveltejs/kit/blob/HEAD/packages/kit/CHANGELOG.md#2701) ##### Patch Changes - docs: update links to hooks documentation ([#16417](sveltejs/kit#16417)) ##### [v2.70.0](https://github.com/sveltejs/kit/blob/HEAD/packages/kit/CHANGELOG.md#2700) ##### Minor Changes - feat: move `defineEnvVars` to `@sveltejs/kit/env` ([#16378](sveltejs/kit#16378)) ##### Patch Changes - fix: enable CSRF protection in builds with a non-production `NODE_ENV` value ([#16313](sveltejs/kit#16313)) ##### [v2.69.3](https://github.com/sveltejs/kit/blob/HEAD/packages/kit/CHANGELOG.md#2693) ##### Patch Changes - fix: detect destructured `load` and `actions` exports during type generation ([#16329](sveltejs/kit#16329)) - fix: ensure CSS URL references are absolute when `paths.relative` is `false` ([#16315](sveltejs/kit#16315)) - fix: align MAX\_COOKIE\_SIZE with RFC 6265bis ([#16322](sveltejs/kit#16322))
gwennlbh
pushed a commit
to cigaleapp/cigale
that referenced
this pull request
Jul 27, 2026
##### [v2.70.1](https://github.com/sveltejs/kit/blob/HEAD/packages/kit/CHANGELOG.md#2701) ##### Patch Changes - docs: update links to hooks documentation ([#16417](sveltejs/kit#16417)) ##### [v2.70.0](https://github.com/sveltejs/kit/blob/HEAD/packages/kit/CHANGELOG.md#2700) ##### Minor Changes - feat: move `defineEnvVars` to `@sveltejs/kit/env` ([#16378](sveltejs/kit#16378)) ##### Patch Changes - fix: enable CSRF protection in builds with a non-production `NODE_ENV` value ([#16313](sveltejs/kit#16313)) ##### [v2.69.3](https://github.com/sveltejs/kit/blob/HEAD/packages/kit/CHANGELOG.md#2693) ##### Patch Changes - fix: detect destructured `load` and `actions` exports during type generation ([#16329](sveltejs/kit#16329)) - fix: ensure CSS URL references are absolute when `paths.relative` is `false` ([#16315](sveltejs/kit#16315)) - fix: align MAX\_COOKIE\_SIZE with RFC 6265bis ([#16322](sveltejs/kit#16322)) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.
follow-up to #16396, which unfortunately broke the docs as a result of how they're being built during the 2-3 transition. We need to apply the same changes to
main, and then merge sveltejs/svelte.dev#2102