fix(deps): bump Vite to 8, restore missing Nuxt UI theme classes, drop dead TipTap pins#482
Merged
Merged
Conversation
- 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>
Contributor
|
@hendrikheil is attempting to deploy a commit to the Nuxt Team on Vercel. A member of the Team first needs to authorize it. |
…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>
…orkaround Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
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]/3on 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/appfrom the repo root). Vite runs pluginconfighooks before it resolvesconfig.root(resolveConfigcallsrunConfigHook(...)first, thenpath.resolve(config.root)), so @nuxt/ui'sTemplatePluginbuilds 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 insrc/app/vite.config.tsthat resolvesconfig.rootto 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 behindnuxt-studio/app, so a stalenode_modules/.cache/viteneeds clearing to pick up the rebuild.Problem 2 — TipTap/pnpm overrides were silently dead, then unnecessary
After migrating to pnpm 11, the
resolutionsblock inpackage.jsonwas 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.yamlas pnpmoverrides: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.1wants^3.21,@nuxt/ui@4.8.2wants^3.24, Studio wants^3.26) intersects at3.26.0, so pnpm dedupes to a single version naturally. All 38@tiptap/*/prosemirror-modeloverride 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-tableto exactly3.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
vite-plugin-inspect,vite-dev-rpc,vite-plugin-vue-tracer) didn't declare Vite 8 peer support, causingpnpm devto hang on startup → pinned to Vite-8-compatible versions inoverrides:.convertPropertyToVar()) verified against Vite 8 / Lightning CSS output: all 63@propertyblocks parsed, 25 initial values correctly extracted to:host {}, confirmed in the browser.Known issue (pre-existing on this branch, not addressed here)
pnpm typecheckfails with TS1117 inContentEditorAILanguageSelection.vue: vue-tsc 3.3.4 (current latest) compiles two@keydown.<modifier>handlers on one element into duplicateonKeydownobject keys. Blocked on an upstream vue-tsc release; a TODO comment marks the spot.Verification
pnpm install— clean, no duplicate TipTap/ProseMirror versions in lockfilevite build src/app— clean build, theme utilities present in the bundlepnpm dev/ minimal playground — Studio UI fully styled, verified via browser inspection of the shadow rootpnpm test— 335/335 passing