@garfish/bridge-vue-v2

garfish vue bridge for v2.
4,256 2,922
Install
npm install @garfish/bridge-vue-v2
Latest Version:1.19.12
Vue:2
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: reothues

"@garfish/bridge-vue-v2

NPM version

Vue bridge for vue v2 subapp. For more details, check here

Usage

// child app
import { vueBridge } from '@garfish/bridge-vue-v2';

function App() {
  return <div>content</div>;
}

export const provider = vueBridge({
  // rootComponent、loadRootComponent 传递一个即可。二者同时存在时,取 loadRootComponent 的返回值值作为 root component.
  rootComponent: App,
  loadRootComponent: ({ basename, dom, appName, props }) => {
    // do something async
    return Promise.resolve(App);
  },
  handleInstance: (vueInstance, { basename, dom, appName, props }) => {
    // you can do something in handleInstance after get the vueInstance
  },
  appOptions: ({ basename, dom, appName, props }) => {
    // pass the options to Vue Constructor. check https://vuejs.bootcss.com/api/#%E9%80%89%E9%A1%B9-%E6%95%B0%E6%8D%AE
    return {
      el: '#app',
      router: newRouter(basename),
      store,
    };
  },
});

Contributing

Credit

  • single-spa for community raised a hot wave of micro front-end solutions, and we refer to the implementation of the bridge part in single-spa and we think it is a good design, so we fork the code of the bridge implementation part and make some adjustments for the lifecycles in Garfish.

Related Packages

@garfish/bridge-vue-v3

garfish vue bridge for v3.

6,349 2,922
reapex

A framework to build React application

472,900 57
@ergonode/vuems

A simple mechanism to transform a monolithic Vue application into an application...

6,417 79

Version History

Version Released Vue License
1.19.12 =2 MIT
1.19.8 =2 MIT
1.19.7 =2 MIT
1.19.6 =2 MIT
1.19.5 =2 MIT
Pre-releases (86)
Version Released Vue License
1.19.7-beta-20250911075322.0 =2 MIT
1.19.6-beta-20250826044806.0 =2 MIT
1.19.5-beta-20250721072428.0 =2 MIT
1.19.5-beta-20250710084602.0 =2 MIT
1.19.4-beta-20241223053444.0 =2 MIT