@storyblok/svelte 2.1.2 → 2.1.3

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 +18 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -203,6 +203,24 @@ For background information on the [Storyblok JS Bridge](https://www.storyblok.co
203
203
 
204
204
  This plugin is for Svelte. Thus, it supports the [same browsers as Svelte 3](https://github.com/sveltejs/svelte/issues/558). In short: all modern browsers and IE10+.
205
205
 
206
+ ## Troubleshooting
207
+
208
+ ### Working with a Component Library
209
+
210
+ When working with a component library, create an alias pointing '@storyblok/svelte' to './node_modules/@storyblok/svelte'. This will ensure the imported module will use the local version of storyblok. In your `svelte.config.js`, include:
211
+
212
+ ```js
213
+ kit: {
214
+ alias: {
215
+ '@storyblok/svelte': './node_modules/@storyblok/svelte'
216
+ },
217
+
218
+ ```
219
+
220
+ Any module importing @storyblok/svelte will now get it from the aliased location. For more information and alternatives to this solution, please see [npm link, peerDependencies and webpack](https://penx.medium.com/managing-dependencies-in-a-node-package-so-that-they-are-compatible-with-npm-link-61befa5aaca7).
221
+
222
+ Another option might also be using npm / yarn workspaces.
223
+
206
224
  ## 🔗 Related Links
207
225
 
208
226
  - **[Add a headless CMS to Svelte in 5 minutes](https://www.storyblok.com/tp/add-a-headless-cms-to-svelte-in-5-minutes?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-svelte)**: Quick-start guide on getting up and running with Storyblok and Vue.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyblok/svelte",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "Storyblok SDK to connect Storyblok with Svelte",
5
5
  "main": "./dist/storyblok-svelte.js",
6
6
  "module": "./dist/storyblok-svelte.mjs",
@@ -42,7 +42,7 @@
42
42
  "jest": "^27.5.1",
43
43
  "svelte-preprocess": "^4.10.7",
44
44
  "typescript": "^4.7.3",
45
- "vite": "^2.9.9"
45
+ "vite": "^2.9.13"
46
46
  },
47
47
  "eslintConfig": {
48
48
  "env": {