docs(Turborepo): package entry points customization
Description
When we have so many functions inside the packages. Importing files from a package become too long.
i.e. we have a UI package where we import so many components. it can be more enhanced if it can be more customized.
Customizing package entry points information was really hard for me to find before - spent more than few days to get it around - I wish it can be shown as example somewhere - and TurboRepo documentation is teaching me how to use this internal package - hence it would be nice to have this additional reading as well.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| examples-kitchensink-blog | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 9, 2024 5:56pm |
6 Ignored Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| examples-basic-web | ⬜️ Ignored (Inspect) | Visit Preview | Apr 9, 2024 5:56pm | |
| examples-designsystem-docs | ⬜️ Ignored (Inspect) | Visit Preview | Apr 9, 2024 5:56pm | |
| examples-native-web | ⬜️ Ignored (Inspect) | Visit Preview | Apr 9, 2024 5:56pm | |
| examples-svelte-web | ⬜️ Ignored (Inspect) | Visit Preview | Apr 9, 2024 5:56pm | |
| examples-tailwind-web | ⬜️ Ignored (Inspect) | Visit Preview | Apr 9, 2024 5:56pm | |
| examples-vite-web | ⬜️ Ignored (Inspect) | Visit Preview | Apr 9, 2024 5:56pm |
@linkb15 is attempting to deploy a commit to the Vercel Team on Vercel.
A member of the Team first needs to authorize it.
Can you explain how this is different from the section above on the same page? https://turbo.build/repo/docs/handbook/sharing-code/internal-packages#4-fix-exports
@anthonyshew this information is to customize the subpath of the internal package.
// it will make the import in the different subpath
import { Dialog, DialogContent, DialogTrigger } from "@repo/ui/dialog";
import { Button } from "@repo/ui/button";
// instead of this
import { Button, Dialog, DialogContent, DialogTrigger } from "@repo/ui";
This is to customize how we can export it differently.
I believe this will help some clarification on how we can do it, and customize it further.
We've done a major docs update since this PR! Check them out!