Skip to content

Getting Started

Vue Macros is a library that implements unofficial proposals and ideas for Vue, exploring and extending its features and syntax.

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

Requirements

  • Node.js >= 16.14.0.
  • Vue >= 2.7 or Vue >= 3.0.
    • Some features need Vue >= 3.2.25.
  • Install the latest Vue - Official extension for VSCode.

WARNING

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.

Templates

🌟 More templates are welcome!

Nuxt Integration

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

Bundler Integrations

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

Contributors

The avatar of contributor named as zhiyuanzmj zhiyuanzmj
The avatar of contributor named as Kevin Deng Kevin Deng
The avatar of contributor named as gaokefei gaokefei

Changelog