# vue-macros/vue-macros

Explore and extend more macros and syntax sugar to Vue.

Repository: https://github.com/vue-macros/vue-macros
Canonical: https://ross.abutalabs.com/products/vue-macros
Homepage: https://vue-macros.dev
Language: TypeScript
License: MIT
License Family: permissive
Topics: vue, unplugin, rollup, vite, esbuild, sfc, script-setup, options, webpack, macros, vuejs, rsbuild, rspack
Last push: 2026-08-26T18:17:46+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 81, longevity 100
- inputs: {"age_days": 1668, "days_push": 7, "days_rel": 45, "gap_med": 0.0, "n_releases_24m": 333}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1986, forks 121 (observed 2026-08-28T04:06:02.739309+00:00)

## What it is
Vue Macros is a collection of compile-time macros and syntax sugar extensions for Vue, implemented as unplugin-based bundler plugins. It supports Vue 2.7 and Vue 3 across Vite, Nuxt, Webpack, Rspack, Rollup, and esbuild with full TypeScript and Volar support.

## Use cases
- add defineOptions macro to Vue script setup components
- use experimental Vue syntax sugar before official support
- hoist static constants in Vue SFC macros
- write less boilerplate in Vue single-file components
- share macros across Vite, Webpack, and esbuild builds
- try unofficial Vue proposals in a Vue 3 project

## When to choose
- you want to reduce boilerplate in Vue script setup components
- you need macros like defineOptions, defineModel, or hoistStatic across multiple bundlers
- you want TypeScript and Volar support for experimental Vue syntax

## When to avoid
- you prefer sticking to officially supported Vue features only
- your project uses WebStorm, which is not supported
- you rely on older Node.js or Vue 2 versions below 2.7

## Facets
- artifact type: library
- maturity: active
- function: build-tool, compiler, developer-tools, plugin-system
- domain: web-development, frontend, developer-tools
- platform: cross-platform
- tags: vue, macros, syntax-sugar, script-setup, unplugin, vite, webpack, rollup, esbuild, rspack, nuxt, sfc, typescript, nodejs

## Member repositories
- vue-macros/vue-macros (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:02.739309+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:03:07.395253+00:00, confidence not recorded.
  - readme: https://github.com/vue-macros/vue-macros (fetched 2026-08-28T04:06:02.739309+00:00, sha 331d9d5cebaf)
  - homepage: https://vue-macros.dev (fetched 2026-08-29T10:43:18.819358+00:00, sha 746e633341e1)
  - site_page: https://vue-macros.dev/guide/getting-started.html (fetched 2026-08-29T10:43:18.828321+00:00, sha ebc52cc9430d)
  - site_page: https://vue-macros.dev/features/hoist-static.html (fetched 2026-08-29T10:43:18.830237+00:00, sha 783ea9feb505)
  - registry_npm: https://registry.npmjs.org/vue-macros (fetched 2026-08-29T10:43:18.831847+00:00, sha e6ff53628d5b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
