fix(nextjs): fix .babelrc for emotion v11 (#6728)

This commit is contained in:
Noriyuki Shinpuku 2021-08-19 22:45:16 +09:00 committed by GitHub
parent 3748292d9d
commit 0841b55465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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": [
<% if (style === '@emotion/styled') { %>"@emotion/babel-plugin"<% } %>
<% if (style === 'styled-components') { %>["styled-components", { "pure": true, "ssr": true }]<% } %>
]
}