Open
Description
Describe the bug
Build hooks seem to only run on build. I'm not sure if this is intentional, but it's not documented anywhere and I assumed that they would also run in dev mode.
Specifically, I want to dynamically add stylesheets based on frontmatter parameters, so I am using transformHead
, but the link
tags are not being added.
Reproduction
This reproduction uses meta
tags instead of link
tags.
https://stackblitz.com/edit/vite-9gbr2k?file=docs%2F.vitepress%2Fconfig.ts
Expected behavior
robots
meta tag appears in dev mode
System Info
stackblitz
Additional context
No response
Validations
- Check if you're on the latest VitePress version.
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.