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

JavaScript not being bundled in production build for components #8018

Closed
1 task
lorenzolewis opened this issue Aug 10, 2023 · 2 comments
Closed
1 task

JavaScript not being bundled in production build for components #8018

lorenzolewis opened this issue Aug 10, 2023 · 2 comments
Labels
needs triage Issue needs to be triaged

Comments

@lorenzolewis
Copy link
Contributor

What version of astro are you using?

2.10.4

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Mac

What browser are you using?

Safari

Describe the Bug

Reproduction Steps

  1. Setup an .mdx file in Starlight
  2. Use <Tabs> and <TabItem> components within that file
  3. Create a new custom component and import that within the aforementioned .mdx file
  4. Run pnpm build && pnpm preview (I'll come back to why not to use pnpm dev in a bit)
  5. Notice that the tabs are clickable and work as expected
  6. Within that newly created custom component import Starlight's <Icon> component (essentially using this custom component as a wrapper). (Note: there doesn't seem to be any special issues with the <Icon> component from what I can tell, this is able to be reproduced with other imported components as well)
  7. Now run pnpm build && pnpm preview again. You will notice those tab items are no longer clickable.

Notes

Files to pay attention to the repro

What's the expected result?

The <Tab> components and their respective JS should be included in the production build

Link to Minimal Reproducible Example

https://github.com/lorenzolewis/starlight-component-bug

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Aug 10, 2023
@lorenzolewis
Copy link
Contributor Author

This is potentially also related to #8011, #7744, #7857

@lorenzolewis
Copy link
Contributor Author

Fixed by 2.10.5 that just came out. Thanks for being amazing! <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant