@vue-bridge/runtime

A library achieving partial runtime compat between Vue 2 and Vue 3 components
205,808 45
Install
npm install @vue-bridge/runtime
Latest Version:0.1.1
Vue:2 · 3
License:MIT
Last Updated:Nov 7, 2022
Links: GitHub  ·  npm
Maintainer: linusborg

@vue-bridge/runtime

current npm version NPM npm bundle size (min+zip) npm downloads per month

Runtime Core library of the VueBridge Project

https://vue-bridge-docs.netlify.app/reference/runtime

What this is

Installation

yarn add @vue-bridge/runtime
# npm
npm install ‘@vue-bridge/runtime'

Basic Usage

<template>
  <input v-model="value">
<template>
<script>
  import { defineComponent } from '@vue-bridge/runtime'
  export defineComponent({
    props: {
      modelValue: String
    },
    emits: ['update:modelValue'],
    computed: {
      value: {
        get() { return this.modelValue }
        set(value) { this.$emit('update:modelValue', value)}
      }
    }
  })
</script>

Please refer to the docs for further guidance and information.

CLI

This package exposes two CLI commands to influence the entry files being exposed by this package - those for Vue 2 or Vue 3.

# Manually switch main entries to Vue 2 compatible versions
npx vue-bridge-switch 2
yarn vue-bridge-switch 2
# Manually switch main entries to Vue 4 compatible versions
npx vue-bridge-switch 3
yarn vue-bridge-switch 3

Development

Related Packages

@vue-bridge/testing

Wrapper over vue-test-utils to enable tests in cross-version Vue libraries

5,249 45
@vue-bridge/vite-plugin

A Vite Plugin to build Vue libraries for both Vue 2 and Vue 3

3,927 45

Version History

Version Released License
0.1.1 MIT
0.1.0 MIT
0.0.12 MIT
0.0.11 MIT
0.0.10 MIT