Skip to content

feat(core): allow hosts to override DevTools branding - #543

Merged
antfu merged 2 commits into
mainfrom
feat/customizable-branding
Aug 21, 2026
Merged

feat(core): allow hosts to override DevTools branding#543
antfu merged 2 commits into
mainfrom
feat/customizable-branding

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Description

Vite DevTools' branding (product name, logo, wordmark, primary color, tagline, favicon, window title) was hardcoded in viteDevToolsBranding() with no way for an embedding host to change it. This exposes a branding option so a host such as Nuxt DevTools can re-skin the client while inheriting any field it leaves unset.

The override threads through the existing ViteDevToolsUiOptions seam — DevTools({ branding })DevToolsServer/DevToolsBuildcreateViteDevToolsUicreateUi({ branding }) — landing in ConnectionMeta.configs.ui.branding for both the dev-serve and static-build paths. A new resolveBranding() helper merges the host's overrides field-by-field over the built-in defaults, ignoring explicit undefined so a partial override never clobbers a default.

DevTools({
  branding: {
    productName: 'Nuxt DevTools',
    primaryColor: '#00dc82',
    logo: '/my-assets/nuxt-logo.svg',
    windowTitle: 'Nuxt DevTools',
  },
})

Docs updated with the option and an example. lint, typecheck, test, and build all pass (the tsnapi export-snapshot gate needs no update — it references the interfaces by name).

Linked Issues

Additional context

This PR was created with the help of an agent.

@pkg-pr-new

pkg-pr-new Bot commented Aug 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

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

@vitejs/devtools-kit

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

@vitejs/devtools-oxc

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

@vitejs/devtools-rolldown

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

@vitejs/devtools-vite

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

@vitejs/devtools-vitest

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

commit: fac4203

@antfu
antfu merged commit de9e3d5 into main Aug 21, 2026
8 checks passed
@antfu
antfu deleted the feat/customizable-branding branch August 21, 2026 22:59
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