Skip to content

nativewind-utils imported multiple times when using CLI #3231

@katsele

Description

@katsele

When I use the CLI command to import a component

npx gluestack-ui add {component}

After the component has been added to my project, I see that @gluestack-ui/utils/nativewind-utils is referenced multiple times in the filess. For example with the <Avatar/> or the <Badge/>

// Avatar
import { tva } from '@gluestack-ui/utils/nativewind-utils';
import {
  withStyleContext,
  useStyleContext,
} from '@gluestack-ui/utils/nativewind-utils';
const SCOPE = 'AVATAR';
import type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';

or

// Badge
import { tva } from '@gluestack-ui/utils/nativewind-utils';
import {
  withStyleContext,
  useStyleContext,
} from '@gluestack-ui/utils/nativewind-utils';

I'm using the V3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions