text: require('dotenv').config({
    path: `.env.${process.env.NODE_ENV}`
  })
  
  const contentfulConfig = {
    spaceId: process.env.CONTENTFUL_SPACE_ID,
    accessToken: process.env.CONTENTFUL_ACCESS_TOKEN,
    // host: process.env.CONTENTFUL_HOST
    host: `preview.contentful.com`,
  }
  
  module.exports = {
    siteMetadata: {
      siteUrl: `http://milesalex.github.io/gatsby/`,
      title: `When I Work`,
      description: `fill this out at some point`,
      author: `@wheniwork`,
    },
    assetPrefix: "assets",
    plugins: [
      `gatsby-plugin-postcss`,
      `gatsby-transformer-sharp`,
      `gatsby-plugin-sharp`,
      `gatsby-plugin-react-helmet`,
      `gatsby-plugin-sitemap`,
      `gatsby-plugin-remove-trailing-slashes`,
  
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          name: `images`,
          path: `${__dirname}/src/images`,
        },
      },
      {
        resolve: `gatsby-plugin-manifest`,
        options: {
          name: `gatsby-starter-default`,
          short_name: `starter`,
          start_url: `/`,
          background_color: `#663399`,
          theme_color: `#663399`,
          display: `minimal-ui`,
          icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
        },
      },
      {
        resolve: `gatsby-plugin-s3`,
        options: {
          bucketName: "tt-marketing-demo",
        },
      },
      {
        resolve: "gatsby-plugin-zopfli",
        options: {
          extensions: ["css", "html", "js", "svg"],
        },
      },
      {
        resolve: `gatsby-source-contentful`,
        options: contentfulConfig,
      },
      {
        resolve: "gatsby-plugin-asset-path",
        options: {
          // additionalPaths: ["manifest.webmanifest"],
        },
      },
    ],
  }
  