Repository navigation
Split npm dependencies into a vendor chunk - #13
Merged
Merged
Conversation
Everything landed in one 3.5 MB chunk, so any Scala change invalidated React and semantic-ui-react along with it, and the browser re-downloaded all of it for a one-line edit. npm dependencies now go to a `vendor` chunk, which only changes when package.json does. The chunk size warning limit goes from the default 500 kB, which a Scala.js app always exceeds, to just above the current app chunk, so the warning fires again only if the bundle grows materially. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WLJ6KPxFVco7fXsDVT2FhF
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.
Changes to
web/vite.config.js:manualChunkssends everything fromnode_modulesto avendorchunk. Before, the whole app was one 3.5 MB chunk, so any Scala change invalidated React and semantic-ui-react along with it. Vendor code now changes only whenpackage.jsondoes, so browsers keep it cached.chunkSizeWarningLimit: 3500: the default of 500 kB always fires for a Scala.js app. With the limit just above the current app chunk, the warning only fires again if the bundle grows materially."use client"directives no longer mentions MUI specifically.🤖 Generated with Claude Code
https://claude.ai/code/session_01WLJ6KPxFVco7fXsDVT2FhF