Skip to content

Commit

Permalink
Update README.md: overrides hint for monaco-editor/react
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen authored Jan 2, 2025
1 parent 12bcdf9 commit 2f23d12
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2f23d12

Please sign in to comment.