2.0.0 • Published 6 months ago

nuxtignore-dev v2.0.0

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

npm version npm downloads License Nuxt

Nuxtignore Dev

Nuxt module which replaces the behavior of .nuxtignore, but for development purpose only, using .nuxtignore.dev, analogous to .env.dev. If a project is too large and containes big number of pages, such functionality can help to pick out only specific pages in the development mode, thereby making builds faster.

The current module supports both 2 and 3 versions of Nuxt.

Setup

npm i -D nuxtignore-dev # npm
yarn add -D nuxtignore-dev # yarn
pnpm add -D nuxtignore-dev # pnpm

Usage

  1. Creating file .nuxtignore.dev, similar to the existing file .nuxtignore.dev
pages/index.vue

middleware/*

It can also be useful to add .nuxtignore.dev to .gitignore.

  1. Register the module in the modules array in nuxt.config.ts:
// nuxt.config.js
{
  modules: [
    "nuxtignore-dev",
  ],

  nuxtignoreDev: { // optional
    enabled: process.env.NODE_ENV === 'development',

    // custom path to a file or filename
    filePath: '/etc/.custom-nuxtignore'

    // if set to true and the file is not found, error is thrown
    strict: false,

    // if set to true, ignored patterns are applied to pages added by hook "pages:extend"
    isPagesExtendHookIncluded: true,
  }
}
1.0.0

9 months ago

2.0.0

6 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.0

10 months ago