Building Components for Vue 2&3 - an Attempt at solving the challenge
summary
Concrete recipe for cross‑version Vue components: use vue bridge — a tiny 600 bytes runtime that normalizes v-model and options, a testing bridge exposing one mount API that runs against both Test Utils versions, an ESLint preset, and a Vite plugin that strips version-specific style blocks and resolves per‑version imports. Organize builds in a mono repo with pnpm workspaces, build twice (or publish two packages / one package with two dist folders), and use the provided template on npm to get started.
AI-written summary · about
chapters (16)
- 0:00Start
- 2:52Introducing Vue-Bridge
- 4:58Vue 2.7 will make this easier
- 5:40Example: v-model on Components
- 6:09Example: v-model - Manual Fix
- 6:25Example: v-model-Vue-Bridge helper
- 7:10Challenges for unit Testing
- 7:40Example - Unit test
- 8:53Build-time features
- 9:42Version-specific styles
- 10:33Version-specific imports
- 12:05Dependency issues in flat repositories
- 13:39Clean Dependencies with Workspaces (1)
- 17:27Bundling and Publishing as two Packages
- 18:52Bundling and Publishing as one Package
- 29:02Vue-Bridge needs you!








