perf(compiler-sfc): skip srcset transform if all candidates are external

This commit is contained in:
Evan You
2021-03-29 18:56:24 -04:00
parent 33ba0e3229
commit b39208cf06
2 changed files with 18 additions and 14 deletions

View File

@@ -139,9 +139,7 @@ const _hoisted_5 = _imports_0 + ' 2x, ' + _imports_0
const _hoisted_6 = _imports_0 + ' 2x, ' + _imports_0 + ' 3x'
const _hoisted_7 = _imports_0 + ', ' + _imports_0 + ' 2x, ' + _imports_0 + ' 3x'
const _hoisted_8 = _imports_1 + ', ' + _imports_1 + ' 2x'
const _hoisted_9 = \\"https://example.com/logo.png\\" + ', ' + \\"https://example.com/logo.png\\" + ' 2x'
const _hoisted_10 = _imports_1 + ', ' + _imports_0 + ' 2x'
const _hoisted_11 = \\"data:image/png;base64,i\\" + ' 1x, ' + \\"data:image/png;base64,i\\" + ' 2x'
const _hoisted_9 = _imports_1 + ', ' + _imports_0 + ' 2x'
export function render(_ctx, _cache) {
return (_openBlock(), _createBlock(_Fragment, null, [
@@ -183,15 +181,15 @@ export function render(_ctx, _cache) {
}),
_createVNode(\\"img\\", {
src: \\"https://example.com/logo.png\\",
srcset: _hoisted_9
srcset: \\"https://example.com/logo.png, https://example.com/logo.png 2x\\"
}),
_createVNode(\\"img\\", {
src: \\"/logo.png\\",
srcset: _hoisted_10
srcset: _hoisted_9
}),
_createVNode(\\"img\\", {
src: \\"data:image/png;base64,i\\",
srcset: _hoisted_11
srcset: \\"data:image/png;base64,i 1x, data:image/png;base64,i 2x\\"
})
], 64 /* STABLE_FRAGMENT */))
}"