Skip to content

romaindurand/partytown-sveltekit

Repository files navigation

partytown-sveltekit

A simple svelte wrapper for @builder.io/partytown

Install

npm i -D partytown-sveltekit

Setup

Partytown requires some scripts to be served by the app and provides a convinience script to achieve this.

sveltekit

npx @builder.io/partytown copylib static/~partytown

svelte

npx @builder.io/partytown copylib public/~partytown

Usage

  • In your layout :
<script>
    import PartytownSnippet from 'partytown-sveltekit/PartytownSnippet.svelte'
</script>

<PartytownSnippet />
  • To include a third-party script :
<script>
    import Partytown from 'partytown-sveltekit/Partytown.svelte'
</script>

<Partytown script="<INLINE THIRD-PARTY SCRIPT>">

About

Simple svelte wrappers for @builder.io/partytown

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published