fix: allow chunk.modules mutation on js side#82
fix: allow chunk.modules mutation on js side#82sapphi-red merged 3 commits intovitejs:rolldown-v6from
Conversation
|
I'm a bit reluctant to merge this one, but since the changes from this approach is contained inside Vite, I'm leaning towards it. In the future, we may need unocss to change its code when Vite begins using Rolldown's built-in CSS feature. Requiring them to make changes in two steps is not ideal, so it's probably better to avoid the approaches that require changes for this change. The other approach of allowing linking for reference: unocss/unocss#4403 |
|
Hopefully, this is only a stop-gap for early testers of rolldown-vite who happens to use unocss (and this turns out to be the case for me as I use unocss in hi-ogawa/vite-plugins#673 and also Vitest UI 😅). I don't know how rolldown level css support looks like and how long it might take, but unless this PR breaks other ecosystem usages of |
|
I quickly tested this patch and both hi-ogawa/vite-plugins#673 and vitest-dev/vitest#7509 seem to get proper styles at least. |
sapphi-red
left a comment
There was a problem hiding this comment.
I'll merge this one for now as it doesn't have any downside to include this as a workaround (at least for now) and will help other issues hidden by this.
Description
I added a quick and dirty workaround for
chunk.modulesmutation. I tested on unocss and this seems to fix some tests(but not all 😢).(EDIT: it turned out other test failure is due to oxc transform oxc-project/oxc#9192 and technically unocss side is broken unocss/unocss#4436).Probably this isn't good for the long run (considering rolldown level css support?), but if this trick can save ecosystem for the time being, it might be worth it.