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

Fix Starlight component imports with EC disabled #1626

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

hippotastic
Copy link
Contributor

Description

  • Fixes Fail to build with Expressive Code disabled #1624 by providing shims for the failing virtual imports when using the config setting expressiveCode: false.
  • This is only necessary because tree shaking is currently not supported for barrel files in Astro projects. Once this is fixed upstream, the Code component exported from @astrojs/starlight/components should no longer be included in the bundle when it's unused, and the shims should not be required anymore.

Copy link

changeset-bot bot commented Mar 19, 2024

🦋 Changeset detected

Latest commit: 9209725

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Mar 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Mar 19, 2024 8:05pm

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix @hippotastic! LGTM!

@delucis delucis added the 🌟 patch Change that triggers a patch release label Mar 19, 2024
@delucis delucis merged commit 67459cb into withastro:main Mar 19, 2024
9 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Mar 19, 2024
@hippotastic hippotastic deleted the fix-ec-barrel-file-bundling-issue branch March 19, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 🌟 patch Change that triggers a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail to build with Expressive Code disabled
2 participants