Skip to content

perf(core): make AliasSortingPlugin opt-in - #494

Merged
harlan-zw merged 5 commits into
mainfrom
perf/opt-in-alias-sorting
Feb 14, 2025
Merged

harlan-zw merged 5 commits into
mainfrom
perf/opt-in-alias-sorting

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Feb 13, 2025 •

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This change drops the template param plugin from being part of the core Unhead.

While the feature is useful in some cases, it's not useful for everyone and is contributing ~6% of the server build. It is also contributing about 7% of the time for the ssr-harlanzw-no-schema-e2e benchmark.

For these reasons, users will need to opt in if they'd like to use it.

import { AliasSortingPlugin } from 'unhead/plugins'

createHead({
  plugins: [AliasSortingPlugin]
})

@harlan-zw harlan-zw changed the title perf(core): make TemplateParamsPlugin opt-in perf(core): make AliasSortingPlugin opt-in Feb 13, 2025
@github-actions

github-actions Bot commented Feb 13, 2025 •

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

File Size Gzipped Size Size Diff Gzipped Size Diff
Client 10.5 kB (10742 B) 4.4 kB (4468 B) -4.79% (-540 B) -3.25% ( -150 B)
Server 7.8 kB (8033 B) 3.3 kB (3369 B) -6.28% (-538 B) -4.43% ( -156 B)

@harlan-zw harlan-zw mentioned this pull request Feb 14, 2025
53 of 54 tasks
@harlan-zw
harlan-zw merged commit 4d96ce1 into main Feb 14, 2025
@harlan-zw harlan-zw mentioned this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant