Re:Ace, CodeMirror, and Monaco: A comparison of browser code...
by masfrost on Monday March 14, 2022 @01:18PM
(#30675152)
The 1MB number is not correct, the core of CodeMirror is 150kb before gzip. Codejar is pretty cool, but it's super minimal, it's great if you want something very basic. It also doesn't really work on mobile despite using contentEditable.
[ Parent
| on HN ]
Re:Ace, CodeMirror, and Monaco: A comparison of browser code...
by bityard on Monday March 14, 2022 @02:17PM
(#30675957)
I'm not taking gzip into consideration, I'm going by the fact that this file is 1.14MB: https://codemirror.net/6/codemirror.js
Re:Ace, CodeMirror, and Monaco: A comparison of browser code...
by grayrest on Monday March 14, 2022 @03:24PM
(#30676980)
The size is going to depend on the set of features enabled and I expect that build has everything turned on so that it can be used for all the demos.
I did a quick check of a CM6 project (customizing the JS lexer) with the base options and a JS-derived lexer and it came out to 405k / 124k gzip. I wouldn't consider it especially lightweight but I think the size is reasonable for the feature set.
Re:Ace, CodeMirror, and Monaco: A comparison of browser code...
by masfrost on Monday March 14, 2022 @04:54PM
(#30678149)
Hmm, not sure.
Here it is around 300kb inflated https://codemirror-basic-setup.replitfaris.repl.co/ using the basic-setup package, and I don't think this build tree-shakes.
Code for this build is here https://codemirror-basic-setup.replitfaris.repl.co/__repl