From 09fc05c35c7d91215c83bf3d6044e1e8efa5a5c1 Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Wed, 21 Feb 2024 10:49:55 +0000 Subject: [PATCH] fix(nuxt): init generator should add @nx/vite to dependencies --- packages/nuxt/package.json | 3 ++- .../nuxt/src/generators/init/__snapshots__/init.spec.ts.snap | 1 + packages/nuxt/src/generators/init/lib/utils.ts | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 26fd7e43319e3..604a2e80e2312 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -33,7 +33,8 @@ "@nx/devkit": "file:../devkit", "@nx/js": "file:../js", "@nx/eslint": "file:../eslint", - "@nx/vue": "file:../vue" + "@nx/vue": "file:../vue", + "@nx/vite": "file:../vite" }, "peerDependencies": {}, "publishConfig": { diff --git a/packages/nuxt/src/generators/init/__snapshots__/init.spec.ts.snap b/packages/nuxt/src/generators/init/__snapshots__/init.spec.ts.snap index ee3ab39a5ce50..2ac955ac614e3 100644 --- a/packages/nuxt/src/generators/init/__snapshots__/init.spec.ts.snap +++ b/packages/nuxt/src/generators/init/__snapshots__/init.spec.ts.snap @@ -5,6 +5,7 @@ exports[`init should install required dependencies 1`] = ` "dependencies": {}, "devDependencies": { "@nx/nuxt": "0.0.1", + "@nx/vite": "0.0.1", "nuxt": "^3.10.0", }, "name": "@proj/source", diff --git a/packages/nuxt/src/generators/init/lib/utils.ts b/packages/nuxt/src/generators/init/lib/utils.ts index ce29a238555ad..0fc9ab9514a4f 100644 --- a/packages/nuxt/src/generators/init/lib/utils.ts +++ b/packages/nuxt/src/generators/init/lib/utils.ts @@ -14,6 +14,7 @@ export function updateDependencies(host: Tree, schema: InitSchema) { { '@nx/nuxt': nxVersion, nuxt: nuxtVersion, + '@nx/vite': nxVersion, }, undefined, schema.keepExistingVersions