Skip to content

Commit 00924e9

Browse files
committed
test(compiler-sfc): cover #/ subpath imports
Node.js 25.4 added support for paths starting with `#/`
1 parent 53b6226 commit 00924e9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/compiler-sfc/__tests__/templateTransformAssetUrl.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,12 @@ describe('compiler sfc: transform asset url', () => {
116116

117117
// #9919
118118
test('should transform subpath import paths', () => {
119-
const { code } = compileWithAssetUrls(`<img src="#src/assets/vue.svg" />`)
119+
const { code } = compileWithAssetUrls(
120+
`<img src="#src/assets/vue.svg" />` +
121+
`<img src="#/src/assets/vue.svg" />`,
122+
)
120123
expect(code).toContain(`_imports_0 from '#src/assets/vue.svg'`)
124+
expect(code).toContain(`_imports_1 from '#/src/assets/vue.svg'`)
121125
})
122126

123127
test('should allow for full base URLs, with paths', () => {

0 commit comments

Comments
 (0)