fix(compiler-sfc): properly reuse hoisted asset imports

fix #4581
This commit is contained in:
Evan You
2021-09-16 13:33:02 -04:00
parent fc968d607b
commit 06c5bf53ab
3 changed files with 41 additions and 24 deletions

View File

@@ -41,7 +41,8 @@ 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>'
)
expect(result.code).toMatchSnapshot()