Skip to content

Commit 09b73e4

Browse files
authored
Merge pull request #168 from silinternational/feature/update-readme
Update readme
2 parents 87f5209 + bef1035 commit 09b73e4

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,19 @@ module.exports = {
106106
// ...
107107
```
108108

109+
## Sveltekit
110+
111+
Using this library in [Sveltekit](https://github.com/sveltejs/kit) is experimental (as of writing this Sveltekit is still in beta).
112+
You may get lots of source map source warnings as referenced [here](https://github.com/vitejs/vite/issues/2892) and it may take several seconds and/or refreshes for your app to start with `npm run dev`. Building and previewing your build should run smoothly. Below are a number of references that may be relevant to your experience:
113+
114+
https://kit.svelte.dev/faq#packages
115+
https://vitejs.dev/guide/dep-pre-bundling.html
116+
https://vitejs.dev/guide/features.html#npm-dependency-resolving-and-pre-bundling
117+
https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies
118+
https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#prebundlesveltelibraries
119+
https://github.com/vitejs/vite/issues/2892
120+
https://github.com/sveltejs/kit/issues/885
121+
109122
## components
110123

111124
A list of all components and their props can be found in our running instance of [Storybook](https://silinternational.github.io/ui-components/).
@@ -114,7 +127,7 @@ A list of all components and their props can be found in our running instance of
114127

115128
After installation and bundler configuration all of the components are ready to be imported.
116129

117-
Just include `import { Button } from '@silintl/ui-components'` in your script section to import Button and any other components you want to use.
130+
Just include `import { Button } from '@silintl/ui-components'` (Sveltekit/Vite will need to use the full url) in your script section to import Button and any other components you want to use.
118131

119132
## overriding default sass variables
120133

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Reusable Svelte components for some internal applications",
55
"main": "index.mjs",
66
"module": "index.mjs",
7+
"svelte": "index.mjs",
78
"scripts": {
89
"test": "echo test",
910
"format-all": "npx prettier --write .",

0 commit comments

Comments
 (0)