svelte-dnd-action 0.9.38 → 0.9.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +15 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -281,6 +281,21 @@ declare namespace svelteHTML {
281
281
  ```
282
282
 
283
283
  You may need to edit `tsconfig.json` to include `global.d.ts` if it doesn't already: "include": ["src/**/*", "global.d.ts"].
284
+
285
+ > Note: If you are using Sveltekit you should use `svelte.config.js` to modify the generated `tsconfig.json` rather than adding the `include` element to the root `tsconfig.json`. Adding `include` to the root file will cause issues because it will [override](https://www.typescriptlang.org/tsconfig#extends) the `include` array defined in `.svelte-kit/tsconfig.json`. Example:
286
+ > ```javascript
287
+ > const config = {
288
+ > kit: {
289
+ > typescript: {
290
+ > config(config) {
291
+ > // This path is relative to the ".svelte-kit" folder
292
+ > config.include.push('../global.d.ts');
293
+ > },
294
+ > },
295
+ > },
296
+ > };
297
+ > ```
298
+
284
299
  Then you will be able to use the library with type safety as follows (Typescript gurus out there, improvements are welcome :smile:):
285
300
 
286
301
  ```html
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "svelte-dnd-action",
3
3
  "description": "*An awesome drag and drop library for Svelte 3 and 4 (not using the browser's built-in dnd, thanks god): Rich animations, nested containers, touch support and more *",
4
- "version": "0.9.38",
4
+ "version": "0.9.39",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/isaacHagoel/svelte-dnd-action.git"