Gatsby quickstart
1. Install hypertune
npm install hypertuneyarn add hypertunepnpm add hypertune2. Set environment variables
GATSBY_HYPERTUNE_TOKEN=token
HYPERTUNE_FRAMEWORK=gatsby
HYPERTUNE_OUTPUT_DIRECTORY_PATH=src/generated3. Update gatsby-config.ts
import type { GatsbyConfig } from 'gatsby'
// Load environment variables
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
})
const config: GatsbyConfig = {
siteMetadata: {
title: `Hypertune Gatsby Demo`,
siteUrl: `https://www.yourdomain.tld`,
},
graphqlTypegen: true,
plugins: [],
}
export default config4. Update .babelrc
5. Generate the client
6. Use the client
7. (Optional) Add the Hypertune Toolbar
8. (Optional) Include a build-time snapshot
Next steps
Last updated