diff --git a/docs/sveltekit.md b/docs/sveltekit.md index 436871b4..d8cb1916 100644 --- a/docs/sveltekit.md +++ b/docs/sveltekit.md @@ -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` @@ -80,9 +76,8 @@ This is where we use partytown to add those scripts (note `type="text/partytown" ``` -## 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).