//netlify-files-modulebydebs-obrien

netlify-files-module

Nuxt module to create new _headers and _redirects files for Netlify or to use existing ones

0
0
0
JavaScript

@nuxtjs/netlify-files

npm version
npm downloads
Circle CI
Codecov
License

Nuxt module to create new _headers and _redirects files for Netlify or to use existing ones

📖 Release Notesundefined

Setup

  1. Add @nuxtjs/netlify-files dependency to your project
yarn add @nuxtjs/netlify-files # or npm install @nuxtjs/netlify-files
  1. Add @nuxtjs/netlify-files to the modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    '@nuxtjs/netlify-files',

    // With options
    ['@nuxtjs/netlify-files', { /* module options */ }]
  ]
}

Usage

Currently, the module will look for _headers and _redirects files and will copy into the generate folder
(default: dist) after static generation. If you have them directly in your project folder, you don’t have to do
anything else. In case the files are somewhere else you can configure the directory (see below)

Config

export default { 
  netlifyFiles: {
    existingFilesDirectory: 'path/to/nuxt/directory', // The directory where your _headers and _redirects file is located
  }
}

Development

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using npm run dev

License

MIT License

Copyright © Alexander Lichter npm@lichter.io

[beta]v0.14.0