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
>= v20.19.0. - Vue
>= v2.7or Vue>= v3.0.- Some features need Vue
>= v3.2.25.
- Some features need Vue
- VSCode extension Vue - Official and
vue-tscarev3.0.8- Vue Macros will continue to adapt to the latest version as soon as possible, older versions may not be supported.
WARNING
WebStorm is not supported.
Creating a Vue Macros Project
Installation
bash
npm i -g @vue-macros/clibash
yarn global add @vue-macros/clibash
pnpm add -g @vue-macros/cliThis 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 initbash
yarn create vite my-vue-macros --template vue-ts
cd my-vue-macros
vue-macros initbash
pnpm create vite my-vue-macros --template vue-ts
cd my-vue-macros
vue-macros initYou will be presented with prompts for several optional experimental features.
Templates
🌟 More templates are welcome!
Nuxt Integration
If you're using Nuxt, read the Nuxt Integration.
Bundler Integrations
If you're using Vite, Rollup, esbuild, Webpack, or Rspack, read the Bundler Integration.
Kevin Deng
zhiyuanzmj
alexzhang1030