@@ -12,7 +12,7 @@ import type { StateStack } from "vscode-textmate";
1212// from installed extensions, so the language-specific workers would just be
1313// dead weight (each pulls in a megabyte-class language server).
1414import EditorWorker from "monaco-editor/esm/vs/editor/editor.worker.js?worker&inline" ;
15- import monacoCssUrl from "monaco-editor/min/vs/editor/editor.main.css?url " ;
15+ import monacoCssText from "monaco-editor/min/vs/editor/editor.main.css?inline " ;
1616import onigWasmUrl from "vscode-oniguruma/release/onig.wasm?url" ;
1717import { useEffect , useRef } from "react" ;
1818import { useCommandRegistry } from "@dotdirfm/commands" ;
@@ -619,12 +619,11 @@ function createMonacoEditorExtensionApi(hostApi: DotDirGlobalApi, runtime?: Mona
619619 }
620620
621621 async function ensureMonacoReady ( ) : Promise < void > {
622- if ( ! monacoCssReady && typeof document !== "undefined" && document . head && monacoCssUrl ) {
623- const link = document . createElement ( "link" ) ;
624- link . setAttribute ( "data-monaco" , "true" ) ;
625- link . rel = "stylesheet" ;
626- link . href = monacoCssUrl ;
627- document . head . appendChild ( link ) ;
622+ if ( ! monacoCssReady && typeof document !== "undefined" && document . head && monacoCssText ) {
623+ const style = document . createElement ( "style" ) ;
624+ style . setAttribute ( "data-monaco" , "true" ) ;
625+ style . textContent = monacoCssText ;
626+ document . head . appendChild ( style ) ;
628627 monacoCssReady = true ;
629628 }
630629 if ( monacoReady ) return ;
0 commit comments