Skip to content

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

Merged
harlan-zw merged 2 commits into
mainfrom
perf/opt-in-template-params
Feb 14, 2025
Merged

harlan-zw merged 2 commits into
mainfrom
perf/opt-in-template-params

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 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]
})

@github-actions

Copy link
Copy Markdown
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
@harlan-zw harlan-zw mentioned this pull request Feb 14, 2025
53 of 54 tasks
@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