Skip to content

Commit

Permalink
fix: dont match } if ${ doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Sep 26, 2023
1 parent 6b43ba7 commit 01cbea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/importAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
}
return
} else if (templateLiteralRE.test(rawUrl)) {
if (!rawUrl.includes('${') && !rawUrl.includes('}')) {
if (!(rawUrl.includes('${') && rawUrl.includes('}'))) {
specifier = rawUrl.replace(templateLiteralRE, '$1')
}
}
Expand Down

0 comments on commit 01cbea8

Please sign in to comment.