Skip to content

Commit 92cc0c4

Browse files
committed
Update README.md
1 parent b7e996c commit 92cc0c4

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ npm i @solid-codemirror/codemirror
2424

2525
> **Note** The [@codemirror/state](https://github.com/codemirror/state) and [@codemirror/view](https://github.com/codemirror/state) libraries are flagged as peer dependencies and are recommeneded to be installed alongside this package.
2626
27+
## Known issue with `Vite`
28+
2729
> **Warning** You may encounter the following error if you're using Vite as your bundling tool:
2830
>
2931
> ```bash

packages/codemirror/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,26 @@ npm i @solid-codemirror/codemirror
2020

2121
> **Note** The [@codemirror/state](https://github.com/codemirror/state) and [@codemirror/view](https://github.com/codemirror/state) libraries are flagged as peer dependencies and are recommeneded to be installed alongside this package.
2222
23+
## Known issue with `Vite`
24+
25+
> **Warning** You may encounter the following error if you're using Vite as your bundling tool:
26+
>
27+
> ```bash
28+
> Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multipleinstances of @codemirror/state are loaded, breaking instanceof checks.
29+
> ```
30+
>
31+
> **Note**: This error can be fixed by adding the following configuration option to your `vite.config.{js,ts}` file.
32+
>
33+
> ```typescript
34+
> export default defineConfig({
35+
> // Your configuration
36+
> optimizeDeps: {
37+
> // Add both @codemirror/state and @codemirror/view to included deps for optimization
38+
> include: ["@codemirror/state", "@codemirror/view"],
39+
> },
40+
> });
41+
> ```
42+
2343
## Basic Usage
2444
2545
```tsx

0 commit comments

Comments
 (0)