UnoCSS Dist-chunk mode in Astro
Author: wtto00Created Jan 5, 2024Updated Sep 29, 2026
Labelsbug
UnoCSS version
0.58.3
Describe the bug
I used mode: 'dist-chunk' in the astro project.
I have two pages, which are:
<!-- src/pages/a.astro -->
<div class="text-xl">a</div><!-- src/pages/b.astro -->
<div class="c-red">b</div>bThe a page only has text-xl, and the b page only has c-red, with no other extra classes.
Then I executed the build and got text-xl in a.html, which is correct, but in b.html it includes both text-xl and c-red.
The b.html should not contain the style information for text-xl.
Reproduction
System Info
No response
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Source: unocss/unocss