{"id":21629,"library":"nx-vue3-vite","title":"nx-vue3-vite","description":"An Nx plugin for generating opinionated Vue 3 + Vite + PostCSS applications and libraries, currently at v0.30.0. It provides generators for apps, libraries, components, Vitepress docs, and Cypress e2e tests, plus executors for dev server, build, lint, unit testing, and e2e. The plugin is updated regularly alongside Nx releases (v17, v18, v20 tested) and Vite (v2–v6). It integrates with @nx/devkit, @vitejs/plugin-vue, and optionally Cypress. Compared to raw Vite setup in Nx, it offers project-local path aliases (@app, @assets, @public), standardized generator options, and automatic configuration files.","status":"active","version":"0.30.0","language":"javascript","source_language":"en","source_url":"https://github.com/samatechtw/nx-vue3-vite","tags":["javascript","nx","vue3","vite","generator","typescript"],"install":[{"cmd":"npm install nx-vue3-vite","lang":"bash","label":"npm"},{"cmd":"yarn add nx-vue3-vite","lang":"bash","label":"yarn"},{"cmd":"pnpm add nx-vue3-vite","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, required for dev server and build","package":"vite","optional":false},{"reason":"peer dependency, used in vite.config.ts","package":"@vitejs/plugin-vue","optional":false},{"reason":"peer dependency, core Nx plugin framework","package":"@nx/devkit","optional":false},{"reason":"peer dependency for e2e test runner","package":"cypress","optional":true},{"reason":"peer dependency for Cypress+Vite integration","package":"@cypress/vite-dev-server","optional":true}],"imports":[{"note":"Main generator function for creating a Vue3+Vite application.","wrong":"import { appGenerator } from 'nx-vue3-vite/src/generators/app'","symbol":"appGenerator","correct":"import { appGenerator } from 'nx-vue3-vite'"},{"note":"ESM-only; CommonJS require() will not work (package is ESM).","wrong":"const componentGenerator = require('nx-vue3-vite').componentGenerator","symbol":"componentGenerator","correct":"import { componentGenerator } from 'nx-vue3-vite'"},{"note":"Generates a Vue3+Vite library.","symbol":"libraryGenerator","correct":"import { libraryGenerator } from 'nx-vue3-vite'"}],"quickstart":{"code":"npx create-nx-workspace@latest my-workspace --preset empty\ncd my-workspace\nnpm install nx-vue3-vite --save-dev\nnx g nx-vue3-vite:app my-app --title 'My App' --test vitest\nnx serve my-app","lang":"typescript","description":"Creates a new Nx workspace with empty preset, installs the plugin, generates a Vue3+Vite app named 'my-app' with Vitest, then serves it."},"warnings":[{"fix":"Upgrade to v0.23.9 or later.","message":"Cypress executor may fail to detect test failures in certain configurations.","severity":"breaking","affected_versions":">=0.23.7 <0.23.9"},{"fix":"Use --alias local to avoid depending on root tsconfig.","message":"Global path aliases via root tsconfig.base.json may be deprecated in future; local alias is the default.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Keep index.html in the root directory; do not move it to src/.","message":"The index.html file must remain in the project root; moving it breaks Vite's entry point detection.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Check Nx migration guide and update nx-vue3-vite to a version compatible with your Nx version.","message":"Breaking changes when upgrading Nx major versions (e.g., 17 to 18, 18 to 20).","severity":"breaking","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run npm install nx-vue3-vite --save-dev and ensure tsconfig.json includes 'node_modules' in typeRoots.","cause":"Package not installed or type declarations not generated.","error":"Cannot find module 'nx-vue3-vite' or its corresponding type declarations."},{"fix":"Upgrade your Nx workspace to v18 or newer.","cause":"Using an older Nx version incompatible with the plugin.","error":"Error: This generator requires Nx version >= 18.0.0"},{"fix":"Install the missing peer: npm install @cypress/vite-dev-server --save-dev","cause":"Missing peer dependency @cypress/vite-dev-server.","error":"Error: Cypress e2e tests fail with 'Module not found' for @cypress/vite-dev-server"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}