From e1f51cf3b97806052f5ba57d025985cc44a841e5 Mon Sep 17 00:00:00 2001 From: ngc2207 Date: Sun, 5 Jan 2025 05:41:48 +0800 Subject: [PATCH] fix(playground): update Monaco editor loader configuration and adjust editor reference type --- src/app/playground/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/playground/page.tsx b/src/app/playground/page.tsx index 0014690..809c9f4 100644 --- a/src/app/playground/page.tsx +++ b/src/app/playground/page.tsx @@ -1,6 +1,5 @@ "use client"; -import * as monaco from "monaco-editor"; import { connectToLanguageServer } from "@/lib/lsp"; import { useEffect, useRef, useState } from "react"; import { Editor, loader } from "@monaco-editor/react"; @@ -41,12 +40,13 @@ int main() { }, }; -loader.config({ monaco }); +loader.config({ paths: { vs: "/vs" } }); export default function PlaygroundPage() { const [language, setLanguage] = useState("c"); const file = files[language]; - const editorRef = useRef(null); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const editorRef = useRef(null); const webSocketRef = useRef(null); const languageClientRef = useRef(null);