monaco-yaml/src/yaml.worker.ts
Remco Haszing ccfbbbe9d8
Use extensions for directly importing files
For better ESM compatibility, this adds a file extension for nested
package files.

This also removes the nested special handling of
`vscode-languageserver-types` and `vscode-languageserver-document`
imports. This is unnecessary, because they use the `"module"` field in
`package.json`.
2021-11-20 12:05:44 +01:00

7 lines
265 B
TypeScript

import { initialize } from 'monaco-editor/esm/vs/editor/editor.worker.js';
import { createYAMLWorker, ICreateData } from './yamlWorker';
self.onmessage = () => {
initialize((ctx, createData: ICreateData) => Object.create(createYAMLWorker(ctx, createData)));
};