fix(compiler-sfc): fix skipped srcset transform when using base option
Based on implementation from #4835 due to conflicts fix #4819 close #4834, close #4835
This commit is contained in:
@@ -86,4 +86,16 @@ describe('compiler sfc: transform srcset', () => {
|
||||
expect(code).toMatch(`_createStaticVNode`)
|
||||
expect(code).toMatchSnapshot()
|
||||
})
|
||||
|
||||
test('srcset w/ explicit base option', () => {
|
||||
const code = compileWithSrcset(
|
||||
`
|
||||
<img srcset="@/logo.png, @/logo.png 2x"/>
|
||||
<img srcset="@/logo.png 1x, ./logo.png 2x"/>
|
||||
`,
|
||||
{ base: '/foo/' },
|
||||
{ hoistStatic: true }
|
||||
).code
|
||||
expect(code).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user