-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathgatsby-config.js
More file actions
51 lines (47 loc) · 1.07 KB
/
gatsby-config.js
File metadata and controls
51 lines (47 loc) · 1.07 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const path = require('path')
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
})
const plugins = [
'gatsby-plugin-sass',
'gatsby-plugin-emotion',
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-plugin-static-folders',
options: {
folders: [`/themes/${process.env.B2S_THEME_NAME}/Assets`],
},
},
'@b2storefront/gatsby-b2storefront-shopify',
'@b2storefront/b2storefront-telemetry',
{
resolve: 'gatsby-plugin-root-import',
options: {
'~': path.join(__dirname, 'src/'),
},
},
{
resolve: 'gatsby-plugin-no-sourcemaps',
}
]
if (process.env.SENTRY_DSN) {
plugins.push({
resolve: '@sentry/gatsby',
options: {
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV,
sampleRate: 0.7,
enabled: (() =>
['production', 'stage'].indexOf(process.env.NODE_ENV) !== -1)(),
tracesSampleRate: 0.2,
},
})
}
module.exports = {
siteMetadata: {
title: 'B2Storefront Shopify Boilerplate',
description: '',
author: 'b2storefront',
},
plugins: plugins,
}