fix(compiler-sfc): should not transform external asset url with
includeAbsolute: true
This commit is contained in:
@@ -59,7 +59,8 @@ import _imports_1 from '/bar.png'
|
||||
export function render(_ctx, _cache) {
|
||||
return (_openBlock(), _createBlock(_Fragment, null, [
|
||||
_createVNode(\\"img\\", { src: _imports_0 }),
|
||||
_createVNode(\\"img\\", { src: _imports_1 })
|
||||
_createVNode(\\"img\\", { src: _imports_1 }),
|
||||
_createVNode(\\"img\\", { src: \\"https://foo.bar/baz.png\\" })
|
||||
], 64 /* STABLE_FRAGMENT */))
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -70,7 +70,9 @@ describe('compiler sfc: transform asset url', () => {
|
||||
|
||||
test('with includeAbsolute: true', () => {
|
||||
const { code } = compileWithAssetUrls(
|
||||
`<img src="./bar.png"></img>` + `<img src="/bar.png"></img>`,
|
||||
`<img src="./bar.png"/>` +
|
||||
`<img src="/bar.png"/>` +
|
||||
`<img src="https://foo.bar/baz.png"/>`,
|
||||
{
|
||||
includeAbsolute: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user