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

Ant Design doesn't work with Nuxt Layers #48

Open
avxkim opened this issue Mar 7, 2024 · 7 comments
Open

Ant Design doesn't work with Nuxt Layers #48

avxkim opened this issue Mar 7, 2024 · 7 comments

Comments

@avxkim
Copy link

avxkim commented Mar 7, 2024

ui-kit.zip
reproducible code attached to this issue, i was using pnpm (but it doesn't matter, if it's pnpm or npm / yarn)

Steps to reproduce:

  1. pnpm install
  2. pnpm dev it gets stuck
@Sun-ZhenXing
Copy link

Same problem, and it took over two minutes to warm up on my Windows!

image

Eventually, the page fails to render.

@Sun-ZhenXing
Copy link

Additional Notes:

The final page rendered, but some warnings appeared before that. After about five minutes.

[Vue warn]: Failed to resolve component: a-extract-style
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
[Vue warn]: Non-function value encountered for default slot. Prefer function slots for better performance.
[Vue warn]: Component <Anonymous> is missing template or render function.
[Vue warn]: Failed to resolve component: a-extract-style
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
[Vue warn]: Non-function value encountered for default slot. Prefer function slots for better performance.
[Vue warn]: Component <Anonymous> is missing template or render function.
[Vue warn]: Failed to resolve component: a-extract-style
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
[Vue warn]: Non-function value encountered for default slot. Prefer function slots for better performance.
[Vue warn]: Component <Anonymous> is missing template or render function.
[Vue warn]: Failed to resolve component: a-extract-style
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
[Vue warn]: Non-function value encountered for default slot. Prefer function slots for better performance.
[Vue warn]: Component <Anonymous> is missing template or render function.

Does this seem to be a result of Vite optimizing ES Modules?

I think this is a serious performance issue. I will try to provide a reproduction to help fix this if necessary.

@avxkim
Copy link
Author

avxkim commented Mar 13, 2024

@Sun-ZhenXing have you tried to use this module in a module instead?

@Sun-ZhenXing
Copy link

@Sun-ZhenXing have you tried to use this module in a module instead?

No, I don't know how to make such an attempt.

@Sun-ZhenXing
Copy link

@avxkim, please check this minimal reproduction, it works fine but takes about 5 minutes to render on my Windows 11 (Intel 12900).

Try:

pnpm i
pnpm dev

@andreev-nikita
Copy link

It seems to have been working since Nuxt 3.12.4.
I checked it with different Nuxt versions:
3.10.3 to 3.12.3: It takes about 2 minutes on my laptop to warm up the dev server
3.12.4 and 3.13.0: It takes a few seconds to warm up the server

@Sun-ZhenXing
Copy link

@andreev-nikita Nuxt 3.13 has refactored many of the layers implementations, and this is no longer an issue.

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

3 participants