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

Design system example is not scalable when you have many components #7529

Closed
1 task done
lorcan-codes opened this issue Feb 27, 2024 · 1 comment · Fixed by #7580
Closed
1 task done

Design system example is not scalable when you have many components #7529

lorcan-codes opened this issue Feb 27, 2024 · 1 comment · Fixed by #7580
Assignees
Labels
area: examples Improvements or additions to examples linear owned-by: turborepo

Comments

@lorcan-codes
Copy link

lorcan-codes commented Feb 27, 2024

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/lorcan-codes/my-design-system

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

1.12.4

Describe the Bug

The fast refresh in docs storybook works fine when we have a few components. But it gets slower as we have more components. The system design example does not explain how we can overcome the issue.

Expected Behavior

We should not have slow refreshes even if we have many components in ui package

To Reproduce

  • Clone my repo:

    git clone https://github.com/lorcan-codes/my-design-system

  • pnpm i in project root

  • Run pnpm dev in root dir to start storybook

  • Make some changes in button component and it takes 5-10 seconds for changes to be visible

Additional context

No response

TURBO-2503

@lorcan-codes lorcan-codes added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels Feb 27, 2024
@lorcan-codes
Copy link
Author

I could not upload the video here for some reason. But you can watch my demo here: https://drive.google.com/file/d/1hRToHYVyyxviHsMoBqUtgqlalLl7tnHv/view?usp=drive_link

@anthonyshew anthonyshew self-assigned this Feb 29, 2024
@chris-olszewski chris-olszewski added area: examples Improvements or additions to examples and removed kind: bug Something isn't working labels Feb 29, 2024
@anthonyshew anthonyshew added linear: turbo Issues to sync to Linear for Turborepo team linear and removed needs: triage New issues get this label. Remove it after triage linear: turbo Issues to sync to Linear for Turborepo team labels Mar 2, 2024
@anthonyshew anthonyshew linked a pull request Mar 3, 2024 that will close this issue
anthonyshew added a commit that referenced this issue Mar 4, 2024
### Description

As @lorcan-codes pointed out in #7529, the `design-system` example could
quickly run into performance issues. This was because we were using a
barrel file.

I've swapped the `main` field `./packages/ui/package.json` for an
`exports` field that allows for creating individual entrypoints for the
package to remove this class of issue.

### Testing Instructions

I verified that `turbo build && cd apps/docs && pnpm preview-storybook`
runs correctly. Additionally, I made sure that `turbo dev` works and
that edits to both the `Button` component itself and the story for it
show hot-reloaded changes.

Happy to have someone else check me!


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

Successfully merging a pull request may close this issue.

3 participants