CodinGame / monaco-vscode-api

VSCode public API plugged on the monaco editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`monaco-treemending` deleting `edcore.main.js`

char0n opened this issue · comments

I've noticed that monaco-treemending script is removing esm/vs/editor/edcore.main.js file. I use this entrypoint to simulate API of https://www.npmjs.com/package/monaco-editor-core.

Is it by design?

The patch is created between the output of the vscode monaco build process not treeshaken (so monaco-editor-code treemended) and the official monaco-editor. So if monaco-editor adds some files compared to monaco-editor-core, there's change they will be removed. What do you mean by

to simulate API of https://www.npmjs.com/package/monaco-editor-core

?

I'm using following webpack@5 alias to avoid pulling following imports into the bundle:

Webpack alias:

// This alias doesn't pull any languages into bundles and works as monaco-editor-core was installed
'monaco-editor$': 'monaco-editor/esm/vs/editor/edcore.main.js',

Unwanted languages:

import '../language/css/monaco.contribution';
import '../language/html/monaco.contribution';
import '../language/json/monaco.contribution';
import '../language/typescript/monaco.contribution';

When using monaco-vscode-api, you don't need those aliases

When using monaco-vscode-api, you don't need those aliases

Could you elaborate maybe why? Thanks!

Cause of that treemending script that already removes monaco-specific features