File tree 3 files changed +12
-0
lines changed
src/Components/CodeEditor
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 24
24
"js-yaml" : " ^4.1.0" ,
25
25
"lodash.clonedeep" : " ^4.5.0" ,
26
26
"moment" : " ^2.29.4" ,
27
+ "monaco-editor" : " ^0.36.1" ,
27
28
"object-path" : " ^0.11.8" ,
28
29
"qs" : " ^6.11.0" ,
29
30
"rc-slider" : " ^9.7.5" ,
Original file line number Diff line number Diff line change
1
+ import * as monaco from "monaco-editor"
1
2
import Editor , { loader } from "@monaco-editor/react"
2
3
import React from "react"
3
4
@@ -18,6 +19,11 @@ const consoleTheme = {
18
19
} ,
19
20
}
20
21
22
+ // load required files from local, not from CDN registry
23
+ // see: https://github.com/suren-atoyan/monaco-react/blob/master/README.md#loader-config
24
+ // https://github.com/suren-atoyan/monaco-react/issues/327
25
+ loader . config ( { monaco } )
26
+
21
27
loader
22
28
. init ( )
23
29
. then ( ( monaco ) => {
Original file line number Diff line number Diff line change @@ -7287,6 +7287,11 @@ moment@^2.29.4:
7287
7287
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
7288
7288
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
7289
7289
7290
+ monaco-editor@^0.36.1 :
7291
+ version "0.36.1"
7292
+ resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.36.1.tgz#aad528c815605307473a1634612946921d8079b5"
7293
+ integrity sha512-/CaclMHKQ3A6rnzBzOADfwdSJ25BFoFT0Emxsc4zYVyav5SkK9iA6lEtIeuN/oRYbwPgviJT+t3l+sjFa28jYg==
7294
+
7290
7295
7291
7296
version "2.0.0"
7292
7297
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
You can’t perform that action at this time.
0 commit comments