We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Any way to avoid style duplication across generated css for page layout or loading page ?
If i use same component in both a client component inside a page and inside the layout his style will be generated inside page.css and layout.css
In above example (reproduction repository):
<ClientComponent>
<Demo />
/app/page.tsx
<ClientComponent />
/app/layout.tsx
If i remove 'use client'; from <ClientComponent> the css style of demo will not be duplicate on page.css
'use client';
I use vanilla extract in a component library using atomic design. So it's like having a lot of duplicated css rules...
Is there a way to force vanilla extract to bundle one css file instead of multiple css chunk ?
Note that i got exactly the same issue using css module.
Heres is other thread that seems to be related
next/dynamic
Not sure if this thread should be inside issue or discussion...
https://github.com/zeckaissue/next-css-duplicated/tree/vanilla-extract
System: OS: Linux 5.10 Ubuntu 20.04.6 LTS (Focal Fossa) CPU: (16) x64 Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz Memory: 18.50 GB / 24.76 GB Container: Yes Shell: 5.8 - /usr/bin/zsh Binaries: Node: 18.17.1 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 9.6.7 - /usr/local/bin/npm pnpm: 8.6.2 - /usr/local/bin/pnpm npmPackages: @vanilla-extract/css: ^1.14.0 => 1.14.0 @vanilla-extract/next-plugin: ^2.3.2 => 2.3.2
yarn
No response
The text was updated successfully, but these errors were encountered:
v 14.1.1-canary.43 seems to fix this issue Pull request: vercel/next.js#61198
Let's wait for version 14.1.1 of next to close this issue definitively.
Sorry, something went wrong.
Tested again on v. 14.1.2 but isse still there 😢
I'm using 14.1.3 and it seems fixed for me (production only, dev still duplicating).
14.1.3
No branches or pull requests
Describe the bug
Any way to avoid style duplication across generated css for page layout or loading page ?
If i use same component in both a client component inside a page and inside the layout his style will be generated inside page.css and layout.css
In above example (reproduction repository):
<ClientComponent>
i have<Demo />
component (client component have notation 'use client')/app/page.tsx
i have<ClientComponent />
component/app/layout.tsx
i have<Demo />
componentIf i remove
'use client';
from<ClientComponent>
the css style of demo will not be duplicate on page.cssI use vanilla extract in a component library using atomic design. So it's like having a lot of duplicated css rules...
Is there a way to force vanilla extract to bundle one css file instead of multiple css chunk ?
Note that i got exactly the same issue using css module.
Heres is other thread that seems to be related
next/dynamic
vercel/next.js#25456Not sure if this thread should be inside issue or discussion...
Reproduction
https://github.com/zeckaissue/next-css-duplicated/tree/vanilla-extract
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: