This repository was archived by the owner on Aug 22, 2024. It is now read-only.
File tree 5 files changed +177
-210
lines changed
5 files changed +177
-210
lines changed Original file line number Diff line number Diff line change 1
1
/// <reference types="next" />
2
2
/// <reference types="next/types/global" />
3
+ /// <reference types="@emotion/react/types/css-prop" />
Original file line number Diff line number Diff line change 10
10
"test" : " jest --watch"
11
11
},
12
12
"dependencies" : {
13
- "@emotion/core" : " ^10.1.1" ,
14
- "@emotion/styled" : " ^10.0.27" ,
13
+ "@emotion/babel-preset-css-prop" : " ^11.2.0" ,
14
+ "@emotion/css" : " ^11.1.3" ,
15
+ "@emotion/react" : " ^11.1.5" ,
16
+ "@emotion/server" : " ^11.0.0" ,
15
17
"@next/mdx" : " ^10.0.6" ,
16
18
"dotenv-flow" : " ^3.2.0" ,
17
- "emotion" : " ^10.0.27" ,
18
- "emotion-server" : " ^10.0.27" ,
19
19
"mdx-prism" : " ^0.3.1" ,
20
20
"next" : " 10.0.8" ,
21
21
"next-seo" : " ^4.19.0" ,
30
30
},
31
31
"devDependencies" : {
32
32
"@babel/plugin-transform-react-jsx" : " ^7.12.16" ,
33
- "@emotion/babel-preset-css-prop" : " ^10.2.1" ,
34
33
"@mdx-js/loader" : " ^1.6.22" ,
35
34
"@tailwindcss/typography" : " ^0.4.0" ,
36
35
"@testing-library/jest-dom" : " ^5.11.9" ,
Original file line number Diff line number Diff line change @@ -6,7 +6,10 @@ import Document, {
6
6
NextScript ,
7
7
DocumentContext ,
8
8
} from 'next/document'
9
- import { extractCritical } from 'emotion-server'
9
+ import createEmotionServer from '@emotion/server/create-instance'
10
+ import { cache } from '@emotion/css'
11
+
12
+ const { extractCritical} = createEmotionServer ( cache )
10
13
11
14
export default class MyDocument extends Document {
12
15
static async getInitialProps ( ctx : DocumentContext ) {
Original file line number Diff line number Diff line change 1
- import { jsx } from '@emotion/core '
1
+ import React from 'react '
2
2
import Head from 'next/head'
3
3
import DarkModeToggle from '../components/dark-mode-toggle'
4
4
You can’t perform that action at this time.
0 commit comments