UnoCSS in dev keeps the boot gate and hides the first paint
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python, typescript
- Domain
- developer-experience, frontend, performance
Research direction
Start with nexy/vite.py, especially the boot gate and fallback timeout logic around lines 50-60. Run the dev server against a project containing uno.config.ts and inspect the served document to determine whether UnoCSS can be exposed as a stylesheet or inlined without blocking first paint. Done means the served HTML contains no <style id="nexy-boot"> element, the e2e check records first paint with visible content, and plain CSS projects show no regression in FCP or CLS.
Written by the indexing model from the issue text.
Description
Problem
nexy/vite.py:58-60 keeps the boot gate whenever uno.config.ts exists, because UnoCSS
utilities only exist as a virtual module and there is no stylesheet link to block the first
paint. The gate is <style id="nexy-boot">html{visibility:hidden}</style> with a 2500 ms
fallback timeout (nexy/vite.py:50-55). The page is therefore blank for a moment on a cold dev
load.
#715 removed the gate for projects whose CSS is a real file. UnoCSS projects are still behind it.
Change to make
Expose the generated UnoCSS as a real stylesheet link in dev, or inline its CSS in the served
document, so the gate can be removed for UnoCSS projects too. Measure when the gate is removed
before and after the change.
Out of scope
The UnoCSS production build and CSS hot reload, which already work.
Checks
An e2e test on a project with uno.config.ts finds no nexy-boot element in the served HTML and
records a first paint with content. FCP and CLS from #713 do not get worse on plain CSS projects.
- Dominant language
- Python
- Stars
- 11
- Forks
- 6
- Avg merge
- 2h 14m
- Merged PRs (30d)
- 265
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NexyPy/nexy
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:cli difficulty:intermediate enhancement
Difficulty 2/5 Half a day Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
area:cli area:docs question
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:docs difficulty:beginner good first issue priority:3
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
area:docs difficulty:beginner good first issue priority:3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
backend: claude chore dependencies
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
briandconnelly/amicus#606 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
semantica-agi/semantica#2320 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
vllm-project/vllm-omni#11465 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
jxxghp/MoviePilot#7699 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vllm-project/vllm-ascend#24010 ·
Maintainers usually reply within 1 day