Skip to content

Commit

Permalink
fix(nextjs): fix .babelrc for emotion v11 (#6728)
Browse files Browse the repository at this point in the history
  • Loading branch information
puku0x committed Aug 19, 2021
1 parent 3748292 commit 0841b55
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion packages/next/src/generators/application/files/.babelrc__tmpl__
@@ -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 }]<% } %>
]
}

0 comments on commit 0841b55

Please sign in to comment.