-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.ts
104 lines (98 loc) · 2.64 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
import type { GatsbyConfig } from 'gatsby';
import path from 'path';
// import dotenv from 'dotenv';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const lessToJson = require('less-to-json');
// Get paths of Gatsby's required rules, which as of writing is located at:
// https://github.com/gatsbyjs/gatsby/tree/fbfe3f63dec23d279a27b54b4057dd611dce74bb/packages/
// gatsby/src/utils/eslint-rules
const gatsbyRequiredRules = path.join(
process.cwd(),
'node_modules',
'gatsby',
'dist',
'utils',
'eslint-rules',
);
// dotenv.config({
// path: `.env`,
// });
const config: GatsbyConfig = {
siteMetadata: {
title: `PocketPT-Gatsby`,
siteUrl: `https://www.yourdomain.tld`,
},
// More easily incorporate content into your pages through automatic TypeScript type generation and better GraphQL IntelliSense.
// If you use VSCode you can also use the GraphQL plugin
// Learn more at: https://gatsby.dev/graphql-typegen
graphqlTypegen: true,
flags: {
DEV_SSR: true,
},
plugins: [
'gatsby-plugin-postcss',
'gatsby-plugin-provide-react',
{
resolve: 'gatsby-plugin-antd',
options: {
style: true,
},
},
{
resolve: 'gatsby-plugin-less',
options: {
lessOptions: {
javascriptEnabled: true,
modifyVars: lessToJson('src/theme/vars.less'),
},
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `pocket-pt`,
short_name: `pocket-pt`,
start_url: `/`,
background_color: `#F1F4F9`,
theme_color: `#8075F8`,
display: `standalone`,
icon: 'src/images/icon.png',
cache_busting_mode: 'none',
icon_options: {
// For all the options available,
// please see the section "Additional Resources" below.
purpose: `any maskable`,
},
},
},
{
resolve: `gatsby-plugin-offline`,
},
{
resolve: 'gatsby-plugin-eslint',
options: {
// Gatsby required rules directory
rulePaths: [gatsbyRequiredRules],
// Default settings that may be omitted or customized
stages: ['develop'],
extensions: ['js', 'jsx', 'ts', 'tsx'],
exclude: ['node_modules', 'bower_components', '.cache', 'public'],
// Any additional eslint-webpack-plugin options below
// ...
},
},
{
resolve: 'gatsby-plugin-netlify',
},
'gatsby-plugin-image',
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
{
resolve: `gatsby-plugin-s3`,
options: {
bucketName: 'pocketpt-frontend',
},
},
],
};
export default config;