fix(skills): reset-css needs no plugin configuration - #67
Merged
Merged
Conversation
0.8.0 shipped wrong build advice in two of the skills it installs.
Both the devup-ui and devfive-frontend documents said `@devup-ui/reset-css`
has to be declared to the build plugin or its classes are never emitted, and
gave three settings to add:
plugins: [DevupUI({ include: ['@devup-ui/reset-css'] })],
optimizeDeps: { exclude: ['@devup-ui/reset-css'] },
ssr: { noExternal: ['@devup-ui/reset-css'] },
None of them are needed.
The reset is a `globalCss()` call at the top level of that package's own
module, and `resetCss()` is an empty function that only keeps the import from
being tree-shaken. So the single requirement is that the plugin transforms the
package inside node_modules, and `createNodeModulesExcludeRegex` already allows
`@devup-ui` and `@devup-editor` through unconditionally, with `include` only
appending to that list. `ssr.noExternal` is set from a `/@devup-ui/` pattern
for the same reason. devup-ui's own `apps/landing` imports `resetCss` in its
root layout and passes `DevupUI({ singleCss })` and nothing else.
This matters more here than in a README. devup-mcp vendors these documents into
the binary, so the wrong recipe was exactly what `devup_skills install` wrote
on every machine with no network - the machines least able to check it against
the plugin source.
The advice came from reading one downstream project that had added `include`
and inferring it was required. One observation of a redundant setting is not
evidence that the setting is needed.
Re-vendors devup-ui at 601dd15c, which carries the same correction upstream,
and reseals devfive-frontend after editing it.
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.
0.8.0 shipped wrong build advice in two of the skills it installs. This corrects both and re-vendors devup-ui.
What was wrong
Both
devup-uianddevfive-frontendsaid@devup-ui/reset-css"has to be declared to the build plugin or its classes are never emitted", with three settings:None of them are needed.
Why
packages/reset-css/src/index.tsis 145 lines:globalCss({...})spans 3–143 at module top level, and line 145 isexport function resetCss(): void {}— an empty function, there only so the import survives tree-shaking.So the single requirement is that the plugin transforms the package inside
node_modules, which is already unconditional:includeonly appends.ssr.noExternalis set from a/@devup-ui/pattern, matching the package for the same reason.devup-ui's own
apps/landingimportsresetCssin its root layout and configuresDevupUI({ singleCss })and nothing else.Why this mattered more here
devup-mcp vendors these documents into the binary, so the wrong recipe was exactly what
devup_skills installwrote on every machine with no network — the machines least able to check it against the plugin source.How I got it wrong
I read one downstream project that had added
include: ['@devup-ui/reset-css']and inferred it was required. One observation of a redundant setting is not evidence that the setting is needed, and the plugin source was three files away. I verified the extraction rule in #665 against the extractor but did not hold this claim to the same standard.Both documents now say the package needs no configuration, and say plainly not to add those entries — writing them teaches the next reader that a devup-ui package needs wiring when none does.
Contents
devup-uiat601dd15c(docs(skill): reset-css needs no plugin configuration devup-ui#668, the same correction upstream) — 20,632 → 21,253 bytesdevfive-frontendin two places: the vinextvite.config.tsexample and the reset-css block — resealed 18,354 → 18,796 bytesVerification
cargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets --all-features -- -D warningscargo test -p devup-mcp --all-featuresnode scripts/refresh-skills.mjs --check