Plug-and-play script optimization for Nuxt applications. (Public Preview)
Better Privacy, Performance, and DX for Third-Party Scripts in Nuxt Apps.
[!IMPORTANT]
Nuxt Scripts is in beta, use with caution as some APIs may change.
Loading third-party IIFE scripts using useHead composable is easy. However,
things start getting more complicated quickly around SSR, lazy loading, and type safety.
Nuxt Scripts solves these issues and more with the goal of making third-party scripts more performant,
have better privacy and be better DX overall.
To get started, simply run:
npx nuxi@latest module add scripts
[!TIP]
Generate an Agent Skill for this package using skilld:npx skilld add @nuxt/scripts
Thatโs it. The Nuxt Scripts module should be downloaded and added to your Nuxt Config modules.
Explore live examples on StackBlitz:
Need some inspiration to start using Nuxt Scripts? Try out the following:
Licensed under the MIT license.