Skip to content

debs-obrien/netlify-files-module

 
 

Repository files navigation

@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 Notes

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 (c) Alexander Lichter npm@lichter.io

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%