nx/docs/shared/packages/vue/vue-plugin.md
Jack Hsu 769974b45a
feat(vue): init, app, component and lib generators (#19130)
Co-authored-by: Katerina Skroumpelou <sk.katherine@gmail.com>
2023-09-13 15:05:10 -04:00

1.1 KiB

title description
Overview of the Nx Vue Plugin The Nx Plugin for Vue contains generators for managing Vue applications and libraries within an Nx workspace. This page also explains how to configure Vue on your Nx workspace.

The Nx plugin for Vue.

Setting up a new Nx workspace with Vue

You can create a new workspace that uses Vue with one of the following commands:

  • Generate a new monorepo with a Vue app set up with Vue
npx create-nx-workspace@latest --preset=vue

Add Vue to an existing workspace

There are a number of ways to use Vue in your existing workspace.

Install the @nx/vue plugin

{% tabs %} {% tab label="npm" %}

npm install -D @nx/vue

{% /tab %} {% tab label="yarn" %}

yarn add -D @nx/vue

{% /tab %} {% tab label="pnpm" %}

pnpm install -D @nx/vue

{% /tab %} {% /tabs %}

Generate a new project using Vue

To generate a Vue application, run the following:

nx g @nx/vue:app my-app

To generate a Vue library, run the following:

nx g @nx/vue:lib my-lib