fix(docs): move UnoCSS presets into uno.config.ts - #92
Merged
Conversation
The presets were passed inline to the Vite plugin, so UnoCSS's own config discovery found no file and logged "config file not found in .../docs - loading default config" on every build (twice — client and server bundles). Moving them into a standalone uno.config.ts, which the plugin auto-loads, silences the warning with no change in output (the logos:typescript-icon on the landing still renders).
|
|
|
VitePress removes .temp on a normal build, but the DEBUG=1 workaround for the Windows EBUSY rmdir bug leaves it behind — ignore it (and the cache dir) so it can't be committed by accident.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every docs build logs, twice (client and server bundles):
The UnoCSS presets were passed inline to the Vite plugin
(
Unocss({ presets: [...] })), so UnoCSS's own config-file discovery foundnothing and fell back to an empty default config, logging the warning each time.
Fix
Move the presets into a standalone
docs/uno.config.ts, which the Vite pluginauto-loads, and call
Unocss()with no arguments.No change in output: the
i-logos:typescript-iconon the landing still renders(verified the generated CSS still contains the icon rule at
scale: 1.2), andthe warning is gone.