windicss / windicss-webpack-plugin

🍃 Windi CSS for webpack ⚡
https://windicss.org/integrations/webpack.html
79 stars 19 forks source link

Generate duplicated css in dev mode when Attributify Mode is enable #101

Open masonzz opened 2 years ago

masonzz commented 2 years ago

Describe the bug Genetate duplicated css in dev mode

To Reproduce I could provide a repository if you need.

Screenshots

<div p="t-10">This is a WindiCss Demo</div>

it's ok when first render.

image

then I change p="t-10" to p="t-15", it's still ok

image

but when I change p="t-15" back to p="t-10", code for p="t-10" is duplicated.

image

harlan-zw commented 2 years ago

Hey @masonzz

Thanks for the issue, good catch. This seems like an issue with the windi core only affecting the development HMR. Since we have affordances in development for dodgy stuff like this, I'd deem this fairly low priority to fix.

However, I'll try to dig into it a bit deeper when I have some time