diff --git a/gatsby-config.js b/gatsby-config.js index a7ac454..67bebc3 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -41,6 +41,12 @@ module.exports = { }, plugins: [ // `gatsby-plugin-fastclick`, + { + resolve: `gatsby-plugin-emotion`, + options: { + labelFormat: `[filename]--[local]`, + }, + }, { resolve: `gatsby-plugin-layout`, options: { @@ -287,23 +293,17 @@ module.exports = { }, }, { - resolve: `gatsby-plugin-netlify`, - options: { - headers: { - '/*': isMaster ? [] : [`X-Robots-Tag: noindex, follow`], - }, - }, - }, - { - resolve: `gatsby-plugin-emotion`, + resolve: `gatsby-plugin-offline`, options: { - // Accepts all options defined by `babel-plugin-emotion` plugin. + // globPatterns: [`**/*.{js,css,html}`], }, }, { - resolve: `gatsby-plugin-offline`, + resolve: `gatsby-plugin-netlify`, options: { - // globPatterns: [`**/*.{js,css,html}`], + headers: { + '/*': isMaster ? [] : [`X-Robots-Tag: noindex, follow`], + }, }, }, ], diff --git a/package.json b/package.json index 5eebcfc..a6813df 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,8 @@ "contributors:generate": "all-contributors generate" }, "dependencies": { + "@emotion/core": "^10.0.9", + "@emotion/styled": "^10.0.9", "@fortawesome/fontawesome-svg-core": "1.2.15", "@fortawesome/free-brands-svg-icons": "5.5.0", "@fortawesome/free-regular-svg-icons": "5.5.0", @@ -56,8 +58,6 @@ "cryptocurrency-icons": "0.9.2", "cuid": "2.1.6", "date-fns": "1.29.0", - "emotion": "9.2.12", - "emotion-server": "9.2.12", "feed": "2.0.2", "gatsby": "2.1.17", "gatsby-image": "2.0.29", @@ -65,12 +65,12 @@ "gatsby-plugin-catch-links": "2.0.11", "gatsby-mdx": "^0.4.3", "gatsby-plugin-compile-es6-packages": "^1.0.6", - "gatsby-plugin-emotion": "2.0.7", "gatsby-plugin-layout": "1.0.12", "gatsby-plugin-nprogress": "2.0.8", "gatsby-plugin-offline": "2.0.24", "gatsby-plugin-react-helmet": "3.0.6", "gatsby-remark-autolink-headers": "2.0.14", + "gatsby-plugin-emotion": "^4.0.6", "gray-percentage": "2.0.0", "hex2rgba": "0.0.1", "js-yaml": "3.12.1", @@ -82,7 +82,6 @@ "ramda": "0.26.1", "react": "16.7.0", "react-dom": "16.7.0", - "react-emotion": "9.2.12", "react-head": "3.0.2", "react-headroom": "2.2.4", "react-helmet": "5.2.0", diff --git a/src/components/ArticlePreview.js b/src/components/ArticlePreview.js index fbe177c..0f38307 100644 --- a/src/components/ArticlePreview.js +++ b/src/components/ArticlePreview.js @@ -2,7 +2,7 @@ import React from 'react' import PropTypes from 'prop-types' import { Link } from 'gatsby' import Img from 'gatsby-image' -import styled from 'react-emotion' +import styled from '@emotion/styled' import { colors } from '@/theme' const StyledLink = styled(Link)` diff --git a/src/components/ContactForm.js b/src/components/ContactForm.js index 0d96cab..e47b780 100644 --- a/src/components/ContactForm.js +++ b/src/components/ContactForm.js @@ -1,7 +1,8 @@ /* global document, window */ import React, { Component } from 'react' import PropTypes from 'prop-types' -import styled from 'react-emotion' +import styled from '@emotion/styled' +import { css } from '@emotion/core' import axios from 'axios' import isEmail from 'validator/lib/isEmail' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' @@ -205,12 +206,12 @@ export default class ContactForm extends Component { return (
{this.props.success}
@@ -225,16 +226,21 @@ export default class ContactForm extends Component { noValidate >