perf: trim package dependencies by reusing devframe utilities - #538
Merged
Conversation
- 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
@vitejs/devtools
@vitejs/devtools-kit
@vitejs/devtools-oxc
@vitejs/devtools-rolldown
@vitejs/devtools-vite
@vitejs/devtools-vitest
commit: |
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.
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 incore/kithere, so this covers the remaining opportunities:Reuse devframe utilities
get-port-please→devframe/utils/get-port. devframe bundles get-port-please internally and is already pulled transitively via@vitejs/devtools-kit, soget-port-pleaseleaves vitest's install tree entirely (the analog of the reference PR'sohash→devframe/utils/hash).Correct dependency placement (client-only, bundled into the pre-built Nuxt SPA →
devDependencies)@floating-ui/dom,d3-shape,vue-virtual-scrollerfromdependenciestodevDependencies(absent from the nodedist; they are peer deps of@vitejs/devtools-ui, bundled into the SPA).@floating-ui/dom,d3-shapefromdependenciestodevDependencies(same reason).Dead-entry cleanup
@vitejs/devtools-kit,devframe,pathefromdevDependencies(already declared independencies).onlyBundle: ['get-port-please']fromtsdown.config.ts(core importsdevframe/utils/get-portas an external, so get-port-please never enters its graph —distoutput is byte-identical).get-port-pleasecatalog 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 vitestdistnow importsdevframe/utils/get-port, rolldowndistcontains none of the moved client libs, and no new peer-dependency warnings are introduced.This PR was created with the help of an agent.