fix(compiler-sfc): transformAssetUrl should ignore inline data url (#1431)
This commit is contained in:
@@ -7,7 +7,12 @@ import {
|
||||
SourceLocation,
|
||||
TransformContext
|
||||
} from '@vue/compiler-core'
|
||||
import { isRelativeUrl, parseUrl, isExternalUrl } from './templateUtils'
|
||||
import {
|
||||
isRelativeUrl,
|
||||
parseUrl,
|
||||
isExternalUrl,
|
||||
isDataUrl
|
||||
} from './templateUtils'
|
||||
import { isArray } from '@vue/shared'
|
||||
|
||||
export interface AssetURLTagConfig {
|
||||
@@ -99,6 +104,7 @@ export const transformAssetUrl: NodeTransform = (
|
||||
!assetAttrs.includes(attr.name) ||
|
||||
!attr.value ||
|
||||
isExternalUrl(attr.value.content) ||
|
||||
isDataUrl(attr.value.content) ||
|
||||
attr.value.content[0] === '#' ||
|
||||
(!options.includeAbsolute && !isRelativeUrl(attr.value.content))
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user