TypeFox / monaco-components

Monaco Editor and Language Client Wrapper, plus Monaco Editor React Component
MIT License
42 stars 13 forks source link

Bundling without vscode #40

Closed cdietrich closed 9 months ago

cdietrich commented 1 year ago

Hi, has someone experimented bundling (am using create-react-app) without vscode to reduce bundle size?

kaisalmen commented 1 year ago

The core combination of monaco-editor & vscode is the bare minimum, but all non-mandatory service are loaded as dynamic imports and therefore only if you configure them. npm run build creates a production bundle with vite/rollup for both packages. The bundle is contained in both npm packages and exported.

cdietrich commented 1 year ago

so there is no chance to get below the 8MB

kaisalmen commented 1 year ago

That is the price for having the real vscode api compared to the re-implemented and incomplete vscode api monaco-languageclient had in the past. Splitting the extension hosts up further did not work so far: https://github.com/CodinGame/monaco-vscode-api/issues/136

If you don't need the languageclient then of course it is always the option to stick with pure monaco-editor.

kaisalmen commented 9 months ago

Bundles have become smaller, but we need to rely on @codingame/monaco-vscode-api.