Skip to content

Commit

Permalink
Disable styled-components displayName in production (#31216)
Browse files Browse the repository at this point in the history
Co-authored-by: JJ Kasper <jj@jjsweb.site>
  • Loading branch information
timneutkens and ijjk committed Nov 9, 2021
1 parent 0bcb714 commit 3e8b2dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/next/build/swc/options.js
Expand Up @@ -43,7 +43,11 @@ function getBaseSWCOptions({
},
},
},
styledComponents: styledComponents ? {} : null,
styledComponents: styledComponents
? {
displayName: Boolean(development),
}
: null,
}
}

Expand Down

0 comments on commit 3e8b2dc

Please sign in to comment.