Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
Co-authored-by: 翠 / green <green@sapphi.red>
  • Loading branch information
patak-dev and sapphi-red committed Aug 23, 2022
1 parent 29d1e58 commit 21e18cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/vite/src/node/plugins/html.ts
Expand Up @@ -184,8 +184,10 @@ export function getScriptInfo(node: DefaultTreeAdapterMap['element']): {
let isAsync = false
for (const p of node.attrs) {
if (p.name === 'src') {
src = p
sourceCodeLocation = node.sourceCodeLocation?.attrs!['src']
if (!src) {
src = p
sourceCodeLocation = node.sourceCodeLocation?.attrs!['src']
}
} else if (p.name === 'type' && p.value && p.value === 'module') {
isModule = true
} else if (p.name === 'async') {
Expand Down

0 comments on commit 21e18cc

Please sign in to comment.