monaco-editor/test/smoke/esbuild/index.js

22 lines
668 B
JavaScript
Raw Normal View History

2022-02-05 07:55:28 +08:00
import * as monaco from '../../../release/esm/vs/editor/editor.main.js';
self.MonacoEnvironment = {
getWorkerUrl: function (moduleId, label) {
if (label === 'json') {
return './out/vs/language/json/json.worker.js';
}
if (label === 'css' || label === 'scss' || label === 'less') {
return './out/vs/language/css/css.worker.js';
}
if (label === 'html' || label === 'handlebars' || label === 'razor') {
return './out/vs/language/html/html.worker.js';
}
if (label === 'typescript' || label === 'javascript') {
return './out/vs/language/typescript/ts.worker.js';
}
return './out/vs/editor/editor.worker.js';
}
};
window.monacoAPI = monaco;