mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 08:10:11 +01:00
Smoketest improvements: (#3369)
- Add a smoketest for packaging with vite - Re-enable the smoketest for packaging with esbuild - Re-enable the smoketest on webkit
This commit is contained in:
parent
a3d4b960c5
commit
5d653b2569
10 changed files with 934 additions and 12 deletions
31
test/smoke/vite/index.js
Normal file
31
test/smoke/vite/index.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as monaco from '../../../release/esm/vs/editor/editor.main';
|
||||
import editorWorker from '../../../release/esm/vs/editor/editor.worker?worker';
|
||||
import jsonWorker from '../../../release/esm/vs/language/json/json.worker?worker';
|
||||
import cssWorker from '../../../release/esm/vs/language/css/css.worker?worker';
|
||||
import htmlWorker from '../../../release/esm/vs/language/html/html.worker?worker';
|
||||
import tsWorker from '../../../release/esm/vs/language/typescript/ts.worker?worker';
|
||||
|
||||
self.MonacoEnvironment = {
|
||||
getWorker(moduleId, label) {
|
||||
if (label === 'json') {
|
||||
return new jsonWorker();
|
||||
}
|
||||
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||
return new cssWorker();
|
||||
}
|
||||
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||
return new htmlWorker();
|
||||
}
|
||||
if (label === 'typescript' || label === 'javascript') {
|
||||
return new tsWorker();
|
||||
}
|
||||
return new editorWorker();
|
||||
}
|
||||
};
|
||||
|
||||
window.monacoAPI = monaco;
|
||||
Loading…
Add table
Add a link
Reference in a new issue