Important
This has been built into Nuxt since v3 - just use features.noScripts
--
Remove all client-side JS from your Nuxt 3 app
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.
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!
- Clone this repository
- Enable Corepack using
corepack enable
- Install dependencies using
pnpm install
- Stub module with
pnpm dev:prepare
- Run
pnpm dev
to start playground in development mode
Made with ❤️
Published under the MIT License.