/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
module.exports = {
flags: {
DEV_SSR: true,
},
graphqlTypegen: true,
siteMetadata: {
title: 'Site',
description: 'Site',
siteUrl: 'https://site.url', // full path to blog - no ending slash
},
mapping: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'MarkdownRemark.frontmatter.author': 'AuthorYaml.name',
},
plugins: [
'gatsby-plugin-image',
{
resolve: 'gatsby-plugin-sharp',
options: {
defaultQuality: 100,
stripMetadata: true,
},
},
'gatsby-transformer-sharp',
'gatsby-plugin-sitemap',
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'content',
path: path.join(__dirname, 'src', 'content'),
},
},
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
{
resolve: 'gatsby-remark-responsive-iframe',
options: {
wrapperStyle: 'margin-bottom: 1rem',
},
},
'gatsby-remark-prismjs',
'gatsby-remark-copy-linked-files',
'gatsby-remark-smartypants',
{
resolve: 'gatsby-remark-images',
options: {
maxWidth: 1000,
quality: 100,
backgroundColor: '#191B1F',
},
},
],
},
},
'gatsby-transformer-json',
{
resolve: 'gatsby-plugin-canonical-urls',
options: {
siteUrl: 'https://site.url',
},
},
'gatsby-plugin-typescript',
'gatsby-plugin-emotion',
'gatsby-plugin-react-helmet',
'gatsby-transformer-yaml',
{
resolve: 'gatsby-plugin-feed',
options: {
query: `
{
site {
siteMetadata {
title
description
siteUrl
site_url: siteUrl
}
}
}
`,
feeds: [
{
serialize: ({ query: { site, allMarkdownRemark } }) =>
allMarkdownRemark.edges.map(edge => ({
...edge.node.frontmatter,
description: edge.node.excerpt,
date: edge.node.frontmatter.date,
url: `${site.siteMetadata.siteUrl}${edge.node.fields.slug}`,
guid: `${site.siteMetadata.siteUrl}${edge.node.fields.slug}`,
custom_elements: [{ 'content:encoded': edge.node.html }],
})),
query: `{
allMarkdownRemark(
filter: {fields: {layout: {eq: "post"}}, frontmatter: {draft: {ne: true}}}
sort: {frontmatter: {date: DESC}}
) {
edges {
node {
excerpt
html
fields {
slug
}
frontmatter {
title
date
}
}
}
}
}`,
output: '/rss.xml',
title: 'Blog',
match: '^/blog/',
},
],
},
},
{
resolve: 'gatsby-plugin-postcss',
options: {
postCssPlugins: [require('postcss-color-function'), require('cssnano')()],
},
},
],
};
Summary
When using a
gatsby-config.jsthat includesrequirestatements these does not seem to be resolved by netlify-plugin-gatsby.Steps to reproduce
gatsby-config.jsA link to a reproduction repository
No response
Plugin version
3.4.8
More information about your build
netlify.toml)What OS are you using?
Mac OS
Your netlify.toml file
`netlify.toml`
Configuration
`gatsby-config.js` and options
Environment
Environment
Gatsby info
gatsby info
Your _redirects file
`_redirects`
# Paste content of your `_redirects` file hereBuilds logs (or link to your logs)
Build logs
Function logs
Function logs