Skip to content

Feat/optimize css - #31

Merged
dadajam4 merged 4 commits into
mainfrom
feat/optimize-css
May 5, 2023
Merged

dadajam4 merged 4 commits into
mainfrom
feat/optimize-css

Conversation

@dadajam4

@dadajam4 dadajam4 commented May 5, 2023

Copy link
Copy Markdown
Owner

📝 Description

Added CSS optimization mechanism to plugboy.

Applied CSS layer to vue-app-layout to properly override styles.

@changeset-bot

changeset-bot Bot commented May 5, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d4e5b4d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@fastkit/plugboy Patch
@fastkit/vite-plugin-vui Patch
@fastkit/vue-app-layout Patch
@fastkit/vui Patch
@fastkit/plugboy-vanilla-extract-plugin Patch
@fastkit/color-scheme Patch
@fastkit/icon-font Patch
@fastkit/media-match Patch
@fastkit/plugboy-sass-plugin Patch
@fastkit/plugboy-vue-jsx-plugin Patch
@fastkit/vui-wysiwyg Patch
@fastkit/color-scheme-gen Patch
@fastkit/vue-color-scheme Patch
@fastkit/vue-loading Patch
@fastkit/vue-stack Patch
@fastkit/icon-font-gen Patch
@fastkit/media-match-gen Patch
@fastkit/vue-media-match Patch
@fastkit/vite-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dadajam4
dadajam4 merged commit 8e04503 into main May 5, 2023
@dadajam4
dadajam4 deleted the feat/optimize-css branch May 5, 2023 10:50
@github-actions github-actions Bot mentioned this pull request May 5, 2023
dadajam4 added a commit that referenced this pull request Jul 28, 2026
…dency (#177)

* fix(vue-app-layout): declare the @fastkit/vanilla-extract-utils dependency

`src/styles/layers.css.ts` imports `@fastkit/vanilla-extract-utils`, but the
package never declared it — it resolved only through the root `node_modules`,
where the module is hoisted as a workspace-level devDependency.

That hid the import from turbo. `build` is ordered by `dependsOn: ["^build"]`,
which walks declared workspace dependencies, so turbo had no reason to build
@fastkit/vanilla-extract-utils first and the two could run concurrently. Whenever
its `dist` did not happen to exist yet, vue-app-layout failed to build with
`Could not resolve "@fastkit/vanilla-extract-utils"`.

Nothing surfaced it until now because a warm `dist` masks it. #175 changed the
lockfile, which invalidated the turbo cache, so the release run did a fully cold
build and hit the race — the "Build docs" step failed there. The import itself
dates back to #31, so this is long-standing.

Declared as a devDependency: `.css.ts` is evaluated at build time and compiles
away, and the built `dist` contains no reference to the module, so consumers
never need it.

Reproduced by removing `packages/vanilla-extract-utils/dist` and building only
@fastkit/vue-app-layout — it failed before and now builds 14 tasks in dependency
order. Also verified against CI's conditions: every `dist` plus the turbo cache
removed, then `pnpm build:docs` (52/52).

`pnpm audit:deps` did not catch this by design — it audits imports that survive
into `dist`, which is what breaks consumers. This one disappears at build time
and only breaks the build itself.

No changeset: @fastkit/vue-app-layout is already scheduled for a patch in the
pending release, and a devDependency is inert for consumers.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs(deps): scope root-aggregation to deps every package uses

The policy listed @fastkit/vanilla-extract-utils among the root-aggregated dev
toolchain with "do not declare it per package", which the preceding commit
contradicts. Resolve it in favour of declaring, and record why.

Root-aggregation exists to keep a dependency that every package uses out of
60-odd package.json files. It cannot express build order, and for a workspace
package that matters: turbo orders `build` by walking declared workspace
dependencies, so an undeclared one has no edge and its dist may not exist yet
when the dependent builds. @fastkit/plugboy gets away with it only because every
package builds with it, so the `build:plugboy` phase handles ordering once.

Drop @fastkit/vanilla-extract-utils from that list, note the limit of
root-aggregation in the decision guide, and add a "Workspace build-time helpers"
section covering the general case — *.css.ts helpers, ./plugboy-dts-preserve
subpaths, codegen helpers.

The file is not prettier-clean on main and `lint` does not cover docs markdown,
so it is left as-is apart from these edits rather than reformatted, to keep the
diff readable.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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