Repository navigation
build: fail the build on legacy Svelte components and clsx - #503
Merged
Merged
Conversation
Deploying podnotes with
|
| Latest commit: |
7b3198d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://add8d043.podnotes.pages.dev |
| Branch Preview URL: | https://chore-size-guards.podnotes.pages.dev |
This was referenced Oct 15, 2026
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
Set
runes: truein the Svelte compiler options and reject clsx code retained in the bundle. This guards the size wins from #501.Verification
npm run lint,npm run format:check,npm run typecheck,npm run build,npm run test(2,774 tests),npm run test:tooling(41 tests),npm run docs:build, andnpm run sizepass.main.jsis byte-identical to master791912f. Both are 313,717 raw bytes and 101,332 gzip bytes at level 9. Both have SHA-256d994a6ba6f1d8d681e9f366ef8f82cb48b1903c2f0ca655f25ce9da758d04787. No additional E2E run was needed.export letreports "Cannot useexport letin runes mode". A dynamic class reports "main.js includes clsx" and directs the author to a class directive or string template. The tooling tests assert these failures and accept plain markup, string classes, and class directives.Release impact
None. Plugin behavior and bundle bytes are unchanged.
Note
Add Vite plugin to guard Svelte bundle size and enable runes mode
svelteSizeGuardsin svelte-size-guards.ts, a Vite plugin that fails a build when an emitted chunk contains a non-emptyclsxmodule. Chunks whereclsxrenders to zero length are allowed.clsximports.clsxsurvives tree-shaking in any chunk; check components using dynamic class expressions.Macroscope summarized 7b3198d.