Skip to content

Working with antd, when browsing among pages, styles lost #9

@wslx520

Description

@wslx520

Hi there. I have to say extracted-loader is much easier to use than 'next-css' and 'next-sass', I use it for meanwhile import css and sass. thanks.

A small issue maybe:

When I use ant-design with it, it works fine. I have two pages, one is the main page and there is a carousel on it:

import {Carousel} from 'antd';  // for js
import '../scss/test.scss';
import '../scss/test1.css';

and the other page , I imported Button

import {Button} from 'antd'

it works fine when I startup npm run dev and view main, but when I goto other page and then come back, the carousel styles lost, including test.scss, test1.css, but antd common styles are there. two images:

when just after npm run dev :
image

when goto other page and come back:
image

And a strange thing is, when this issue occurs, whatever I try to modify the source code, the styles can not be coming back again, the only thing I can do is restart npm run dev

Could someone help?

if need more details, I provided a repository: https://github.com/wslx520/nextjs-antd , thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions