Skip to content

docs(skill): reset-css needs no plugin configuration - #668

Merged
owjs3901 merged 1 commit into
mainfrom
fix/skill-reset-css-needs-no-config
Sep 15, 2026
Merged

owjs3901 merged 1 commit into
mainfrom
fix/skill-reset-css-needs-no-config

Conversation

@owjs3901

Copy link
Copy Markdown
Contributor

Corrects a mistake I shipped in #665.

What was wrong

That PR added a @devup-ui/reset-css section claiming "the plugin has to be told to process it or its classes are never emitted", with three settings:

plugins: [DevupUI({ include: ["@devup-ui/reset-css"] })],
optimizeDeps: { exclude: ["@devup-ui/reset-css"] },
ssr: { noExternal: ["@devup-ui/reset-css"] },

None of them are needed.

Why

The reset is a globalCss() call at the top level of the package's own modulepackages/reset-css/src/index.ts is 145 lines, of which globalCss({...}) 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. createNodeModulesExcludeRegex already allows that unconditionally:

// packages/plugin-utils/src/shared.ts
const base = `node_modules(?!.*(${['@devup-ui', '@devup-editor', ...include]
  .join('|')...

include only appends to that list. And ssr.noExternal is set from a /@devup-ui/ pattern, which matches the package for the same reason:

// packages/vite-plugin/src/plugin.ts
ssr: { noExternal: [...include, /@devup-ui/, /@devup-editor/] },

The proof is in this repo

apps/landing imports resetCss in its root layout, and its config is:

plugins: [
  DevupUI({ singleCss: process.env.DEVUP_SINGLE_CSS === '1' }),
  mdx(...), vinext(), ...
]

No include, no optimizeDeps, no ssr.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-mcp vendors this SKILL.md into its binary and ships the same wrong advice in devfive-frontend. Both are being corrected and re-released as 0.8.1.

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.
@github-actions

Copy link
Copy Markdown
Contributor

Changepacks

@devup-ui/components@0.1.55 → 0.1.56 - packages/components/package.json

Patch

  • Auto-update: depends on '@devup-ui/react' via a local workspace dependency

@devup-ui/react@1.0.41 → 1.0.42 - packages/react/package.json

Patch

  • Use csstype-extra properties directly to restore missing timeline trigger props and remove stale CSS type generation checks

@devup-ui/reset-css@1.0.28 → 1.0.29 - packages/reset-css/package.json

Patch

  • Auto-update: depends on '@devup-ui/react' via a local workspace dependency

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@owjs3901
owjs3901 merged commit 601dd15 into main Sep 15, 2026
4 checks passed
@owjs3901
owjs3901 deleted the fix/skill-reset-css-needs-no-config branch September 15, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant