gatsby-plugin-vercel-deploy

1.1.0 • Public • Published

gatsby-plugin-vercel-deploy

NPM package MIT Licensed

Automatically generate vercel.json from the gatsby project.

Install & Usage

yarn add gatsby-plugin-vercel-deploy

And add plugin to the gatsby-config.js

{
  plugins: [
    'gatsby-plugin-vercel-deploy',
  ],
}

Custom headers

You can define custom headers via plugin options.

{
  plugins: [
    {
      resolve: 'gatsby-plugin-vercel-deploy',
      options: {
        headers: {
          source: '/service-worker.js',
          headers: [
            {
              key: 'Cache-Control',
              value: 'public, max-age=0, must-revalidate',
            },
          ],
        },
        {
          source: '/(.*)',
          headers: [
            {
              key: 'X-Content-Type-Options',
              value: 'nosniff',
            },
            {
              key: 'X-Frame-Options',
              value: 'DENY',
            },
            {
              key: 'X-XSS-Protection',
              value: '1; mode=block',
            },
          ],
        },
      },
    },
  ],
}

LICENSE

MIT

/gatsby-plugin-vercel-deploy/

    Package Sidebar

    Install

    npm i gatsby-plugin-vercel-deploy

    Weekly Downloads

    151

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    6.81 kB

    Total Files

    6

    Last publish

    Collaborators

    • cometkim