Skip to content
This repository was archived by the owner on Nov 2, 2021. It is now read-only.

Commit 5eefbe7

Browse files
committed
Use preact for bundle size
1 parent 3384e26 commit 5eefbe7

File tree

3 files changed

+73
-14
lines changed

3 files changed

+73
-14
lines changed

gatsby-config.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
module.exports = {
22
siteMetadata: {
33
title: 'Juliette Pretot',
4-
siteUrl: 'https://jul.sh'
4+
siteUrl: 'https://jul.sh',
55
},
66
plugins: [
7+
'gatsby-plugin-preact',
78
'gatsby-plugin-typescript',
89
'gatsby-plugin-react-helmet',
910
'gatsby-plugin-catch-links',
1011
{
1112
resolve: 'gatsby-source-filesystem',
1213
options: {
1314
path: `${__dirname}/src/pages`,
14-
name: 'pages'
15-
}
15+
name: 'pages',
16+
},
1617
},
1718
{
1819
resolve: 'gatsby-transformer-remark',
@@ -23,25 +24,25 @@ module.exports = {
2324
options: {
2425
maxWidth: 1000,
2526
linkImagesToOriginal: false,
26-
backgroundColor: 'transparent'
27-
}
27+
backgroundColor: 'transparent',
28+
},
2829
},
2930
'gatsby-remark-copy-linked-files',
3031
{
3132
resolve: 'gatsby-remark-smartypants',
3233
options: {
33-
dashes: 'oldschool'
34-
}
35-
}
36-
]
37-
}
34+
dashes: 'oldschool',
35+
},
36+
},
37+
],
38+
},
3839
},
3940
{
4041
resolve: 'gatsby-plugin-nprogress',
4142
options: {
4243
color: '#44B284',
43-
showSpinner: false
44-
}
44+
showSpinner: false,
45+
},
4546
},
4647
'gatsby-plugin-webpack-bundle-analyser-v2',
4748
'gatsby-plugin-catch-links',
@@ -51,6 +52,6 @@ module.exports = {
5152
'gatsby-plugin-sharp',
5253
'gatsby-plugin-offline',
5354
'gatsby-plugin-styled-components',
54-
'gatsby-plugin-netlify' // place as last in the array. ref: https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-netlify#how-to-use
55-
]
55+
'gatsby-plugin-netlify', // place as last in the array. ref: https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-netlify#how-to-use
56+
],
5657
}

package-lock.json

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"gatsby-plugin-netlify-cache": "^1.2.0",
1717
"gatsby-plugin-nprogress": "^2.3.2",
1818
"gatsby-plugin-offline": "^3.2.7",
19+
"gatsby-plugin-preact": "^4.0.0",
1920
"gatsby-plugin-react-helmet": "^3.3.2",
2021
"gatsby-plugin-sharp": "^2.6.9",
2122
"gatsby-plugin-sitemap": "^2.4.3",
@@ -28,6 +29,8 @@
2829
"gatsby-transformer-remark": "^2.8.13",
2930
"gatsby-transformer-sharp": "^2.5.3",
3031
"gatsby-transformer-sqip": "^2.3.9",
32+
"preact": "^10.4.4",
33+
"preact-render-to-string": "^5.1.8",
3134
"react": "^16.13.1",
3235
"react-dom": "^16.13.1",
3336
"react-helmet": "^6.0.0",

0 commit comments

Comments
 (0)