提交 3c92524b 编写于 作者: M Matija Marohnić 提交者: Tim Neutkens

Update example with emotion (#2837)

* Update example with emotion

Emotion is now split into separate packages using Lerna.

* Update Next.js in emotion example
上级 50866c23
......@@ -3,6 +3,6 @@
"next/babel"
],
"plugins": [
["emotion/babel", { "inline": true }]
["emotion", { "inline": true }]
]
}
\ No newline at end of file
......@@ -7,10 +7,13 @@
"start": "next start"
},
"dependencies": {
"emotion": "^5.1.4",
"next": "^2.4.6",
"babel-plugin-emotion": "^7.1.0",
"emotion": "^7.2.0",
"emotion-server": "^7.2.0",
"next": "^3.0.6",
"react": "^15.6.1",
"react-dom": "^15.6.1"
"react-dom": "^15.6.1",
"react-emotion": "^7.2.0"
},
"license": "ISC"
}
import Document, { Head, Main, NextScript } from 'next/document'
import { extractCritical } from 'emotion/server'
import { extractCritical } from 'emotion-server'
import { flush } from 'emotion'
const dev = process.env.NODE_ENV !== 'production'
......
import React from 'react'
import { hydrate, keyframes, css, injectGlobal } from 'emotion'
import styled from 'emotion/react'
import styled from 'react-emotion'
// Adds server generated styles to emotion cache.
// '__NEXT_DATA__.ids' is set in '_document.js'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册