fix(ssr): should not hoist transformed asset urls in ssr compile

fix #3874
This commit is contained in:
Evan You
2022-05-11 12:43:44 +08:00
parent fec12d7dcc
commit 57bb37bd64
8 changed files with 277 additions and 154 deletions

View File

@@ -54,9 +54,12 @@ describe('compiler sfc: transform asset url', () => {
test('support uri fragment', () => {
const result = compileWithAssetUrls(
'<use href="~@svg/file.svg#fragment"></use>' +
'<use href="~@svg/file.svg#fragment"></use>'
'<use href="~@svg/file.svg#fragment"></use>',
{},
{
hoistStatic: true
}
)
expect(result.code).toMatchSnapshot()
})