Skip to content

Commit

Permalink
fix(nextjs): fix .babelrc for emotion v11 (nrwl#6728)
Browse files Browse the repository at this point in the history
  • Loading branch information
puku0x authored and ManojBahuguna committed Sep 16, 2021
1 parent 307bb76 commit a93a45f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion packages/next/src/generators/application/files/.babelrc__tmpl__
Original file line number Diff line number Diff line change
@@ -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 a93a45f

Please sign in to comment.