perf: reduce frontend bundle by 57% by limiting Monaco Editor to SQL languages only#97
Open
Blankll wants to merge 1 commit into
Open
perf: reduce frontend bundle by 57% by limiting Monaco Editor to SQL languages only#97Blankll wants to merge 1 commit into
Blankll wants to merge 1 commit into
Conversation
…languages only Switch from the full monaco-editor bundle (which includes TypeScript, CSS, HTML, JSON language services and their heavy workers) to only importing the editor API + SQL/MySQL/PGSQL grammar contributions. Before: 16 MB dist/ with ts.worker (6.7 MB), css.worker, html.worker, json.worker After: 6.8 MB dist/ with only editor.worker + SQL grammars
Blankll
added a commit
that referenced
this pull request
Jun 16, 2026
Blankll
added a commit
that referenced
this pull request
Jun 16, 2026
36cf92e to
50c5814
Compare
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
Reduces the frontend bundle from 16 MB to 6.8 MB by switching from the full Monaco Editor bundle (which includes language services for TypeScript, CSS, HTML, JSON and 40+ other languages) to importing only the editor API and registering only SQL-related grammar contributions.
Changes
useMonacoEditor.ts: Import frommonaco-editor/esm/vs/editor/editor.apiinstead ofmonaco-editor, and add explicit imports forsql,mysql, andpgsqllanguage grammarstypes/vite-env.d.ts: Add type declaration for the sub-path import so TypeScript resolves types correctlyImpact
Verification
npm run buildpassesnpm run lint:checkpasses on changed filesNotes
This change has no impact on SQL editing functionality — syntax highlighting, autocompletion, keyboard shortcuts, gutter decorations, and all other editor features work identically.