unocss: UnoCSS Inspector does not work with vite `base` config
UnoCSS version
66.1.0-beta.3
Describe the bug
When using base option in vite.config UnoCSS Inspector announces it will use the specified path but in fact doesn’t.
Reproduction
- create a basic Vite + Vue project (
pnpm create vue@latest- doesn’t matter what options are selected) - add UnoCSS (
pnpm add -D unocssand add it invite.config) - start
pnpm dev-UnoCSS Inspector: http://localhost:5173/__unocss/is displayed and it works - set
base: '/test',invite.config - start
pnpm dev-UnoCSS Inspector: http://localhost:5173/test/__unocss/is displayed (correct) but it does not work - it is in fact available athttp://localhost:5173/__unocss/where it works
System Info
Ubuntu, Chrome
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.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (9 by maintainers)
I discovered the problem: I was missing the final
/in thebase. The documentation from vite specifies all examples with ending/but it is also auto-fixing it by adding a final/. But thelocalUrldoes not have the final/, so the replacement is not performed.Sorry for the false alert.
By ‘the 2 are consistent’ I meant as long as what is advertised in console is the URL where the inspector can be accessed 😃
The changes in the commit LGTM.
It’s good from my POV, as long as the 2 are consistent.
No problem, it’s not urgent or critical. It was just to notify there is a discrepancy between what it is displayed in console and the real path.