Partytown integration for Nuxt

Overview

@nuxtjs/partytown

npm version npm downloads Github Actions CI Codecov License

Partytown integration for Nuxt

Features

  • 👌 Zero-config required
  • 🔥 Relocates resource intensive scripts into a web worker
  • ⚡️ Speeds up your site
  • 💯 Nuxt 3 and Nuxt Bridge support

Quick setup

  1. Install @nuxtjs/partytown!

    yarn add @nuxtjs/partytown # or npm install @nuxtjs/partytown
  2. Add it to the modules section of nuxt.config.ts

    import { defineNuxtConfig } from 'nuxt3'
    
    export default defineNuxtConfig({
      modules: ['@nuxtjs/partytown'],
    })
  3. Add type: 'text/partytown' attribute to any scripts you want to be handled by partytown.

    ">
    <template>
      <div>
        <Script type="text/partytown" src="https://example.com/analytics.js" />
      div>
    template>

Configuration

Partytown supports a number of options, which you can pass in your nuxt.config.ts file:

import { defineNuxtConfig } from 'nuxt3'

export default defineNuxtConfig({
  // ...
  partytown: {
    /**
     * When `true`, Partytown scripts are not minified. See https://partytown.builder.io/configuration
     * on how to enable more logging.
     *
     * @default true in development
     */
    debug: boolean
    /**
     * Path (relative to your base URL) where the Partytown library should be served from.
     *
     * @default '~partytown'
     */
    lib: string
    // For other options, see https://partytown.builder.io/configuration
  },
})

Development

  • Run yarn prepare to generate type stubs.
  • Use yarn dev to start playground in development mode.

Licence

MIT Licence

Comments
Releases(1.3.0)
Owner
Nuxt Community
Modules & Projects from Nuxt Community
Nuxt Community
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Add partytown support to WordPress sites.

WP Partytown This plugin is a POC for ticket #176 in WordPress/performance repo. Goals Allow plugin developers to execute scripts inside a Partytown W

rtCamp 31 Dec 12, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
BETA partytown-qwik

Qwik Partytown ?? This is a package that facilitates the implementation of PartyTown in Qwik. If you don't know what Qwik is See The implementation is

Leifer Mendez 7 Dec 20, 2022
🌉 Experience Nuxt 3 features on existing Nuxt 2 projects

?? Nuxt Bridge Experience Nuxt 3 features on existing Nuxt 2 projects. Bridge is a forward-compatibility layer that allows you to experience many of t

Nuxt 180 Jan 5, 2023
Localtunnel module for Nuxt to allow remote/external access to your Nuxt development server.

Nuxt Localtunnel A Nuxt module for automatically running localtunnnel to externally expose your development instance of Nuxt to the outside world. All

null 14 Sep 7, 2022
Batteries-included, zero-config Ionic integration for Nuxt

Nuxt Ionic Ionic integration for Nuxt ✨ Changelog ?? Read the documentation ▶️ Online playground Features ⚠️ nuxt-ionic is currently a work in progres

Daniel Roe 211 Dec 28, 2022
OpenID-Connect(OIDC) integration module for nuxt 3.0.

Nuxt OpenID-Connect OpenID-Connect(OIDC) integration module for nuxt 3.0. Features An Nuxt 3 module. OIDC integration ( implemetation base openid-clie

Aborn Jiang 10 Dec 24, 2022
✉️ Nuxt module for first class integration with popular newsletter providers

nuxt-newsletter Newsletter module for Nuxt 3 ✨ Release Notes ?? Read the documentation Features Nuxt 3 ready Easy integration with Mailchimp, Revue, B

Jakub Andrzejewski 39 Jan 5, 2023
[WIP] Firebase Integration for Nuxt(3)

Nuxt Firebase Integrate Firebase with Nuxt (3) This module is not ready for production use. Install # npm npm install -D firebase @e-chan1007/nuxt-fir

e-chan1007 5 Dec 8, 2022
Connect Web Integration illustrates the integration of Connect-Web in various JS frameworks and tooling

Connect Web Integration Connect Web Integration is a repository of example projects using Connect-Web with various JS frameworks and tooling. It provi

Buf 43 Dec 29, 2022
CSS optimization using critters for Nuxt

@nuxtjs/critters CSS optimization using critters for Nuxt Features Zero-configuration required Enables CSS Extraction Critical CSS automatically injec

Nuxt Community 76 Dec 26, 2022
🕋Assets Compression module for Nuxt 3

@nuxt-modules/compression Assets Compression module for Nuxt 3 ✨ Release Notes ?? Read the documentation Features Nuxt 3 ready Assets Compression usin

Nuxt Modules 26 Nov 21, 2022
"Nuxt-like" routing in Quasar projects

Quasar App Extension auto-routing "Nuxt-like" routing in Quasar projects Install quasar ext add auto-routing Quasar CLI will retrieve it from the NPM

Luke Diebold 19 Dec 2, 2022
Tools for Dump NUXT JS Environment Config Through Browser Window Object

Introduction Nuxt JS is an open source javascript framework making web development simple and powerful. This tool is used to get environment configura

Agus Setya R 7 Sep 5, 2022
Authenticated server-side rendering with Nuxt 3 and Firebase 9

Authenticated server-side rendering with Nuxt 3 and Firebase 9.

Robert Soriano 51 Dec 23, 2022
⚡️ Minimal GraphQL Client + Code Generation for Nuxt

nuxt-graphql-client ⚡️ Minimal GraphQL Client + Code Generation for Nuxt ⚡️ Minimal GraphQL Client + Code Generation for Nuxt Features Zero Configurat

Dizzy 245 Dec 27, 2022
A nuxt 2 wrapper around derrickreimer/fathom-client to be able to use usefathom.com in all its glory

This package is a nuxt 2 wrapper around derrickreimer/fathom-client to be able to use usefathom.com in all its glory. Thanks to @derrickreimer for this framework agnostic library ❤️‍??.

wellá 6 Aug 18, 2022
Nuxt.js module to use Unleash toggle feature services

nuxt-unleash Nuxt.js module to use Unleash toggle feature services ?? Release Notes Features Use $unleash to access and handle your Unleash feature fl

Juanjo Conejero 15 Dec 3, 2022