Skip to content

perf: trim package dependencies by reusing devframe utilities - #538

Merged
antfu merged 1 commit into
mainfrom
mighty-bags-help
Aug 20, 2026
Merged

perf: trim package dependencies by reusing devframe utilities#538
antfu merged 1 commit into
mainfrom
mighty-bags-help

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Description

Reduces the runtime dependency surface and install footprint of the published packages by consolidating onto devframe's built-in utilities and correcting the placement of client-only libraries — in the spirit of nuxt/devtools#1066.

Most of that PR's work (serve-static, launch-editor, open, colors, remote-assets) was already adopted in core/kit here, so this covers the remaining opportunities:

Reuse devframe utilities

  • vitest: get-port-pleasedevframe/utils/get-port. devframe bundles get-port-please internally and is already pulled transitively via @vitejs/devtools-kit, so get-port-please leaves vitest's install tree entirely (the analog of the reference PR's ohashdevframe/utils/hash).

Correct dependency placement (client-only, bundled into the pre-built Nuxt SPA → devDependencies)

  • rolldown: move @floating-ui/dom, d3-shape, vue-virtual-scroller from dependencies to devDependencies (absent from the node dist; they are peer deps of @vitejs/devtools-ui, bundled into the SPA).
  • vite: move @floating-ui/dom, d3-shape from dependencies to devDependencies (same reason).

Dead-entry cleanup

  • oxc: drop duplicate @vitejs/devtools-kit, devframe, pathe from devDependencies (already declared in dependencies).
  • core: remove the now-dead onlyBundle: ['get-port-please'] from tsdown.config.ts (core imports devframe/utils/get-port as an external, so get-port-please never enters its graph — dist output is byte-identical).
  • pnpm-workspace.yaml: prune the orphaned get-port-please catalog entry.

Linked Issues

Additional context

Verified: pnpm build (7/7), pnpm typecheck, pnpm test (246 passed, 2 skipped), pnpm lint (eslint + oxc oxlint/oxfmt) all pass. Confirmed vitest dist now imports devframe/utils/get-port, rolldown dist contains none of the moved client libs, and no new peer-dependency warnings are introduced.

This PR was created with the help of an agent.

- vitest: use devframe/utils/get-port instead of get-port-please (devframe
  bundles it internally and is already pulled via kit, so get-port-please
  leaves the install tree)
- rolldown/vite: move client-only libs (@floating-ui/dom, d3-shape,
  vue-virtual-scroller) from dependencies to devDependencies since they are
  bundled into the pre-built Nuxt SPA, not needed at package runtime
- oxc: drop duplicate @vitejs/devtools-kit, devframe, pathe devDependencies
- core: remove now-dead onlyBundle('get-port-please') tsdown config
- prune the orphaned get-port-please catalog entry
@pkg-pr-new

pkg-pr-new Bot commented Aug 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@538

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@538

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@538

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@538

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@538

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@538

commit: a45e0ae

@antfu
antfu merged commit 94302c8 into main Aug 20, 2026
10 checks passed
@antfu
antfu deleted the mighty-bags-help branch August 20, 2026 02:26
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