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

extractStyle(cache)返回是的content是"",cache打印有内容 #153

Open
zzkaqq opened this issue Oct 29, 2023 · 6 comments
Open

extractStyle(cache)返回是的content是"",cache打印有内容 #153

zzkaqq opened this issue Oct 29, 2023 · 6 comments

Comments

@zzkaqq
Copy link

zzkaqq commented Oct 29, 2023

根据官方示例:
image

控制台打印:
image

实际渲染结果:
image

框架:[email protected]
模式:APP Router
antd:5.10.2

@Stuart88
Copy link

我也遇到这个问题

@nguyenlephong
Copy link

I am also dealing with this issue; it has disrupted my work for over three days.

    Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.17.0
      npm: 9.6.7
      Yarn: 3.2.4
      pnpm: 8.6.10
    Relevant packages:
      next: 13.1.6
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
      "antd": "5.9.4"

@9vfQbg7z4ajrGQxR
Copy link

9vfQbg7z4ajrGQxR commented Jan 18, 2024

had this too with nextjs and app router, that cause styles blinking on Antd components, for solve this problem you can extractStyle() inside a ".css" file and import the css file

@fabricioloupias
Copy link

had this too with nextjs and app router, that cause styles blinking on Antd components, for solve this problem you can extractStyle() inside a ".css" file and import the css file

can you please show an example of this?

@lululuting
Copy link

这个问题没有解决方法吗?

@Dmi3Iva
Copy link

Dmi3Iva commented Apr 26, 2024

had this too with nextjs and app router, that cause styles blinking on Antd components, for solve this problem you can extractStyle() inside a ".css" file and import the css file

can you please show an example of this?

You can find example here. If styles will be empty pay attention to versions of packages.
https://ant.design/docs/react/server-side-rendering#whole-export

Issue related to package version. There is the version number without bug with empty styles.
ant-design/static-style-extract#3

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

7 participants