website: monaco loading improvements
Some checks failed
CI / CI (push) Has been cancelled

This commit is contained in:
Henning Dieterichs 2024-07-16 19:27:14 +02:00 committed by Henning Dieterichs
parent 5eb2aba338
commit 5181be1011
2 changed files with 8 additions and 0 deletions

View file

@ -62,6 +62,10 @@ async function _loadMonaco(setup: IMonacoSetup): Promise<typeof monaco> {
return new Promise((res) => {
// First load editor.main. If it inlines the plugins, we don't want to try to load them from the server.
req(["vs/editor/editor.main"], () => {
if ((setup as any).onlyCore) {
res(monaco);
return;
}
req(
[
"vs/basic-languages/monaco.contribution",