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

perf(core)!: make TemplateParamsPlugin opt-in #493

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

harlan-zw
Copy link
Collaborator

@harlan-zw harlan-zw commented Feb 13, 2025 β€’

πŸ”— 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 us contributing ~15% of the server build. It is also contributing about 20% 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 { TemplateParamsPlugin } from 'unhead/plugins'

createHead({
  plugins: [TemplateParamsPlugin]
})

Sorry, something went wrong.

Copy link
Contributor

Bundle Size Analysis

File Size Gzipped Size Size Diff Gzipped Size Diff
Client 11 kB (11282 B) 4.5 kB (4618 B) -12.09% (-1552 B) -10.45% ( -539 B)
Server 8.4 kB (8571 B) 3.4 kB (3525 B) -15.23% (-1540 B) -13.43% ( -547 B)

@harlan-zw harlan-zw changed the title perf(core): make TemplateParamsPlugin opt-in perf(core)!: make TemplateParamsPlugin opt-in Feb 14, 2025
@harlan-zw harlan-zw merged commit 85c19c8 into main Feb 14, 2025
3 checks passed
@harlan-zw harlan-zw mentioned this pull request Feb 14, 2025
54 tasks
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.

None yet

1 participant