Skip to content

Commit

Permalink
Load monaco editor from npm package not cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
daryllimyt committed Jan 15, 2025
1 parent 06ffc3a commit ffb5d7b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/components/editor/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import { useEffect } from "react"
import { EditorFunctionRead, editorListFunctions } from "@/client"
import {
EditorProps,
loader,
Editor as ReactMonacoEditor,
type EditorProps,
type Monaco,
} from "@monaco-editor/react"
import * as monaco from "monaco-editor"
import { editor, IDisposable, IRange, languages } from "monaco-editor"

import { cn } from "@/lib/utils"
Expand All @@ -33,6 +35,8 @@ import {
} from "@/components/editor/yaml-lang"
import { CenteredSpinner } from "@/components/loading/spinner"

loader.config({ monaco })

const constructDslLang = (): {
conf: languages.LanguageConfiguration
lang: languages.IMonarchLanguage
Expand Down

0 comments on commit ffb5d7b

Please sign in to comment.