Skip to content

Getting Started

Vue Macros is a library that implements proposals or ideas that have not been officially implemented by Vue. That means it will explore and extend more features and syntax sugar to Vue.

We assume you are already familiar with the basic usages of Vue before you continue.

Requirements

  • Node.js 16.14.0 or higher.
  • Vue >= 2.7 or Vue >= 3.0.
    • Some features need Vue >= 3.2.25.
  • VSCode installed the Vue Language Features (Volar) latest extension.
    • ❌ WebStorm is not supported.

Creating a Vue Macros Project

Installation

bash
npm i -g @vue-macros/cli
bash
yarn global add @vue-macros/cli
bash
pnpm add -g @vue-macros/cli

This command will install @vue-macros/cli, the official Vue Macros scaffolding tool.

Initialization

bash
npm create vite@latest my-vue-macros -- --template vue-ts
cd my-vue-macros
vue-macros init
bash
yarn create vite my-vue-macros --template vue-ts
cd my-vue-macros
vue-macros init
bash
pnpm create vite my-vue-macros --template vue-ts
cd my-vue-macros
vue-macros init

You will be presented with prompts for several optional experimental features.

Demos

🌟 More demos are welcome!

Nuxt Integration

If you're using Nuxt 3, read the Nuxt Integration.

Bundler Integrations

If you're using Vite, Rollup, esbuild, or Webpack, read the Bundler Integration.

Contributors

The avatar of contributor named as renovate[bot] renovate[bot]
The avatar of contributor named as gaokefei gaokefei

Changelog