import { readNxJson, Tree } from '@nx/devkit'; export function hasVitePlugin(tree: Tree) { const nxJson = readNxJson(tree); return !!nxJson.plugins?.some((p) => typeof p === 'string' ? p === '@nx/vite/plugin' : p.plugin === '@nx/vite/plugin' ); }