Skip to content

Commit

Permalink
perf(SLB-201): un-inline gatsby styles
Browse files Browse the repository at this point in the history
Gatsby's style handling assumes every component has its own stylesheet,
and it would add only the required styles to each page. With Tailwind though,
we have only one global stylesheet, and adding it inline everywhere achieves
the opposite.
  • Loading branch information
pmelab committed Jan 24, 2024
1 parent 24b7d3d commit 3ec3d20
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 238 deletions.
1 change: 1 addition & 0 deletions apps/website/gatsby-config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default {
siteUrl: process.env.NETLIFY_URL,
},
plugins: [
'gatsby-plugin-uninline-styles',
'gatsby-plugin-pnpm',
'gatsby-plugin-layout',
'gatsby-plugin-sharp',
Expand Down
1 change: 1 addition & 0 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"gatsby-plugin-robots-txt": "^1.8.0",
"gatsby-plugin-sharp": "^5.13.0",
"gatsby-plugin-sitemap": "^6.13.0",
"gatsby-plugin-uninline-styles": "^0.2.0",
"gatsby-source-filesystem": "^5.13.0",
"image-size": "^1.1.1",
"mime-types": "^2.1.35",
Expand Down
Loading

0 comments on commit 3ec3d20

Please sign in to comment.