Skip to content

Commit 2ae719c

Browse files
committed
📄 docs: #22
1 parent 8e637a3 commit 2ae719c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

projects/svelte-localstorage/README.md

+14
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ This library for Svelte provides writable stores that automatically synchronize
77
npm install --save-dev @babichjacob/svelte-localstorage
88
```
99

10+
### ⌨️ TypeScript
11+
This package uses JSDoc for types and documentation, so an extra step is needed to use it in TypeScript projects [for now](https://github.com/babichjacob/svelte-localstorage/issues/22). Configure your `tsconfig.json` so that it has `compilerOptions.maxNodeModuleJsDepth` set to at least 1:
12+
```json
13+
// tsconfig.json
14+
{
15+
// When using SvelteKit: "extends": "./.svelte-kit/tsconfig.json",
16+
"compilerOptions": {
17+
// Other options...
18+
"maxNodeModuleJsDepth": 1
19+
}
20+
}
21+
```
22+
23+
1024
## 🧰 SvelteKit
1125
Because this package relies on SvelteKit's generated code, you have to prevent Vite from bundling it in advance ([which results in a build error](https://github.com/babichjacob/svelte-localstorage/issues/18)):
1226
```js

0 commit comments

Comments
 (0)