Modernize frontend/build stack for Svelte 5#171
Merged
Conversation
added 9 commits
March 26, 2026 21:04
…put, and Login components
There was a problem hiding this comment.
Pull request overview
Modernizes the repo’s frontend/build toolchain to a Svelte 5–compatible stack while preserving existing embed/runtime behavior and keeping lint/test/build workflows working.
Changes:
- Upgrades Svelte/Vite/Svelte-preprocess/ts-jest dependencies and lockfile to the Svelte 5 ecosystem.
- Aligns frontend build + test configs to the updated TS/ESM model (
tsconfig.frontend.json, Vite preprocess, Jest ESM edge cases). - Applies required source compatibility fixes (Svelte 5
mount(...), type-only imports, and non-void self-closing tag fixes).
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
yarn.lock |
Updates resolved dependency graph for the upgraded Svelte 5-compatible toolchain. |
package.json |
Bumps core frontend/build dependencies (Svelte 5, Vite plugin, preprocess, ts-jest, etc.). |
vite.config.ts |
Pins Svelte preprocess TypeScript settings to tsconfig.frontend.json. |
tsconfig.frontend.json |
Enables verbatimModuleSyntax and switches module resolution to bundler. |
jest.frontend.config.ts |
Adjusts Jest transforms for ESM deps (esm-env) and treats .ts as ESM. |
eslint.config.mjs |
Tweaks unused-vars ignore pattern in Svelte files to avoid noise around state. |
src/simple-comment.ts |
Migrates embed entrypoint from new Component(...) to mount(Component, ...). |
src/simple-comment-icebreakers.ts |
Adds missing TypeScript types for async callback parameters. |
src/components/low-level/SkeletonText.svelte |
Replaces invalid non-void self-closing tags with explicit closing tags. |
src/components/Login.svelte |
Converts StateValue import to type-only. |
src/components/DiscussionDisplay.svelte |
Fixes invalid self-closing non-void <div />. |
src/components/CommentInput.svelte |
Converts StateValue import to type-only; fixes invalid self-closing <textarea />. |
src/components/CommentEdit.svelte |
Converts StateValue import to type-only; fixes invalid self-closing <textarea />. |
src/components/CommentDisplay.svelte |
Fixes invalid self-closing non-void <div /> placeholders. |
docs/archive/Priority4FrontendBuildModernizationPlan.md |
Archives the Priority 4 frontend/build modernization plan artifact. |
docs/archive/Priority4FrontendBuildModernizationChecklist01Validation.md |
Archives validation evidence/notes for the lane completion. |
docs/archive/Priority4FrontendBuildModernizationChecklist01.md |
Archives the checklist artifact for the completed lane. |
docs/archive/Priority4DependencyModernizationPlan.md |
Marks the broader Priority 4 dependency modernization plan as archived. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+36
to
+39
| preprocess: [ | ||
| sveltePreprocess({ | ||
| typescript: { tsconfigFile: "tsconfig.frontend.json" }, | ||
| }), |
There was a problem hiding this comment.
svelte-preprocess v6 still supports this call shape, but its default export is deprecated. To avoid deprecation warnings and reduce risk of a future breaking change, switch to the named export (import { sveltePreprocess } from "svelte-preprocess") and call that here.
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.
Summary
This PR completes the Priority 4 frontend/build modernization lane.
It upgrades the frontend stack to the current Svelte 5-compatible toolchain and carries through the compatibility work needed to keep build, tests, local runtime, and embed mounting working.
Key changes:
svelte@^5.55.0,@sveltejs/vite-plugin-svelte@^4.0.0, andsvelte-preprocess@^6.0.3tsconfig.frontend.jsonesm-env)verbatimModuleSyntaxand move frontend module resolution tobundlerStateValueimports to type-only imports to remove build noisesrc/simple-comment.tsfromnew SimpleComment(...)tomount(SimpleComment, ...)Validation
Completed on the
frontend-modernizationbranch during the upgrade loop:yarn lintyarn run prettier --list-different .yarn typecheckyarn test:frontendyarn run build:frontendyarn run ci:localLocal runtime verification:
simple-commentmounts again in local development after the Svelte 5mount(...)changeNotes
A later
ci:localrerun after local Netlify dev/runtime activity picked up generated.netlify/functions-serve/*artifacts during linting. That is documented in the archived validation notes as generated-artifact/environment noise rather than a frontend/build regression from this PR.