Next.js Discord

Discord Forum

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

Transvaal lion posted this in #help-forum
Open in Discord
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.

1 Reply

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