-
Notifications
You must be signed in to change notification settings - Fork 36
/
gatsby-config.js
37 lines (33 loc) · 1.02 KB
/
gatsby-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const { generatePathPrefix } = require('./src/utils/generate-path-prefix');
const { siteMetadata } = require('./src/utils/site-metadata');
const pathPrefix = generatePathPrefix(siteMetadata);
const layoutComponentRelativePath = `./src/layouts/index.js`;
console.log('PATH PREFIX', pathPrefix);
// Specifies which plugins to use depending on build environment
// Keep our main plugin at top to include file saving before image plugins
const plugins = [
'gatsby-source-snooty-prod',
'gatsby-plugin-image',
'gatsby-plugin-sharp',
'gatsby-transformer-sharp', // Needed for dynamic images
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'images',
path: `${__dirname}/src/images`, // cannot use public as plugins initialize before gatsby-node module
},
},
'gatsby-plugin-emotion',
'gatsby-plugin-sitemap',
{
resolve: 'gatsby-plugin-layout',
options: {
component: require.resolve(layoutComponentRelativePath),
},
},
];
module.exports = {
plugins,
pathPrefix,
siteMetadata,
};