Tree-shaking is removing methods from CodeEditorWidget
See original GitHub issueWhen upgrading monaco-editor
from 0.13.1 to 0.14.3, some of the methods we (ab)use in GitKraken’s integration of Monaco disappeared:
CodeEditorWidget._registerDecorationType
CordEditorWidget.setDecorations
Although these methods were technically not part of the exposed editor API, we bit the bullet and hoped that there wouldn’t be any Monaco code changes that would cause issues down the line.
Fast forwards to today: they’re no longer defined on an editor instance. However, they’re still part of the Monaco source code for CodeEditorWidget
. I believe the tree-shaking introduced in 0.14.0 is shaking them out during the compile/bundle step.
I recognize that it probably isn’t a priority for the release bundle to expose access to internal APIs. Would it be possible to make these an official part of the API? Is there some other way to achieve parity?
monaco-editor version: 0.14.3 Browser: Electron 1.8.4 OS: Mac OS X, Windows, Linux
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Woohoo! After I got it. Thanks a bunch @alexandrudima!
Here’s the gist of how I solved the issue, posted here for posterity:
isWholeLine
affects the rendering when usingclassName
. docrangeBehavior
=>stickiness
. docoverviewRulerLane
=>overviewRuler
. doc