microsoft / monaco-editor-webpack-plugin

Moved to https://github.com/microsoft/monaco-editor
482 stars 98 forks source link

All languages are bundled #125

Closed bodinsamuel closed 3 years ago

bodinsamuel commented 4 years ago

Hello,

We are using this library since a long time and didnot really paid attention to bundled results (as it really big anyway). Just noticed today that all languages definition (dev/vs/basic-languages/.*) ends up in the prod bundle even whit the property languages specified.

Is it normal? Thanks

rhys-e commented 4 years ago

Seeing the same behaviour, the langauges option doesn't seem to filter the bundled js files

mattgodbolt commented 3 years ago

Also seeing this, and it's leading to this hitting our Safari users: https://github.com/microsoft/monaco-editor/issues/2179

mattgodbolt commented 3 years ago

Ah! This is a result of calling import * as monaco from 'monaco-editor' or equivalent. The README says:

import * as monaco from 'monaco-editor'
// or import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
// if shipping only a subset of the features & languages is desired

And I had forgotten to do just that. Replacing the import with the editor.api one fixed inclusion for me!