Next.js Discord

Discord Forum

Duplicate css classes from page.scss and layout.scss when sharing component.

Unanswered
Transvaal lion posted this in #help-forum
Open in Discord
Avatar
Transvaal lionOP
I'm now trying NextJS14 but I encounted this issue, I noticed when developing login layout, I noticed my styles are calling twice.

I have this code in my layout.jsx and page.jsx
import styles from '@/styles/auth.module.scss';

So when I tried to put <div className={styles['field-row']}> and checked my style in inspect element. It shows twice.

It's even the same when I did production build. (npm run build / start)

Any fix for this, am I doing something wrong?

It should only call once.
Image

1 Reply

Avatar
Transvaal lionOP
Ah nvm, seems it's really an existing issue.

https://github.com/vercel/next.js/issues/51030