Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@codemirror v0.18 in @codesandbox/sandpack-react breaks when targeted for es5

See original GitHub issue


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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

alexnmcommented, Mar 14, 2021

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 sandpack

alexnmcommented, Mar 15, 2021

appears 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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found