Overview of the Nx Vue Plugin
The Nx plugin forVue.
Setting Up @nx/vue
Section titled “Setting Up @nx/vue”Generating a new Workspace
Section titled “Generating a new Workspace”To create a new workspace with Vue, runnpx create-nx-workspace@latest --preset=vue
.
Installation
Section titled “Installation”Make sure to install the@nx/vue
version that matches the version ofnx
in your repository. If the version numbers get out of sync, you can encounter some difficult to debug errors. You canfix Nx version mismatches with this recipe.
In any Nx workspace, you can install@nx/vue
by running the following command:
nxadd@nx/vue
This will install the correct version of@nx/vue
.
Using the @nx/vue Plugin
Section titled “Using the @nx/vue Plugin”Generate a new project using Vue
Section titled “Generate a new project using Vue”To generate a Vue application, run the following:
nxg@nx/vue:appapps/my-app
To generate a Vue library, run the following:
nxg@nx/vue:liblibs/my-lib