Skip to content

Commit

Permalink
fix(nextjs): styled-jsx and styled-components should have "use client…
Browse files Browse the repository at this point in the history
…"; directive
  • Loading branch information
ndcunningham committed Apr 20, 2023
1 parent 739b4c2 commit b6e47ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ describe('app', () => {
{},
`
[
"plugin:@nx/nx/react-typescript",
"plugin:@nx/react-typescript",
"next",
"next/core-web-vitals",
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<% if (styledModule && (styledModule === 'styled-jsx' || styledModule === 'styled-components')) {%>
'use client';
<% }%>
<% if (styledModule && styledModule !== 'styled-jsx') {
var wrapper = 'StyledPage';
%>import styled from '<%= styledModule %>';<% } else {
Expand Down

0 comments on commit b6e47ad

Please sign in to comment.