fix(nextjs): fix .babelrc for emotion v11 (#6728)
This commit is contained in:
parent
3748292d9d
commit
0841b55465
@ -1,6 +1,21 @@
|
|||||||
{
|
{
|
||||||
"presets": ["@nrwl/next/babel"],
|
"presets": [
|
||||||
|
<% if (style === '@emotion/styled') { %>
|
||||||
|
[
|
||||||
|
"@nrwl/next/babel",
|
||||||
|
{
|
||||||
|
"preset-react": {
|
||||||
|
"runtime": "automatic",
|
||||||
|
"importSource": "@emotion/react"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<% } else { %>
|
||||||
|
"@nrwl/next/babel"
|
||||||
|
<% } %>
|
||||||
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
<% if (style === '@emotion/styled') { %>"@emotion/babel-plugin"<% } %>
|
||||||
<% if (style === 'styled-components') { %>["styled-components", { "pure": true, "ssr": true }]<% } %>
|
<% if (style === 'styled-components') { %>["styled-components", { "pure": true, "ssr": true }]<% } %>
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user