Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try react-simple-code-editor instead of CodeMirror #1054

Closed
sapegin opened this issue Jul 16, 2018 · 0 comments
Closed

Try react-simple-code-editor instead of CodeMirror #1054

sapegin opened this issue Jul 16, 2018 · 0 comments

Comments

@sapegin
Copy link
Member

sapegin commented Jul 16, 2018

CodeMirror is huge and we have to code-split it, which cases issues in CRA 2. react-simple-code-editor is a really tiny minimalistic code editor, that should be enough for our needs.

Note: we'll ether ship Highlight.js in the browser bundle, or migrate to Prism, if it's smaller. Or find another microlibrary that only highlights JS/JSX.

Note: it's likely a breaking change because the editorConfig option will be incompatible.

Some numbers (minified + gzipped, according to Bundlephobia):

  • codemirror (54.5 KB) + react-codemirror2 (2.7 KB) = 57.2 KB
  • react-simple-code-editor (2.9 KB) + Prism (4.7 KB) = 7.6 KB
@sapegin sapegin added this to the 8.0.0 milestone Jul 16, 2018
sapegin added a commit that referenced this issue Aug 5, 2018
BREAKING CHANGE:

* editorConfig option is no longer available
* Remove code splitting and Bable dynamic import plugins

Closes #987 #1054
sapegin added a commit that referenced this issue Aug 6, 2018
BREAKING CHANGE:

* editorConfig option is no longer available
* Remove code splitting and Bable dynamic import plugins

Closes #987 #1054
@sapegin sapegin closed this as completed Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant