Isomor Vue App
raw JSON → 2.7.1 verified Fri May 01 auth: no javascript maintenance
isomor-vue-app is a library for isomor v2.x, an isomorphic framework that abstracts frontend-backend layers in a single TypeScript/JavaScript project. It generates communication layers automatically, replacing REST or GraphQL with direct function calls from frontend to server. This package provides Vue-specific integration (likely Vue 2) for isomor. The framework uses Babel transpilation to separate code. Released as part of isomor ecosystem, maintained by apiel.
Common errors
error Module not found: Can't resolve 'isomor-vue-app' ↓
cause Missing isomor-vue-app dependency or missing isomor peer dependency
fix
Run npm install isomor-vue-app isomor
error Error: Cannot find module 'isomor' ↓
cause Missing peer dependency isomor
fix
Run npm install isomor
error TypeError: Vue.use is not a function ↓
cause Vue is not imported or not installed correctly
fix
Ensure Vue is properly imported: import Vue from 'vue'
Warnings
breaking isomor-vue-app requires isomor v2.x. isomor v1.x is not compatible. ↓
fix Upgrade isomor to v2.x.
deprecated Vue 2 support only. Vue 3 is not supported. ↓
fix Use a different library for Vue 3, or stay on Vue 2.
gotcha Direct use of client and server modules in the same file is not allowed; isomor separates them at build time. ↓
fix Keep client and server code in separate files with appropriate imports.
gotcha This package only provides Vue integration; you must install isomor separately. ↓
fix Add isomor to your dependencies.
Install
npm install isomor-vue-app yarn add isomor-vue-app pnpm add isomor-vue-app Imports
- isomorVueApp wrong
const isomorVueApp = require('isomor-vue-app');correctimport isomorVueApp from 'isomor-vue-app' - VueClient wrong
import VueClient from 'isomor-vue-app';correctimport { VueClient } from 'isomor-vue-app' - VueServer wrong
import VueServer from 'isomor-vue-app';correctimport { VueServer } from 'isomor-vue-app/server'
Quickstart
// Install: npm install isomor @isomor/vue-app vue
import Vue from 'vue';
import isomorVueApp from 'isomor-vue-app';
import { VueClient } from 'isomor-vue-app';
// Create a Vue plugin instance
const vuePlugin = isomorVueApp({
api: 'http://localhost:3000/api' // Your API endpoint
});
Vue.use(vuePlugin);
new Vue({
render: h => h(App),
created() {
// Now you can call server functions directly
// e.g., import { getUsers } from './server/users';
// getUsers().then(users => this.users = users);
}
}).$mount('#app');