Skip to content

Commit

Permalink
feat(client): add data-vite-dev-id attribute to style elements (#10080)
Browse files Browse the repository at this point in the history
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
  • Loading branch information
ArnaudBarre and bluwy committed Sep 23, 2022
1 parent 01235e2 commit ea09fde
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/vite/src/client/client.ts
Expand Up @@ -364,6 +364,7 @@ export function updateStyle(id: string, content: string): void {
if (!style) {
style = document.createElement('style')
style.setAttribute('type', 'text/css')
style.setAttribute('data-vite-dev-id', id)
style.innerHTML = content
document.head.appendChild(style)
} else {
Expand Down

0 comments on commit ea09fde

Please sign in to comment.