Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuxt/scripts

Package Overview
Dependencies
Maintainers
7
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/scripts

Load third-party scripts with better performance, privacy and DX in Nuxt Apps.

  • 0.9.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
26K
decreased by-2.41%
Maintainers
7
Weekly downloads
 
Created
Source

nuxt-scripts-social-card

npm version npm downloads License Nuxt Volta

Nuxt Scripts

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.

Features

  • 🪨 Built on top of Unhead
  • 🎁 20+ third-party scripts integrations with fine-grained performance optimizations
  • 🏎️ Performance: Self hosting, advanced script loading triggers, best-practice defaults.
  • 🕵️ Privacy: Defaults to protect end users identity, script consent management APIs.
  • 🪵 DevTools: View your script with their status and see function logs
  • 🚀 0 dependencies, ~2kb minimal runtime

Background

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 was created to solve these issues and more with the goal of making third-party scripts more performant, have better privacy and be better DX overall.

🚀 Quick Start

To get started, simply run:

npx nuxi@latest module add scripts

That's it! The Nuxt Scripts module should be downloaded and added to your Nuxt Config modules.

⛰️ Next Steps

Need some inspiration to start using Nuxt Scripts? Try out the following:

  1. 🎉 Make it rain emojis with the Confetti Tutorial.
  2. 📚 Learn about how the Script Loading works.
  3. 🔍 Explore the Script Registry for popular pre-configured third-party scripts.
  4. 🚀 Load other scripts with useScript or Global Scripts.
  5. 🔨 Fine-tune your performance and privacy with Bundling and Consent Management.

⚖️ License

Licensed under the MIT license.

FAQs

Package last updated on 15 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc