Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: sveltkit vite docs #208

Merged
merged 3 commits into from
Sep 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,26 @@ An interactive web demo of Svelte Vega and Vega-Lite components using `svelte-ve
A full Svelte example project that uses `svelte-vega`.

If you are not sure how to integrate `svelte-vega` into your code, take a look at this example application.

### SvelteKit (Vite) Usage

SvelteKit uses Vite which performs an optimization process called dependency pre-building, which causes some [problems](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies) during development. To get Vite to work with svelte-vega update the SvelteKit's config as follows:

```js
const config = {
kit: {
target: "#svelte",
vite: {
optimizeDeps: {
include: [
"fast-deep-equal",
"clone",
"semver",
"json-stringify-pretty-compact",
"fast-json-stable-stringify",
],
},
},
},
};
```