Nuxt
There is a first-class Nuxt integration for partytown.
Install
Add @nuxtjs/partytown
dependency to your project.
Configure
Add @nuxtjs/partytown
to the modules
section of nuxt.config.ts
. Use the partytown
property for the configuration.
Partytown Script
Add type: 'text/partytown'
attribute to any scripts you want to be handled by partytown.
Note that the Nuxt Partytown module already handles copying the library files to the correct location.