monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

tune(monaco-editor-webpack-plugin): replace editor.main.js

Open ValeraS opened this issue 3 years ago • 6 comments

Usually editor functionality used as:

import * as monaco from 'monaco-editor';

this resolves to ./esm/vs/editor/editor.main.js in package.json.

editor.main.js includes all feature and languages. Because of this, webpack-plugin does not work as expected.

This PR proposes replacing editor.main.js with editor.api.js and requested features and languages.

Closes #2874

ValeraS avatar Dec 30 '21 14:12 ValeraS

Thanks for your PR! Can you please open an issue to describe the problem that this PR fixes?

hediet avatar Jan 03 '22 08:01 hediet

Thanks for your PR! Can you please open an issue to describe the problem that this PR fixes?

Should I open an issue with text from the first comment or should I describe something more fully?

ValeraS avatar Jan 03 '22 14:01 ValeraS

Please also describe what you mean with "does not work as expected". Thank you!

hediet avatar Jan 03 '22 14:01 hediet

Maybe also need to change this line https://github.com/microsoft/monaco-editor/blob/a385674a34a33947483e0f7266b5a7dbcefe9b9d/webpack-plugin/src/index.ts#L315 to check only editor.main.js

ValeraS avatar Jan 03 '22 17:01 ValeraS

Great idea!

To test this change, we adopted the smoke-test to import monaco-editor (instead of ./esm/vs/editor/editor.api.js), but unfortunately this breaks CI now. Can you look into it?

Thank you!

hediet avatar Feb 03 '22 15:02 hediet

👍 👀

yaohwu avatar Sep 08 '22 08:09 yaohwu

Any chance we can bring this in? We deploy with our own custom language and it's unfortunate to be forced to bundle 89 languages along with it.

Alternatively, does someone have a reasonable workaround for the time being?

jmroon avatar Jan 31 '23 19:01 jmroon

We have the same issue, would be great to fix it.

stropalov avatar Feb 10 '23 16:02 stropalov

It would be great to have this merged so please don't forget about this PR.

vladplesu avatar Mar 07 '23 09:03 vladplesu