@codemirror v0.18 in @codesandbox/sandpack-react breaks when targeted for es5
See original GitHub issueIssue Description
Error
With @codemirror v0.18.0 builds break, which is being used from react-smooshpack-1.0.0-beta-0
. Since, the @codemirror/autocomplete
uses Nullish Coalescing. And it is not transpiled when published to npm.
I am not sure, if codemirror
should handle this or the end user. But most of the build tools, don’t transpile their dependencies. And so, builds break when we transplie projects and not target es6 at the end.
new RegExp(`${addStart ? "^" : ""}(?:${source})${addEnd ? "$" : ""}`, expr.flags ?? (expr.ignoreCase ? "i" : ""));
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
CodeMirror 5 User Manual
To fire your own events, use CodeMirror.signal(target, name, args...) , where target is a non-DOM-node object. An editor instance ...
Read more >CodeMirror 5 to 6 Migration Guide
Migration Guide. This guide provides rough translations of how various basic operations in the CodeMirror 5.x interface work with the new system.
Read more >Example: Styling - CodeMirror
The important elements in the editor have regular (non-generated) CSS class names, which can be targeted with manually written style sheets.
Read more >Reference Manual - CodeMirror
Return a cursor that iterates over the given range of lines, without returning the line breaks between, and yielding empty strings for empty...
Read more >User Manual - CodeMirror
CodeMirror -focused: Whenever the editor is focused, the top element gets this class. This is used to hide the cursor and give the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I mean fixing to
0.18.0
, not^0.18.0
. v0.17 has its issues as well 😛 it’s not the first time the library broke something in sandpackappears to be fixed in 0.18.2. I will probably block the dependencies for codemirror in the future, but for now, it should work with removing yarn.lock and reinstalling our package to v0.0.1