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

feat: allow tag injection after body open (body-prepend) #1435

Merged
merged 2 commits into from
Jan 9, 2021

Conversation

stafyniaksacha
Copy link
Contributor

Add injectTo: 'body-prepend' option to HtmlTagDescriptor to allow tag injection after body open

so this

{
  tag: 'noscript',
  injectTo: 'body-prepend',
  children: '<!-- no script content -->'
}

renders:

<body>
  <noscript><!-- no script content --></noscript>
  ....
</body>

@yyx990803
Copy link
Member

Can you add corresponding tests in playground/html? Add a transform in vite.config.js and a test case in __tests__/html.spec.ts.

@stafyniaksacha
Copy link
Contributor Author

Can you add corresponding tests in playground/html? Add a transform in vite.config.js and a test case in __tests__/html.spec.ts.

Sure!

@stafyniaksacha
Copy link
Contributor Author

tests added

@yyx990803 yyx990803 merged commit 432487e into vitejs:main Jan 9, 2021
@stafyniaksacha stafyniaksacha deleted the feat-inject-body-prepend branch January 10, 2021 10:47
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.

2 participants