Skip to content

Commit d4786d1

Browse files
bluwyhaoqunjiang
andauthored
docs(vue): add transformAssetUrls example (#7232)
Co-authored-by: Haoqun Jiang <[email protected]>
1 parent ea04abe commit d4786d1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/plugin-vue/README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface Options {
5151
}
5252
```
5353

54-
## Example for passing options to `@vue/compiler-dom`:
54+
## Example for passing options to `vue/compiler-sfc`:
5555

5656
```ts
5757
import vue from '@vitejs/plugin-vue'
@@ -62,6 +62,16 @@ export default {
6262
template: {
6363
compilerOptions: {
6464
// ...
65+
},
66+
transformAssetUrls: {
67+
// default tags
68+
tags: {
69+
video: ['src', 'poster'],
70+
source: ['src'],
71+
img: ['src'],
72+
image: ['xlink:href', 'href'],
73+
use: ['xlink:href', 'href']
74+
}
6575
}
6676
}
6777
})

0 commit comments

Comments
 (0)