Skip to content

Installation

@basmilius/common ships as ESM and expects to live next to a Vue 3 application. It declares Vue, Vue Router and Pinia as peer dependencies, so you install them alongside the package itself.

shell
bun add @basmilius/common vue vue-router pinia
shell
npm install @basmilius/common vue vue-router pinia
shell
pnpm add @basmilius/common vue vue-router pinia
shell
yarn add @basmilius/common vue vue-router pinia

Peer dependencies

The package will not install Vue, Vue Router or Pinia for you — they are listed as peers so the host application stays in control of the exact versions.

Optional: @basmilius/http-client

A few composables are tightly coupled to @basmilius/http-client. Add it when you plan to use them.

  • useDataTable — paginated data tables backed by a BaseResponse<Paginated<T>>
  • useDtoForm — DTO-aware form refs that clone and mark clean
  • useService — service-class proxy that wraps every method with guarded
shell
bun add @basmilius/http-client

Importing

All exports are named exports from the package root. The package is fully tree-shakeable, so unused composables and utilities are dropped from your bundle.

ts
import { useClickOutside, persistentRef } from '@basmilius/common';

Requirements