nx/packages/react/src/utils/has-rsbuild-plugin.ts
Colum Ferry 2db82dd36d
feat(rsbuild): move plugin export to root of package (#29415)
## Current Behavior
The Rsbuild plugin is exported at `@nx/rsbuild/plugin`


## Expected Behavior
Export the plugin from `@nx/rsbuild` i.e. the root of the package.
2024-12-19 14:09:57 +00:00

9 lines
330 B
TypeScript

import { ensurePackage, Tree } from '@nx/devkit';
import { nxVersion } from './versions';
export async function hasRsbuildPlugin(tree: Tree, projectPath?: string) {
ensurePackage('@nx/rsbuild', nxVersion);
const { hasRsbuildPlugin } = await import('@nx/rsbuild/config-utils');
return hasRsbuildPlugin(tree, projectPath);
}