mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 08:19:59 +00:00
chore(ui): bump bundle size guard for CodeMirror editor upgrade
Total dist/ui gzipped grew from ~1.5MB to ~1.6MB after the CodeEditor switch from react-simple-code-editor + prism-react-renderer to CodeMirror 6. The verify-bundle script preamble notes the cap is a sanity check for accidental large dependencies, not a hard performance target; this is an intentional editor upgrade to restore native selection/copy in the codex config.toml viewer.
This commit is contained in:
@@ -16,7 +16,10 @@ const path = require('path');
|
||||
const zlib = require('zlib');
|
||||
|
||||
const UI_DIR = path.join(__dirname, '../dist/ui');
|
||||
const MAX_SIZE = 1.5 * 1024 * 1024; // 1.5MB - reasonable for full-featured React dashboard
|
||||
// 1.75MB - bumped from 1.5MB when the code editor moved from
|
||||
// react-simple-code-editor + prism-react-renderer (~18KB) to CodeMirror 6
|
||||
// (~80KB gzipped) to restore native selection/copy in the raw config viewers.
|
||||
const MAX_SIZE = 1.75 * 1024 * 1024;
|
||||
|
||||
function getGzipSize(filePath) {
|
||||
const content = fs.readFileSync(filePath);
|
||||
|
||||
Reference in New Issue
Block a user