diff --git a/src/ts.worker.ts b/src/ts.worker.ts new file mode 100644 index 00000000..b55939f2 --- /dev/null +++ b/src/ts.worker.ts @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as worker from 'monaco-editor-core/esm/vs/editor/editor.worker'; +import { TypeScriptWorker } from './tsWorker'; + +self.onmessage = () => { + // ignore the first message + worker.initialize((ctx, createData) => { + return new TypeScriptWorker(ctx, createData) + }); +}; diff --git a/src/tsconfig.esm.json b/src/tsconfig.esm.json index bdcb3251..b95798a9 100644 --- a/src/tsconfig.esm.json +++ b/src/tsconfig.esm.json @@ -1,6 +1,7 @@ { "compilerOptions": { "module": "esnext", + "moduleResolution": "node", "outDir": "../release/esm", "target": "es5", "lib": [ diff --git a/src/tsconfig.json b/src/tsconfig.json index 4f00318a..f4ff52fe 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "module": "amd", + "moduleResolution": "node", "outDir": "../release/dev", "target": "es5", "lib": [