Optimize CodeEditor
This commit is contained in:
@@ -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'
|
||||
|
||||
7
src/components/Playground/CodeEditor/Editor/loader.ts
Normal file
7
src/components/Playground/CodeEditor/Editor/loader.ts
Normal 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'
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user