From 97750efab44256f23a3899a31311bf2587d647e6 Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 22 Sep 2020 16:52:18 -0400 Subject: [PATCH] Style components server-side in production. --- gatsby-config.js | 3 +-- package-lock.json | 49 ++++++++++++++++++++++++++++++++++++++++------- package.json | 2 ++ 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index a6c2f28..e8387f0 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -8,9 +8,8 @@ module.exports = { githubUrl: `https://github.com/nmccrea/recursor`, }, plugins: [ - // Enable TypeScript. `gatsby-plugin-typescript`, - // Allow aboslute imports. + `gatsby-plugin-styled-components`, `gatsby-plugin-resolve-src`, `gatsby-plugin-react-helmet`, { diff --git a/package-lock.json b/package-lock.json index b18da7f..a5d591c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -174,11 +174,28 @@ } }, "@babel/helper-annotate-as-pure": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", - "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz", + "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==", "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.4" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==" + }, + "@babel/types": { + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-builder-binary-assignment-operator-visitor": { @@ -5474,9 +5491,9 @@ "integrity": "sha512-cGNEEOO32kKcI+ZZBcCIliPOvyd7/Dp8zyJ/ZD1lXKuH1frzdbWG2nbxm+iil8OIxWaeHfxf083IHvb868TY9A==" }, "babel-plugin-styled-components": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.7.tgz", - "integrity": "sha512-MBMHGcIA22996n9hZRf/UJLVVgkEOITuR2SvjHLb5dSTUyR4ZRGn+ngITapes36FI3WLxZHfRhkA1ffHxihOrg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.11.1.tgz", + "integrity": "sha512-YwrInHyKUk1PU3avIRdiLyCpM++18Rs1NgyMXEAQC33rIXs/vro0A+stf4sT0Gf22Got+xRWB8Cm0tw+qkRzBA==", "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", "@babel/helper-module-imports": "^7.0.0", @@ -12148,6 +12165,24 @@ } } }, + "gatsby-plugin-styled-components": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/gatsby-plugin-styled-components/-/gatsby-plugin-styled-components-3.3.11.tgz", + "integrity": "sha512-pO7WIXG8TbjkYybVG47WtRXulqvX8nYOeDQD/dD0cRxoyFVyFNoWC5Audyg5IuJWCXPgAG/CmEXM/b+2JQEveQ==", + "requires": { + "@babel/runtime": "^7.11.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.11.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", + "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, "gatsby-plugin-typescript": { "version": "2.4.16", "resolved": "https://registry.npmjs.org/gatsby-plugin-typescript/-/gatsby-plugin-typescript-2.4.16.tgz", diff --git a/package.json b/package.json index 04c9d33..5ad1fcd 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "version": "0.1.0", "author": "Nick McCrea ", "dependencies": { + "babel-plugin-styled-components": "^1.11.1", "gatsby": "^2.24.11", "gatsby-image": "^2.4.13", "gatsby-plugin-manifest": "^2.4.21", @@ -12,6 +13,7 @@ "gatsby-plugin-react-helmet": "^3.3.10", "gatsby-plugin-resolve-src": "^2.1.0", "gatsby-plugin-sharp": "^2.6.22", + "gatsby-plugin-styled-components": "^3.3.11", "gatsby-source-filesystem": "^2.3.23", "gatsby-transformer-sharp": "^2.5.11", "react": "^16.13.1",