<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/may-2026---package-imports-and-target-aliases-tkmmybstv" -->

---
title: May 2026 - Package Imports and Target Aliases | daily.dev
description: shadcn CLI version 4.7.0 adds support for package.json#imports, allowing developers to use private '#...' import aliases instead of relying solely on...
canonical: https://daily.dev/posts/may-2026---package-imports-and-target-aliases-tkmmybstv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: May 2026 - Package Imports and Target Aliases | daily.dev
og:description: shadcn CLI version 4.7.0 adds support for package.json#imports, allowing developers to use private '#...' import aliases instead of relying solely on...
og:url: https://daily.dev/posts/may-2026---package-imports-and-target-aliases-tkmmybstv
og:image: https://api.daily.dev/og/posts/tkMmYbStV.png
og:image:alt: May 2026 - Package Imports and Target Aliases
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# May 2026 - Package Imports and Target Aliases

**[The Foundation for your Design System - shadcn/ui](https://daily.dev/sources/shadcn-ui)** · 2 min read · 0 upvotes · 0 comments

## Summary

shadcn CLI version 4.7.0 adds support for package.json#imports, allowing developers to use private '#...' import aliases instead of relying solely on tsconfig.json's compilerOptions.paths, with support for monorepo setups where app-local files use package imports and shared UI comes from workspace exports. Additionally, registry items can now use target aliases in files[].target to install files under a user's configured shadcn directories, such as installing a component under a custom ui/ai path.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://ui.shadcn.com/docs/changelog/2026-05-package-imports-target-aliases>

## Questions this post answers

### How do I use package.json imports instead of tsconfig paths with the shadcn CLI?

As of shadcn 4.7.0, the CLI supports package.json's imports field for installing components, rewriting imports, and resolving third-party registries. You can define private '#...' import aliases in package.json and reference the same roots in components.json, instead of relying only on tsconfig.json's compilerOptions.paths. This also works in monorepos where app-local files use package imports and shared UI files come from workspace package exports.

_daily.dev surfaces framework updates like this for developers configuring monorepo import setups._

### What are target aliases in shadcn registry files.target?

Target aliases let a registry item's files[].target field install files under a user's configured shadcn directories rather than a fixed path. For example, a registry item can specify a target alias so that a file like prompt-input.tsx is installed under the ui/ai directory automatically, based on the consumer's own directory configuration. This feature shipped in shadcn 4.7.0.

_Developers building portable shadcn registries can track CLI changes like this through daily.dev._

## Similar posts on daily.dev

- [September 2026 - cn](https://daily.dev/posts/september-2026---cn-tuim9h3eu) · The Foundation for your Design System - shadcn/ui · 26 upvotes · 2 comments
- [shadcn spooky szn](https://daily.dev/posts/shadcn-spooky-szn-okmlrbq9x) · Bytes by ui.dev · 2 upvotes · 0 comments
- [I tried Shadcn CLI 3.0 — here’s what I learned](https://daily.dev/posts/i-tried-shadcn-cli-3-0-here-s-what-i-learned-ktnfpprm4) · LogRocket · 7 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#react](https://daily.dev/tags/react), [#cli](https://daily.dev/tags/cli), [#shadcn](https://daily.dev/tags/shadcn)

[View this post on daily.dev](https://daily.dev/posts/may-2026---package-imports-and-target-aliases-tkmmybstv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"May 2026 - Package Imports and Target Aliases","url":"https://daily.dev/posts/may-2026---package-imports-and-target-aliases-tkmmybstv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/may-2026---package-imports-and-target-aliases-tkmmybstv"},"datePublished":"2026-08-23T12:18:31.446Z","dateModified":"2026-08-23T12:33:23.640Z","description":"shadcn CLI version 4.7.0 adds support for package.json#imports, allowing developers to use private '#...' import aliases instead of relying solely on...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1135168463d76928bf287cf0b47b8a78?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1135168463d76928bf287cf0b47b8a78?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"The Foundation for your Design System - shadcn/ui","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Foundation for your Design System - shadcn/ui","logo":"https://media.daily.dev/image/upload/s--GiOq6F7Y--/f_auto,q_auto/v1787487441/logos/shadcn-ui?_a=BAMAMicg0","url":"https://daily.dev/sources/shadcn-ui"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/may-2026---package-imports-and-target-aliases-tkmmybstv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,react,cli,shadcn","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Foundation for your Design System - shadcn/ui","item":"https://daily.dev/sources/shadcn-ui"},{"@type":"ListItem","position":3,"name":"May 2026 - Package Imports and Target Aliases"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/may-2026---package-imports-and-target-aliases-tkmmybstv#faq","mainEntity":[{"@type":"Question","name":"How do I use package.json imports instead of tsconfig paths with the shadcn CLI?","acceptedAnswer":{"@type":"Answer","text":"As of shadcn 4.7.0, the CLI supports package.json's imports field for installing components, rewriting imports, and resolving third-party registries. You can define private '#...' import aliases in package.json and reference the same roots in components.json, instead of relying only on tsconfig.json's compilerOptions.paths. This also works in monorepos where app-local files use package imports and shared UI files come from workspace package exports. daily.dev surfaces framework updates like this for developers configuring monorepo import setups."}},{"@type":"Question","name":"What are target aliases in shadcn registry files.target?","acceptedAnswer":{"@type":"Answer","text":"Target aliases let a registry item's files[].target field install files under a user's configured shadcn directories rather than a fixed path. For example, a registry item can specify a target alias so that a file like prompt-input.tsx is installed under the ui/ai directory automatically, based on the consumer's own directory configuration. This feature shipped in shadcn 4.7.0. Developers building portable shadcn registries can track CLI changes like this through daily.dev."}}]}
```

