✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
use monaco microsoft cdn
AykutSarac87fba5e41046
diff --git a/package.json b/package.jsonindex 9b604f65..9ae18aa8 100644--- a/package.json+++ b/package.json@@ -17,6 +17,7 @@"allotment": "^1.14.5","compress-json": "^2.0.1","html-to-image": "^1.9.0",+ "monaco-editor": "^0.33.0","next": "^12.1.5","next-transpile-modules": "^9.0.0","parse-json": "^6.0.2",diff --git a/src/containers/Editor/JsonEditor/index.tsx b/src/containers/Editor/JsonEditor/index.tsxindex ccb7ed78..f7ca93fc 100644--- a/src/containers/Editor/JsonEditor/index.tsx+++ b/src/containers/Editor/JsonEditor/index.tsx@@ -1,13 +1,17 @@import React from "react";+import styled from "styled-components";import Editor from "@monaco-editor/react";import parseJson from "parse-json";-import styled from "styled-components";-import { ErrorContainer } from "src/components/ErrorContainer/ErrorContainer";-import { Loading } from "src/components/Loading";import { loader } from "@monaco-editor/react";+import { ErrorContainer } from "src/components/ErrorContainer/ErrorContainer";import useConfig from "src/hooks/store/useConfig";+import { Loading } from "src/components/Loading";-loader.config({ paths: { vs: "/monaco-editor/min/vs" } });+loader.config({+ paths: {+ vs: "https://microsoft.github.io/monaco-editor/node_modules/monaco-editor/min/vs",+ },+});const StyledEditorWrapper = styled.div`display: flex;diff --git a/yarn.lock b/yarn.lockindex 28130ac0..b8910492 100644--- a/yarn.lock+++ b/yarn.lock@@ -5070,6 +5070,11 @@ mkdirp@^0.5.5:dependencies:minimist "^1.2.6"+monaco-editor@^0.33.0:+ version "0.33.0"+ resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.33.0.tgz#842e244f3750a2482f8a29c676b5684e75ff34af"+ integrity sha512-VcRWPSLIUEgQJQIE0pVT8FcGBIgFoxz7jtqctE+IiCxWugD0DwgyQBcZBhdSrdMC84eumoqMZsGl2GTreOzwqw==+moo@^0.5.0:version "0.5.1"resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.1.tgz#7aae7f384b9b09f620b6abf6f74ebbcd1b65dbc4"