https://github.com/daangn/gatsby-plugin-vercel-deploy
Deploy your Gatsby site to Vercel
https://github.com/daangn/gatsby-plugin-vercel-deploy
gatsby gatsby-plugin vercel vercel-deployment
Last synced: 4 months ago
JSON representation
Deploy your Gatsby site to Vercel
- Host: GitHub
- URL: https://github.com/daangn/gatsby-plugin-vercel-deploy
- Owner: daangn
- License: mit
- Created: 2022-03-22T14:31:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-22T14:57:33.000Z (over 4 years ago)
- Last Synced: 2025-03-01T02:44:26.050Z (over 1 year ago)
- Topics: gatsby, gatsby-plugin, vercel, vercel-deployment
- Language: TypeScript
- Homepage:
- Size: 958 KB
- Stars: 1
- Watchers: 19
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gatsby-plugin-vercel-deploy
[](https://www.npmjs.com/package/gatsby-plugin-vercel-deploy)
[](#license)
Automatically generate [`vercel.json`](https://vercel.com/docs/project-configuration) from the gatsby project.
## Install & Usage
```bash
yarn add gatsby-plugin-vercel-deploy
```
And add plugin to the `gatsby-config.js`
```js
{
plugins: [
'gatsby-plugin-vercel-deploy',
],
}
```
### Custom headers
You can define [custom headers](https://vercel.com/docs/project-configuration#project-configuration/headers) via plugin options.
```js
{
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