0.1.1 • Published 8 months ago

nuxt-speculation-rule v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

My Module

npm version npm downloads License Nuxt

My new Nuxt module for doing amazing things.

Features

Quick Setup

  1. Add nuxt-speculation-rule dependency to your project
# Using pnpm
pnpm add -D nuxt-speculation-rule

# Using yarn
yarn add --dev nuxt-speculation-rule

# Using npm
npm install --save-dev nuxt-speculation-rule
  1. Add nuxt-speculation-rule to the nuxt-speculation-rule section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    'nuxt-speculation-rule'
  ]
})

That's it! You can now use nuxt-speculation-rule in your Nuxt app ✨

Config

export default defineNuxtConfig({
  modules: [
    'nuxt-speculation-rule'
  ],
  speculationRules: {
    prerender: [
      {
        source: "list",
        urls: ["/test1", "/test2"],
      },
    ],
  },
})

Development

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release
0.1.1

8 months ago