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

Only add framework component formats to Vite’s optimizeDeps #11472

Merged
merged 5 commits into from
Jul 17, 2024

Conversation

delucis
Copy link
Member

@delucis delucis commented Jul 16, 2024

Changes

  • Astro currently tells Vite to scan most of src/ (excluding endpoints in src/pages/)
  • This PR makes that scan much more targeted at only known framework component formats
  • The thinking is that the target for that scan is to optimize client-side code and this will catch most of it
  • It avoids eagerly transforming code that is not intended for the client, which can include:
    • server utilities
    • documentation snippets only imported with ?raw

Testing

Tests should pass I think — would love feedback from @bluwy

Docs

n/a — internal change

Copy link

changeset-bot bot commented Jul 16, 2024

🦋 Changeset detected

Latest commit: 6402215

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

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jul 16, 2024
@bluwy bluwy merged commit cb4e6d0 into main Jul 17, 2024
13 checks passed
@bluwy bluwy deleted the chris/optimize-less branch July 17, 2024 07:35
@astrobot-houston astrobot-houston mentioned this pull request Jul 17, 2024
ematipico pushed a commit that referenced this pull request Jul 18, 2024
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants