Feat(CodeEditor): Support add extra libs

This commit is contained in:
2024-10-16 18:14:18 +08:00
parent b353ab07e2
commit 47dac4c9c7
10 changed files with 47 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ import {
TOOL_UNDER_REVIEW
} from '@/constants/common.constants'
import { navigateToRepository } from '@/util/navigation'
import editorExtraLibs from '@/util/editorExtraLibs'
import { r_tool_category_get, r_tool_detail, r_tool_update } from '@/services/tool'
import { IFiles, IImportMap, ITsconfig } from '@/components/Playground/shared'
import {
@@ -443,6 +444,7 @@ const Edit = () => {
onRenameFile={(_, __, files) => setFiles(files)}
onChangeFileContent={handleOnChangeFileContent}
onSelectedFileChange={setSelectedFileName}
extraLibs={editorExtraLibs}
/>
<Playground.Output
files={files}