Skip to content

aliases.components isn't respected in components.jsonΒ #293

@matchai

Description

@matchai

Heya Hayden πŸ‘‹

When running pnpx ai-elements@latest in an existing project with a non-default aliases.components key set in components.json, AI Elements won't respect the key, using incorrect import paths when resolving to Shadcn components it depends on.

It appears to consistently output import paths in the form of @workspace/components, correctly updating @workspace, but not the rest of the path.

This can be best reproduced using the Next Monorepo Shadcn template.

Steps to reproduce

  1. pnpm dlx shadcn@latest init
  2. Select "Next.js (Monorepo)"
  3. cd my-app/packages/ui
  4. pnpx ai-elements@latest
  5. View the incorrect import path used for Button in packages/ui/src/components/ai-elements/artifact.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions