Fix monaco editor issues (#4724)

* Add sub filter for monaco editor

* Don't include files for unused languages

* Move necessary files and cleanup build

* Update sub filter for new location

* Still need to include default editor worker

* Fix error when model already exists
This commit is contained in:
Nicolas Mowen
2022-12-17 16:55:41 -07:00
committed by GitHub
parent c6f0abf732
commit 7953d131ae
4 changed files with 14 additions and 3 deletions

View File

@@ -10,7 +10,8 @@ export default defineConfig({
'import.meta.vitest': 'undefined',
},
plugins: [preact(), monacoEditorPlugin.default({
customWorkers: [{label: 'yaml', entry: 'monaco-yaml/yaml.worker'}]
customWorkers: [{ label: 'yaml', entry: 'monaco-yaml/yaml.worker' }],
languageWorkers: ['editorWorkerService'], // we don't use any of the default languages
})],
test: {
environment: 'jsdom',