Optimize CodeEditor

This commit is contained in:
2024-01-09 16:03:22 +08:00
parent d98fd522cf
commit d802844516
4 changed files with 28 additions and 11 deletions

View File

@@ -2,6 +2,7 @@ import React from 'react'
import { editor, Selection } from 'monaco-editor'
import MonacoEditor, { Monaco } from '@monaco-editor/react'
import '@/components/Playground/CodeEditor/Editor/editor.scss'
import '@/components/Playground/CodeEditor/Editor/loader'
import { IEditorOptions, IFiles, ITheme } from '@/components/Playground/shared'
import { fileNameToLanguage } from '@/components/Playground/files'
import { useEditor, useTypesProgress } from '@/components/Playground/CodeEditor/Editor/hooks'

View File

@@ -0,0 +1,7 @@
import { loader } from '@monaco-editor/react'
loader.config({
paths: {
vs: 'https://unpkg.com/monaco-editor@0.45.0/min/vs'
}
})