docs(skill): reset-css needs no plugin configuration - #668
Merged
Merged
Conversation
The section added in #665 told readers to wire three settings for `@devup-ui/reset-css`: plugins: [DevupUI({ include: ["@devup-ui/reset-css"] })], optimizeDeps: { exclude: ["@devup-ui/reset-css"] }, ssr: { noExternal: ["@devup-ui/reset-css"] }, None of them are needed, and the claim that "the plugin has to be told to process it or its classes are never emitted" is wrong. The reset is a `globalCss()` call at the top level of the package's own module; `resetCss()` is an empty function that exists only so the import survives tree-shaking. So the single requirement is that the plugin transforms the package inside `node_modules`, and `createNodeModulesExcludeRegex` already lets `@devup-ui` and `@devup-editor` through unconditionally: const base = `node_modules(?!.*(${['@devup-ui', '@devup-editor', ...include] `include` only appends to that list. `ssr.noExternal` is set from a `/@devup-ui/` pattern, which matches the package for the same reason. `apps/landing` is the proof: it imports `resetCss` in its root layout and its `vite.config.ts` passes `DevupUI({ singleCss })` and nothing else. The advice came from reading a 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, and the plugin source was three files away.
Contributor
Changepacks@devup-ui/components@0.1.55 → 0.1.56 - packages/components/package.jsonPatch
@devup-ui/react@1.0.41 → 1.0.42 - packages/react/package.jsonPatch
@devup-ui/reset-css@1.0.28 → 1.0.29 - packages/reset-css/package.jsonPatch
|
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
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.
Corrects a mistake I shipped in #665.
What was wrong
That PR added a
@devup-ui/reset-csssection claiming "the plugin has to be told to process it or its classes are never emitted", with three settings:None of them are needed.
Why
The reset is a
globalCss()call at the top level of the package's own module —packages/reset-css/src/index.tsis 145 lines, of whichglobalCss({...})spans 3–143.resetCss()on line 145 is 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.createNodeModulesExcludeRegexalready allows that unconditionally:includeonly appends to that list. Andssr.noExternalis set from a/@devup-ui/pattern, which matches the package for the same reason:The proof is in this repo
apps/landingimportsresetCssin its root layout, and its config is:No
include, nooptimizeDeps, nossr.noExternal. The library's own app uses the documented-as-required wiring nowhere.How I got it wrong
I read a 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.The correction also says plainly not to add those entries, because writing them tells the next reader that a devup-ui package needs wiring when none does.
Follow-up
devup-mcpvendors thisSKILL.mdinto its binary and ships the same wrong advice indevfive-frontend. Both are being corrected and re-released as 0.8.1.