generated from vtex-sites/base.store
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathgatsby-config.ts
121 lines (116 loc) · 2.55 KB
/
gatsby-config.ts
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import { join, resolve } from 'path'
import dotenv from 'dotenv'
import type { GatsbyConfig } from 'gatsby'
import config from './store.config'
dotenv.config({ path: 'vtex.env' })
const gatsbyConfig: GatsbyConfig = {
jsxRuntime: 'automatic',
siteMetadata: {
title: 'GatsbyStore',
description: 'Fast Demo Store',
titleTemplate: '%s | FastStore',
author: 'Store Framework',
siteUrl: config.storeUrl,
},
flags: {
FAST_DEV: true,
PARALLEL_SOURCING: true,
},
plugins: [
{
resolve: 'gatsby-plugin-sass',
options: {
cssLoaderOptions: {
esModule: true,
modules: {
namedExport: false,
},
},
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'Fast Demo Store',
short_name: 'GatsbyStore',
start_url: '/',
icon: 'src/images/icon.png',
background_color: '#E31C58',
theme_color: '#ffffff',
display: 'standalone',
cache_busting_mode: 'none',
},
},
{
resolve: 'gatsby-plugin-robots-txt',
options: {
resolveEnv: () => process.env.NODE_ENV ?? 'development',
env: {
production: {
policy: [
{
userAgent: '*',
allow: '/',
disallow: ['/checkout/*'],
},
],
},
development: {
policy: [{ userAgent: '*', disallow: ['/'] }],
},
},
},
},
{
resolve: 'gatsby-plugin-next-seo',
options: {
defer: true,
},
},
{
resolve: 'gatsby-plugin-nprogress',
options: {
color: '#E31C58',
showSpinner: false,
},
},
{
resolve: 'gatsby-plugin-root-import',
options: {
src: resolve('./src'),
'@generated': resolve('./@generated'),
},
},
{
resolve: 'gatsby-plugin-bundle-stats',
options: {
compare: true,
baseline: true,
html: true,
json: true,
outDir: `.`,
stats: {
context: join(__dirname, 'src'),
},
},
},
{
resolve: `gatsby-plugin-webpack-bundle-analyser-v2`,
options: {
analyzerMode: 'static',
openAnalyzer: false,
reportFilename: 'bundle-analyser.html',
},
},
{
resolve: 'gatsby-plugin-gatsby-cloud',
},
{
resolve: 'gatsby-plugin-netlify',
},
{
resolve: 'gatsby-plugin-postcss',
},
],
}
export default gatsbyConfig