Skip to content

fix(deps): bump Vite to 8, restore missing Nuxt UI theme classes, drop dead TipTap pins#482

Merged
larbish merged 6 commits into
nuxt-content:chore/depsfrom
hendrikheil:chore/deps-unblock
Jun 12, 2026
Merged

fix(deps): bump Vite to 8, restore missing Nuxt UI theme classes, drop dead TipTap pins#482
larbish merged 6 commits into
nuxt-content:chore/depsfrom
hendrikheil:chore/deps-unblock

Conversation

@hendrikheil

@hendrikheil hendrikheil commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Context

Picking up where @larbish left off on #476. The branch bumps the dependency stack (pnpm 11, Vite 8, @nuxt/ui 4.8, TipTap 3.26) and fixes the issues that surfaced along the way.


Problem 1 — Tailwind styles missing from the Studio UI

After the upgrade, classes that only exist in Nuxt UI's generated component themes (e.g. text-[8px]/3 on badges) were no longer applied inside the Studio shadow DOM — in dev and in the prepack build.

Root cause: Studio starts its embedded Vue app with a relative CLI root (vite src/app from the repo root). Vite runs plugin config hooks before it resolves config.root (resolveConfig calls runConfigHook(...) first, then path.resolve(config.root)), so @nuxt/ui's TemplatePlugin builds its #build/* alias map from the still-relative root. The resulting relative alias targets are tolerated by Vite's own pipeline (with a warning) but rejected by @tailwindcss/vite's resolver — Tailwind never inlines #build/ui.css, never sees its @source "./ui" directive, and silently drops every theme-only utility from the generated CSS (~1,300 selectors; dev CSS shrank from 298 KB to 110 KB).

Fix: a tiny enforce: 'pre' plugin in src/app/vite.config.ts that resolves config.root to an absolute path before @nuxt/ui's hook runs — mirroring Vite's own root resolution.

Upstream: the proper fix is in @nuxt/ui's TemplatePlugin; PR open at nuxt/ui#6586 (on Vite 7 the same bug hard-fails the build instead of degrading silently). Once that lands and we bump @nuxt/ui, the workaround plugin can be deleted.

Verified end-to-end: dev server CSS regenerates all theme utilities, prepack bundle contains the escaped selectors, and the badge in the running Studio UI computes font-size: 8px; line-height: 12px. Note for consumers of the prebuilt app: Vite's dep optimizer doesn't notice content changes behind nuxt-studio/app, so a stale node_modules/.cache/vite needs clearing to pick up the rebuild.

Problem 2 — TipTap/pnpm overrides were silently dead, then unnecessary

After migrating to pnpm 11, the resolutions block in package.json was a Yarn-style field that pnpm silently ignores, leaving two copies of @tiptap/core/@tiptap/pm (and ProseMirror) in the lockfile.

This was first fixed by moving the pins into pnpm-workspace.yaml as pnpm overrides: and expanding them to the whole @tiptap/* suite. But it turned out the pins are no longer needed at all: every dependent's range (@nuxt/ui@4.6.1 wants ^3.21, @nuxt/ui@4.8.2 wants ^3.24, Studio wants ^3.26) intersects at 3.26.0, so pnpm dedupes to a single version naturally. All 38 @tiptap/*/prosemirror-model override lines were dropped again — verified: no duplicate tiptap/prosemirror packages in the lockfile, all 335 tests pass.

Caveat: the dedupe holds only while the ranges intersect. Studio pins @tiptap/extension-table to exactly 3.26.0, so a future TipTap 3.27 bump in @nuxt/ui could split versions again — typecheck would catch it.

Problem 3 — Vite 8 ecosystem compat

  • Nuxt's internal dev tooling (vite-plugin-inspect, vite-dev-rpc, vite-plugin-vue-tracer) didn't declare Vite 8 peer support, causing pnpm dev to hang on startup → pinned to Vite-8-compatible versions in overrides:.
  • Shadow DOM CSS injection (convertPropertyToVar()) verified against Vite 8 / Lightning CSS output: all 63 @property blocks parsed, 25 initial values correctly extracted to :host {}, confirmed in the browser.

Known issue (pre-existing on this branch, not addressed here)

pnpm typecheck fails with TS1117 in ContentEditorAILanguageSelection.vue: vue-tsc 3.3.4 (current latest) compiles two @keydown.<modifier> handlers on one element into duplicate onKeydown object keys. Blocked on an upstream vue-tsc release; a TODO comment marks the spot.


Verification

  • pnpm install — clean, no duplicate TipTap/ProseMirror versions in lockfile
  • vite build src/app — clean build, theme utilities present in the bundle
  • pnpm dev / minimal playground — Studio UI fully styled, verified via browser inspection of the shadow root
  • pnpm test — 335/335 passing

hendrikheil and others added 2 commits June 11, 2026 21:56
- Move dead Yarn-style `resolutions` block from package.json into
  pnpm-workspace.yaml as proper pnpm `overrides` so they're actually
  enforced by pnpm 11
- Pin entire @tiptap/* suite (core, pm, vue-3, all extensions,
  y-tiptap) to 3.26.0 / 3.0.4 to eliminate duplicate ProseMirror
  instances that were caused by pnpm ignoring the old resolutions field
- Pin prosemirror-model to 1.25.7 to match @tiptap/pm@3.26.0's
  explicit requirement and remove duplicate-model TypeScript errors
- Bump vite devDependency from ^7.3.1 to ^8.0.0

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pin vite-plugin-inspect, vite-dev-rpc, and vite-plugin-vue-tracer to
versions that explicitly support Vite 8 so that the Nuxt dev server
starts correctly after the vite ^8.0.0 bump.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@hendrikheil is attempting to deploy a commit to the Nuxt Team on Vercel.

A member of the Team first needs to authorize it.

@hendrikheil hendrikheil marked this pull request as draft June 11, 2026 22:45
hendrikheil and others added 3 commits June 12, 2026 12:32
…I theme

Vite 8 keeps a CLI-provided root (e.g. `vite src/app`) relative when plugin
config hooks run. @nuxt/ui builds its #build/* alias map from that root,
producing relative alias targets that @tailwindcss/vite's resolver rejects.
Tailwind then never inlines #build/ui.css, never sees its @source directive,
and silently drops every Nuxt UI theme class (e.g. text-[8px]/3) from the
generated CSS in both dev and build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All @tiptap/* ranges (@nuxt/ui ^3.21/^3.24, studio ^3.26) intersect at
3.26.0, so pnpm dedupes to a single version without forcing it. Verified:
no duplicate tiptap/prosemirror packages in the lockfile, tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…iers

vue-tsc 3.3.4 (latest) compiles multiple @keydown.<modifier> handlers on one
element into duplicate onKeydown object keys, failing typecheck. Waiting on
an upstream vue-tsc release.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hendrikheil hendrikheil changed the title chore(deps): fix pnpm overrides, bump Vite to 8, resolve TipTap/ProseMirror dedup fix(deps): bump Vite to 8, restore missing Nuxt UI theme classes, drop dead TipTap pins Jun 12, 2026
@hendrikheil hendrikheil marked this pull request as ready for review June 12, 2026 11:47
…orkaround

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nuxt.studio Ready Ready Preview Jun 12, 2026 12:51pm

@larbish larbish merged commit 4632791 into nuxt-content:chore/deps Jun 12, 2026
2 of 3 checks passed
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.

2 participants