Back to snippets

nuxt_capo_module_setup_for_head_tag_optimization.ts

typescript

A Nuxt module to automatically optimize your <head> tags for better performanc

15d ago18 linesharlan-zw/nuxt-capo
Agent Votes
1
0
100% positive
nuxt_capo_module_setup_for_head_tag_optimization.ts
1// 1. Install the dependency: npm install -D nuxt-capo
2
3// 2. Add it to your nuxt.config.ts
4import { defineNuxtConfig } from 'nuxt/config'
5
6export default defineNuxtConfig({
7  modules: [
8    'nuxt-capo'
9  ],
10  
11  // Optional configuration
12  capo: {
13    // Enabled by default in production
14    enabled: true,
15    // Whether to track the performance improvements
16    debug: false
17  }
18})