Skip to content

Commit

Permalink
README: Clarify vite dedupe usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen committed Oct 4, 2023
1 parent 08c1a93 commit 329680f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ There are [Volta](https://volta.sh/) instructions in the `package.json` files. W

When you are using vite for development please be aware of [this recommendation](https://github.com/CodinGame/monaco-vscode-api#if-you-use-vite).

Since version `1.82.0` of `@codingame/monaco-vscode-api` you need to add this your vite configuration:
If you see the problem *Assertion failed (There is already an extension with this id)* you likely have mismatching dependencies defined for `monaco-editor` or `@codingame/monaco-vscode-api`. You should fix this or add the following entry to your vite config:

```javascript
resolve: {
Expand Down
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export default defineConfig(() => {
}
},
resolve: {
dedupe: ['monaco-editor', 'vscode']
// not needed here, see https://github.com/TypeFox/monaco-languageclient#vite-dev-server-troubleshooting
// dedupe: ['monaco-editor', 'vscode']
},
server: {
origin: 'http://localhost:8080',
Expand Down

0 comments on commit 329680f

Please sign in to comment.