danielroe / nuxt-zero-js

Remove all client-side JS from your Nuxt 3 app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nuxt Zero JS

npm version npm downloads Github Actions Codecov

Remove all client-side JS from your Nuxt 3 app

Features

⚠️ nuxt-zero-js is under active development. ⚠️

  • ✨ Completely removes preload/prefetch hints for JS bundle
  • 🚀 Removes <script> tag for payload and JS bundle
  • 🙏 Leaves your own head tags intact

Follow this issue for more information, and do comment if you'd like to see this feature in Nuxt itself.

Usage

export default defineNuxtConfig({
  modules: ['nuxt-zero-js'],
  //
  // By default the module is disabled in development for better
  // DX but you can force it to be enabled if you would like.
  //
  // zeroJs: {
  //   disabled: false,
  // },

That's it!

💻 Development

  • Clone this repository
  • Enable Corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using pnpm install
  • Stub module with pnpm dev:prepare
  • Run pnpm dev to start playground in development mode

License

Made with ❤️

Published under the MIT License.

About

Remove all client-side JS from your Nuxt 3 app

License:MIT License


Languages

Language:TypeScript 81.3%Language:JavaScript 15.3%Language:Vue 3.4%