[Bug Report][1.3.0] utilities/instance: `import * as Vue` keeps the whole Vapor runtime in VDOM-only bundles
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- performance
Research direction
Start with packages/0/src/utilities/instance.ts, where the namespace import pulls all Vue exports into the bundle. Use the provided src/main.ts Vite reproduction to compare the generated bundle, and check that the fix preserves the current-instance behavior without including @vue/runtime-vapor. Done means a VDOM-only build no longer contains the Vapor runtime and the existing utility behavior remains intact.
Written by the indexing model from the issue text.
Description
Environment
Vuetify0 Version: 1.3.0
Vue Version: 3.6.0-rc.12
OS: Linux undefined (current)
Steps to reproduce
- npm i [email protected] @vuetify/[email protected] [email protected]
- index.html: <script type="module" src="/src/main.ts"></script>
- src/main.ts: import { useStack } from "@vuetify/v0"; import { createApp, h } from "vue"; createApp({ setup: () => { useStack(); return () => h("div", "hello"); } }).mount("#app");
- npx vite build: the JS bundle contains @vue/runtime-vapor (100.8 KB gzip; 24.9 KB with the @vuetify/v0 import removed)
Expected Behavior
A VDOM-only app that uses @vuetify/v0 does not bundle @vue/runtime-vapor.
Actual Behavior
utilities/instance.ts imports * as Vue and reads 'current' + 'Instance' in vueExports, so the bundler keeps every export of vue, including the Vapor runtime that Vue 3.6 re-exports. Vite 8.3.5 build, gzip JS: Vue alone 24.9 KB; with useStack from @vuetify/v0 1.3.0 100.8 KB (@vue/runtime-vapor bundled); the same with instance.mjs changed to import { getCurrentInstance } from 'vue' 30.3 KB (no @vue/runtime-vapor).
Reproduction Link
Other comments
Named imports keep the rest of vue tree-shakable. We patched instance.mjs locally to import { getCurrentInstance } from 'vue' because our app has no Vapor components; keeping Vapor support would need a named currentInstance import where Vue >= 3.6 is guaranteed.
- Dominant language
- TypeScript
- Stars
- 740
- Forks
- 10
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 77
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vuetifyjs/0
-
Evaluate Invoker Commands API (command/commandfor) for Dialog, AlertDialog, and a custom-command bridgeMay be free again @johnleider claimed this 104 days ago, and no pull request is open. Openenhancement
vuetifyjs/0#573 · 1 assignee ·
Maintainers usually reply within 1 day
-
Explore TypeScript 7 (native compiler) migration + isolatedDeclarations readinessMay be free again @johnleider claimed this 107 days ago, and no pull request is open. OpenE: createPlugin E: createTrinity enhancement
vuetifyjs/0#562 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Feature Request] Make the v0 docs WebMCP-consumable (agent-navigable)May be free again @johnleider claimed this 107 days ago, and no pull request is open. Opendocumentation enhancement
vuetifyjs/0#551 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Documentation] Bookmark API entries from the API popover (movable companion panel)May be free again @johnleider claimed this 109 days ago, and no pull request is open. Openenhancement T: feature
vuetifyjs/0#537 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Feature Request] DateRangePicker componentMay be free again @johnleider claimed this 109 days ago, and no pull request is open. OpenC: DateRangePicker T: feature
vuetifyjs/0#524 · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
farion1231/cc-switch#8829 ·
Maintainers usually reply within 1 day
-
[core-client] Remove unused hand-maintained transport helpers after the definition-table cutoverOpendoc-audit enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100