Skip to content

Commit

Permalink
Possible fix to monaco loader trying to load from CDN rather than a l…
Browse files Browse the repository at this point in the history
…ocal build.
  • Loading branch information
EvieePy committed Oct 4, 2022
1 parent 08397d0 commit e6d0156
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mystbin/frontend/components/MonacoEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import loader from '@monaco-editor/loader';
import {
monaco,
ControlledEditor,
ControlledEditorOnChange,
} from "@monaco-editor/react";
import { PropsWithoutRef } from "react";

monaco.init().then((monaco) => {

loader.config({ monaco })

loader.init().then((monaco) => {
// MystBin Dark
monaco.editor.defineTheme("mystBinDark", {
base: "vs-dark",
Expand Down
3 changes: 3 additions & 0 deletions mystbin/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dependencies": {
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@fortawesome/fontawesome-svg-core": "^6.2.0",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
"@material-ui/x-grid": "^4.0.0-alpha.37",
Expand All @@ -31,6 +32,8 @@
"flux": "^4.0.1",
"http-proxy": "^1.18.1",
"install": "^0.13.0",
"monaco-editor": "^0.34.0",
"monaco-editor-webpack-plugin": "^7.0.1",
"mui-datatables": "^4.2.2",
"next": "^11.0.0",
"react": "17.0.1",
Expand Down
33 changes: 33 additions & 0 deletions mystbin/frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,18 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"

"@fortawesome/[email protected]":
version "6.2.0"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.2.0.tgz#76467a94aa888aeb22aafa43eb6ff889df3a5a7f"
integrity sha512-rBevIsj2nclStJ7AxTdfsa3ovHb1H+qApwrxcTVo+NNdeJiB9V75hsKfrkG5AwNcRUNxrPPiScGYCNmLMoh8pg==

"@fortawesome/fontawesome-svg-core@^6.2.0":
version "6.2.0"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.2.0.tgz#11856eaf4dd1d865c442ddea1eed8ee855186ba2"
integrity sha512-Cf2mAAeMWFMzpLC7Y9H1I4o3wEU+XovVJhTiNG8ZNgSQj53yl7OCJaS80K4YjrABWZzbAHVaoHE1dVJ27AAYXw==
dependencies:
"@fortawesome/fontawesome-common-types" "6.2.0"

"@hapi/[email protected]":
version "5.0.2"
resolved "https://registry.yarnpkg.com/@hapi/accept/-/accept-5.0.2.tgz#ab7043b037e68b722f93f376afb05e85c0699523"
Expand Down Expand Up @@ -2738,6 +2750,15 @@ loader-utils@^2.0.0:
emojis-list "^3.0.0"
json5 "^2.1.2"

loader-utils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129"
integrity sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==
dependencies:
big.js "^5.2.2"
emojis-list "^3.0.0"
json5 "^2.1.2"

locate-path@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
Expand Down Expand Up @@ -2896,6 +2917,18 @@ mkdirp@^0.5.0:
dependencies:
minimist "^1.2.5"

monaco-editor-webpack-plugin@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-7.0.1.tgz#ba19c60aba990184e36ad8722b1ed6a564527c7c"
integrity sha512-M8qIqizltrPlIbrb73cZdTWfU9sIsUVFvAZkL3KGjAHmVWEJ0hZKa/uad14JuOckc0GwnCaoGHvMoYtJjVyCzw==
dependencies:
loader-utils "^2.0.2"

monaco-editor@^0.34.0:
version "0.34.0"
resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.34.0.tgz#b1749870a1f795dbfc4dc03d8e9b646ddcbeefa7"
integrity sha512-VF+S5zG8wxfinLKLrWcl4WUizMx+LeJrG4PM/M78OhcwocpV0jiyhX/pG6Q9jIOhrb/ckYi6nHnaR5OojlOZCQ==

[email protected]:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
Expand Down

0 comments on commit e6d0156

Please sign in to comment.