11 lines
270 B
TypeScript
11 lines
270 B
TypeScript
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'
|
|
);
|
|
}
|