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: add a way to include tag attributes without values on plugins #1381

Merged
merged 1 commit into from Jan 5, 2021

Conversation

stafyniaksacha
Copy link
Contributor

Change HtmlTagDescriptor to allow attribute's values to be boolean

so this

{
  tag: 'link',
  attrs: {
    rel: 'preconnect',
    href: 'https://fonts.gstatic.com/',
    crossorigin: true,
  }
}

note: setting value to false will skip the attribute

html:

<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />

@yyx990803 yyx990803 merged commit 0fad96e into vitejs:main Jan 5, 2021
@stafyniaksacha stafyniaksacha deleted the fix-serialize-attrs branch January 5, 2021 22:22
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

2 participants