-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.ts
94 lines (93 loc) · 2.54 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
require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})
module.exports = {
trailingSlash: "always",
siteMetadata: {
siteUrl: "https://jasonreid.dev/",
title: "Jason Reid's Development Portfolio",
author: "Jason Reid",
description: "My software development portfolio",
},
plugins: [
{
resolve: "gatsby-plugin-manifest",
options: {
name: "Jason Reid's Development Portfolio",
short_name: "JR Dev Portfolio",
start_url: "/",
background_color: "#41d9c5",
theme_color: "#231f20",
display: "standalone",
icon: "src/favicon.png",
icon_options: {
// For all the options available,
purpose: `any maskable`,
},
/* Required for gatsby-plugin-offline */
cache_busting_mode: "none",
},
},
{
resolve: "gatsby-plugin-offline",
options: {
workboxConfig: {
/* Required for gatsby-plugin-manifest */
globPatterns: [
"**/*{.js,.json,.webp,.webmanifest,.woff,.woff2,.ttf,.eot,.css,.mjs,.svg,.mp3,icons/icon*,.ico}",
],
runtimeCaching: [
{
urlPattern: /(\.js$|\.css$|static\/)/,
handler: `CacheFirst`,
},
{
urlPattern: /^https?:.*\/page-data\/.*\.json/,
handler: `NetworkFirst`,
},
{
urlPattern:
/^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/,
handler: `StaleWhileRevalidate`,
},
{
// Google Fonts CSS
urlPattern: /^https?:\/\/fonts\.googleapis\.com\/css/,
handler: `StaleWhileRevalidate`,
},
],
},
precachePages: ["/", "/about/"],
},
},
{
resolve: "@kontent-ai/gatsby-source",
options: {
projectId: process.env.KONTENT_PROJECT_ID,
languageCodenames: ["en-US"],
},
},
"gatsby-plugin-sharp",
"gatsby-plugin-image",
"gatsby-transformer-sharp",
"gatsby-plugin-vanilla-extract",
"gatsby-plugin-dark-mode",
"gatsby-plugin-provide-react",
{
resolve: "gatsby-plugin-typescript",
options: {
isTSX: true, // default: false
jsxPragma: "React", // default
allExtensions: true, // default: false
},
},
{
resolve: "gatsby-plugin-linaria",
options: {
loaderOptions: {
extractCritical: true, // default: false
},
},
},
],
}