You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue might b related to how next-yak generates CSS module imports. The order of imports in the components affects the final CSS bundle order, similar to the behavior reported in webpack-contrib/mini-css-extract-plugin#1117.
Workaround
I am still investigating the issue but I could at least fix the issue above by writing the next-yak import last:
The CSS order in the generated bundle can be incorrect, causing unexpected styling results.
It happens when both selectors have the same specificity and a similar
postOrderIndex
in the webpack chunkGrap:To explain the bug I created a small example:
This example has the following Component Inheritance Tree:
With the following components:
button.tsx
(base component):iconButton.tsx
(extends Button):fancyButton.tsx
(extends Button):fancyIconButton.tsx
(extends IconButton):page.tsx
:Expexted:
Expected order in the CSS bundle:
Actual:
Actual order in the CSS bundle:
The issue might b related to how next-yak generates CSS module imports. The order of imports in the components affects the final CSS bundle order, similar to the behavior reported in webpack-contrib/mini-css-extract-plugin#1117.
Workaround
I am still investigating the issue but I could at least fix the issue above by writing the next-yak import last:
fancyIconButton.tsx
The text was updated successfully, but these errors were encountered: