CodinGame / monaco-vscode-api

VSCode public API plugged on the monaco editor
MIT License
214 stars 29 forks source link

Formatting configuration is treeshaken away #286

Closed CompuIves closed 7 months ago

CompuIves commented 7 months ago

This configuration is currently tree-shaken away, and it causes the formatting decision maker to ignore editor.defaultFormatter. I see that the file is imported here, and the format.contribution file is imported in our contributions. So I assume that it's tree-shaken away, but I don't understand why. Is it because the class is not exported?

CompuIves commented 7 months ago

Ah, I'm not 100% sure, but does this code mean that we tree-shake Registry.as out?

CGNonofr commented 7 months ago

It's removed because moduleSideEffects returns false for them. There are some pretty weak heuristics :-\

The solutions are: