OSS TanbouSign in with GitHub

Add compile-time macros and syntax sugar to Vue SFC authoring

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
1,984
Primary language
TypeScript
License
MIT
Repository last updated
Oct 5, 2026
On this page

Overview

Vue Macros 3.1.4 provides additional Vue macros and syntax sugar as compile-time transforms, integrating through unplugin with Vite, Webpack, Rspack, Rollup, esbuild, and related bundlers.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Transform define-style macros and SFC syntax extensions at build time

Vue Macros combines plugins for props, emits, models, slots, setup extensions, short syntax, and other authoring patterns into compile-time transforms.

Sources: [1][3]

Integrate with multiple bundlers through dedicated entry points

The package exports Vite, Webpack, Rspack, Rollup, Rolldown, and esbuild integrations built around unplugin.

Sources: [1][2]

Combine macro syntax with TypeScript and Volar support

The project advertises full TypeScript and Volar support and includes tooling for connecting macro-expanded syntax to editor type information.

Sources: [1]

Best fit

Fits Vue codebases that want shorter component patterns than standard syntax alone

It is useful when teams repeatedly express props, emits, models, or setup patterns and want concise compile-time syntax without a separate runtime abstraction.

Sources: [1]

Before adoption

Version 3.1.4 supports Vue 2.7/3 and requires Node 20.19+

vue-macros 3.1.4 declares Vue ^2.7.0 || ^3.2.25 as a peer dependency and Node >=20.19.0 as its engine requirement.

Sources: [2]

Version 3.1.4 fixes v-slot and Volar JSX directive dynamic-model behavior

The maintenance release adjusts v-slot handling around v-for and fixes dynamic model updates and modifier argument positioning in Volar/JSX directive tooling.

Sources: [4]

Official sources

  1. [1]Vue Macros v3.1.4 README(2026-10-05)
  2. [2]vue-macros 3.1.4 package metadata(2026-10-05)
  3. [3]Vue Macros combined plugin source(2026-10-05)
  4. [4]Vue Macros v3.1.4 release(2026-10-05)
  5. [5]Vue Macros MIT license(2026-10-05)
Supplemental curator note

Vue Macros 3.1.4 supports Vue ^2.7.0 or ^3.2.25 and requires Node >=20.19.0. Because macros are compile-time transforms, upgrades should also check whether Vue itself now provides equivalent syntax.

Try it in 3 steps

  1. 1

    Install pinned Vue Macros 3.1.4 with Vue 3.5.43

    Create an isolated npm project with the reviewed Vue Macros and Vue versions pinned.

    demo=$(mktemp -d "${TMPDIR:-/tmp}/vue-macros.XXXXXX") && cd "$demo" && npm init -y >/dev/null && npm install --save-dev --save-exact vue-macros@3.1.4 vue@3.5.43
  2. 2

    Verify package versions

    Require Vue Macros and Vue to resolve to the reviewed versions.

    test "$(node -e "const fs=require('fs');const v=p=>JSON.parse(fs.readFileSync(p)).version;console.log(v('node_modules/vue-macros/package.json')+'/'+v('node_modules/vue/package.json'))")" = '3.1.4/3.5.43'
  3. 3

    Check the Vite plugin entry

    Verify the build integration plugin factory can be imported without starting Vite.

    test "$(node --input-type=module -e "import VueMacros from 'vue-macros/vite';console.log(typeof VueMacros)")" = 'function'
Check the official README

Growth

Growth trends · Last 30 days

1,984 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
0
Open PRs
16

Development activity is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • vue
  • unplugin
  • rollup
  • vite
  • esbuild
  • sfc
  • script-setup
  • options
  • webpack
  • macros
  • vuejs
  • rsbuild
Stars
1,984
Forks
124
Watchers
8
Open issues
22
Contributors
43
Owner type
Organization
Primary language
TypeScript
License
MIT
Repository last updated
Oct 5, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?