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(SvelteKit): remove unused import #550

Merged
merged 1 commit into from
Feb 2, 2024
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
17 changes: 6 additions & 11 deletions docs/sveltekit.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@ Adopting [this strategy](https://partytown.builder.io/copy-library-files#vite) f
```js
// vite.config.js

import { join } from 'path'
import { sveltekit } from '@sveltejs/kit/vite'
import { partytownVite } from '@builder.io/partytown/utils'
import { sveltekit } from '@sveltejs/kit/vite';
import { partytownVite } from '@builder.io/partytown/utils';

/** @type {import('vite').UserConfig} */
const config = {
plugins: [
sveltekit(),
partytownVite()
]
}
plugins: [sveltekit(), partytownVite()],
};

export default config
export default config;
```

## 2. Add the Partytown script to `src/routes/+layout.svelte`
Expand Down Expand Up @@ -80,9 +76,8 @@ This is where we use partytown to add those scripts (note `type="text/partytown"
</svelte:head>
```

## 4. Optional: reverse-proxying scripts
## 4. Optional: reverse-proxying scripts

This will only be necessary depending on which scripts you are using. The implementation will vary depending on hosting platform. See [Partytown's recommended guides](https://partytown.builder.io/proxying-requests#reverse-proxy).


Acknowledgements: credit belongs to monogram.io for [an earlier version of this guide](https://monogram.io/blog/add-partytown-to-svelte).
Loading