From 2f23d12d33db9c37de0390b9cf3b025c74790486 Mon Sep 17 00:00:00 2001 From: Kai Salmen Date: Thu, 2 Jan 2025 11:13:39 +0100 Subject: [PATCH] Update README.md: overrides hint for monaco-editor/react --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index de683c21..00ea4629 100644 --- a/README.md +++ b/README.md @@ -300,6 +300,14 @@ import { loader } from "@monaco-editor/react"; loader.config({ monaco }); ``` +Because `@codingame/monaco-vscode-api` relies on it own build of `monaco-editor` it may be required to enforce the `monaco-editor` version via `overrides` (npm/pnpm) or `resolutions` (yarn): + +```json +"overrides": { + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~11.1.2" +} +``` + ### pnpm If you use pnpm, you have to add `vscode` / `@codingame/monaco-vscode-api` as direct dependency (you find the [compatibility table here](https://github.com/TypeFox/monaco-languageclient/blob/main/docs/versions-and-history.md#monaco-editor--codingamemonaco-vscode-api-compatibility-table), otherwise the installation will fail.