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

fix(build): link href used data url #516

Merged
merged 2 commits into from
Jul 16, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(build): link href used data url
fix #508
  • Loading branch information
underfin committed Jul 5, 2020
commit 6728bfec3681aa5e8cc21913d6062175fb2b4ae6
5 changes: 3 additions & 2 deletions src/node/build/buildPluginHtml.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Plugin, RollupOutput, OutputChunk } from 'rollup'
import path from 'path'
import fs from 'fs-extra'
import { isExternalUrl, cleanUrl } from '../utils/pathUtils'
import { isExternalUrl, cleanUrl, isDataUrl } from '../utils/pathUtils'
import { resolveAsset, registerAssets } from './buildPluginAsset'
import {
parse as Parse,
Expand Down Expand Up @@ -189,7 +189,8 @@ const compileHtml = async (
p.type === NodeTypes.ATTRIBUTE &&
p.value &&
assetAttrs.includes(p.name) &&
!isExternalUrl(p.value.content)
!isExternalUrl(p.value.content) &&
!isDataUrl(p.value.content)
) {
assetUrls.push(p)
}
Expand Down