1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Update example with emotion (#2837)

* Update example with emotion

Emotion is now split into separate packages using Lerna.

* Update Next.js in emotion example
This commit is contained in:
Matija Marohnić 2017-08-24 08:27:49 +02:00 committed by Tim Neutkens
parent 50866c234c
commit 3c92524b06
4 changed files with 9 additions and 6 deletions

View file

@ -3,6 +3,6 @@
"next/babel"
],
"plugins": [
["emotion/babel", { "inline": true }]
["emotion", { "inline": true }]
]
}

View 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"
}

View file

@ -1,5 +1,5 @@
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'

View file

@ -1,6 +1,6 @@
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'