diff --git a/.changepacks/changepack_log_reset_css_needs_no_config.json b/.changepacks/changepack_log_reset_css_needs_no_config.json new file mode 100644 index 00000000..f1bc406c --- /dev/null +++ b/.changepacks/changepack_log_reset_css_needs_no_config.json @@ -0,0 +1,7 @@ +{ + "changes": { + "crates/devup-mcp/Cargo.toml": "Patch" + }, + "note": "0.8.0 shipped wrong build advice in two of the skills it installs, and this corrects both. The devup-ui and devfive-frontend documents told readers that `@devup-ui/reset-css` has to be declared to the build plugin or its classes are never emitted, with three settings to add: an `include` entry, an `optimizeDeps.exclude` entry and an `ssr.noExternal` entry. 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 that exclusion unconditionally, with `include` only appending to the 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, which is the empirical proof. The advice came from reading one downstream project that had added `include` and inferring it was required; a single observation of a redundant setting is not evidence that the setting is needed, and the plugin source was three files away. Because devup-mcp vendors these documents into the binary, the wrong recipe was what `devup_skills install` wrote on every machine with no network - the machines least able to check it against the plugin source. Both documents now say the package needs no configuration and say plainly not to add those entries, since writing them teaches the next reader that a devup-ui package needs wiring when none does.", + "date": "2026-09-15T15:45:00+09:00" +} diff --git a/crates/devup-mcp/src/server/skills/devfive-frontend/SKILL.md b/crates/devup-mcp/src/server/skills/devfive-frontend/SKILL.md index 433ad259..2bda3e93 100644 --- a/crates/devup-mcp/src/server/skills/devfive-frontend/SKILL.md +++ b/crates/devup-mcp/src/server/skills/devfive-frontend/SKILL.md @@ -59,7 +59,7 @@ and no `next.config.ts`. Read `package.json`, not the config filename: ```ts // apps/front/vite.config.ts -> still App Router. Both plugins belong here. plugins: [ - DevupUI({ include: ['@devup-ui/reset-css'] }), + DevupUI(), vinext({ nextConfig: { output: 'export', trailingSlash: true } }), ] ``` @@ -108,16 +108,26 @@ silently competes with the classes devup-ui generated. The only CSS import that is allowed is a stylesheet **shipped by an installed package** that you do not author — an offline webfont package, for example. -`@devup-ui/reset-css` has to be declared to the build plugin or its classes are -never emitted: +`@devup-ui/reset-css` needs **no plugin configuration**. Install it, call it in +the root layout, and stop: -```ts -// apps/front/vite.config.ts -plugins: [DevupUI({ include: ['@devup-ui/reset-css'] })], -optimizeDeps: { exclude: ['@devup-ui/reset-css'] }, -ssr: { noExternal: ['@devup-ui/reset-css'] }, +```tsx +// apps/front/src/app/layout.tsx +import { resetCss } from '@devup-ui/reset-css' + +resetCss() ``` +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. The one thing that has to happen is that the plugin transforms the +package inside `node_modules`, and every devup-ui plugin already allows +`@devup-ui` through that exclusion unconditionally. + +Do not add `include`, `optimizeDeps.exclude` or `ssr.noExternal` entries for it. +They are redundant, and writing them teaches the next reader that a devup-ui +package needs wiring when none does. + ### What decides static extraction One rule explains every case below: diff --git a/crates/devup-mcp/src/server/skills/devup-ui/SKILL.md b/crates/devup-mcp/src/server/skills/devup-ui/SKILL.md index 13803ac2..cd0a4cd7 100644 --- a/crates/devup-mcp/src/server/skills/devup-ui/SKILL.md +++ b/crates/devup-mcp/src/server/skills/devup-ui/SKILL.md @@ -480,15 +480,32 @@ package you do not author**, such as an offline webfont package. ### `@devup-ui/reset-css` -It is a package, so the plugin has to be told to process it or its classes are -never emitted. With Vite the two resolver settings are needed as well: +Install it and import it. **It needs no plugin configuration**, on any bundler: + +```tsx +// app/layout.tsx +import { resetCss } from "@devup-ui/reset-css"; + +resetCss(); +``` ```ts -plugins: [DevupUI({ include: ["@devup-ui/reset-css"] })], -optimizeDeps: { exclude: ["@devup-ui/reset-css"] }, -ssr: { noExternal: ["@devup-ui/reset-css"] }, +// vite.config.ts - nothing extra +plugins: [DevupUI()]; ``` +The reset is a `globalCss()` call at the top level of the package's own module, +and `resetCss()` is an empty function that exists only so the import is not +tree-shaken away. So the one thing that has to happen is that the plugin +transforms the package inside `node_modules` — and every plugin already allows +`@devup-ui` and `@devup-editor` through that exclusion unconditionally, with +`include` only *adding* to that list. `ssr.noExternal` is set from a `/@devup-ui/` +pattern for the same reason. + +Do not add `include`, `optimizeDeps.exclude` or `ssr.noExternal` entries for it. +They are redundant, and writing them suggests to the next reader that a devup-ui +package needs wiring when none does. + ## What Decides Static Extraction One rule explains `Dynamic Values = CSS Variables`, `$token Scope` and diff --git a/crates/devup-mcp/src/server/skills/manifest.json b/crates/devup-mcp/src/server/skills/manifest.json index 0ca56b78..80dfaa66 100644 --- a/crates/devup-mcp/src/server/skills/manifest.json +++ b/crates/devup-mcp/src/server/skills/manifest.json @@ -10,16 +10,16 @@ "usedFor": "The TSX devup_figma_export returns is devup-ui code. Without this the agent does not know its components are compile-time placeholders, that $token means devup.json, or that a style prop takes a responsive array.", "repo": "dev-five-git/devup-ui", "path": "SKILL.md", - "commit": "3b1c3bfff4be9a1fe405a5cc057b1b9fb6e8968f", - "committedAt": "2026-09-15T01:41:55Z", + "commit": "601dd15cd0f5d3c5b94076155a1ba25f70007c26", + "committedAt": "2026-09-15T06:31:11Z", "documents": [ { "path": "SKILL.md", - "bytes": 20632, - "sha256": "475b65caf01404aab91f6a344526be7ae43237d84354de81aa4a6544de476b6f" + "bytes": 21253, + "sha256": "2ef847f01a91a7b43d38b2d1a1072e05487624c1f38f2b8f3742ad0e82fd25a2" } ], - "sourceUrl": "https://github.com/dev-five-git/devup-ui/blob/3b1c3bfff4be9a1fe405a5cc057b1b9fb6e8968f/SKILL.md", + "sourceUrl": "https://github.com/dev-five-git/devup-ui/blob/601dd15cd0f5d3c5b94076155a1ba25f70007c26/SKILL.md", "latestUrl": "https://github.com/dev-five-git/devup-ui/blob/HEAD/SKILL.md" }, { @@ -33,8 +33,8 @@ "documents": [ { "path": "SKILL.md", - "bytes": 18354, - "sha256": "22753decbb1c6326d09f0733391b33ab8b033915ce78615a09dbbe0728f03919" + "bytes": 18796, + "sha256": "3343b5a022c38c22adbb6ada50dc80b83a6a30154edc2c6594aa240b4bbbeb61" }, { "path": "references/critical-rules.md",