Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wslx520 opened this issue Jul 25, 2018 · 0 comments
Open

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

wslx520 opened this issue Jul 25, 2018 · 0 comments

Comments

@wslx520
Copy link

wslx520 commented Jul 25, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant