is it possible to disable the displayName
option for styled-components in the next-config.js
? I know it's possible to disable by using a custom .babelrc
, but i don't want to disable the next.js SWC, and if i create a custom .babelrc
the SWC will be disabled.
Yes, it is possible.
compiler: {
styledComponents: {
displayName: true,
ssr: true,
},
Source: https://nextjs.org/docs/architecture/nextjs-compiler#supported-features