Fixes #2705: Call create also from the ESM worker

This commit is contained in:
Alexandru Dima 2021-12-14 18:00:17 +01:00
parent ad4a942460
commit 888883e33e
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9

View file

@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import * as edworker from 'monaco-editor-core/esm/vs/editor/editor.worker';
import { TypeScriptWorker, ICreateData } from './tsWorker';
import { ICreateData, create } from './tsWorker';
import { worker } from '../fillers/monaco-editor-core';
self.onmessage = () => {
// ignore the first message
edworker.initialize((ctx: worker.IWorkerContext, createData: ICreateData) => {
return new TypeScriptWorker(ctx, createData);
return create(ctx, createData);
});
};