Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Turborepo): package entry points customization #7903

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

linkb15
Copy link

@linkb15 linkb15 commented Apr 4, 2024

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.

@linkb15 linkb15 requested review from anthonyshew and a team as code owners April 4, 2024 12:27
@turbo-orchestrator turbo-orchestrator bot added area: docs Improvements or additions to documentation owned-by: turborepo labels Apr 4, 2024
Copy link

vercel bot commented Apr 4, 2024

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

Copy link

vercel bot commented Apr 4, 2024

@linkb15 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@linkb15 linkb15 changed the title Docs(turborepo): package entry points customization docs(Turborepo): package entry points customization Apr 4, 2024
@anthonyshew
Copy link
Contributor

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

@linkb15
Copy link
Author

linkb15 commented Apr 4, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Improvements or additions to documentation owned-by: turborepo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants