Skip to content

Commit

Permalink
docs(vue): add transformAssetUrls example (#7232)
Browse files Browse the repository at this point in the history
Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
  • Loading branch information
bluwy and sodatea committed Mar 9, 2022
1 parent ea04abe commit d4786d1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/plugin-vue/README.md
Expand Up @@ -51,7 +51,7 @@ export interface Options {
}
```

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

```ts
import vue from '@vitejs/plugin-vue'
Expand All @@ -62,6 +62,16 @@ export default {
template: {
compilerOptions: {
// ...
},
transformAssetUrls: {
// default tags
tags: {
video: ['src', 'poster'],
source: ['src'],
img: ['src'],
image: ['xlink:href', 'href'],
use: ['xlink:href', 'href']
}
}
}
})
Expand Down

0 comments on commit d4786d1

Please sign in to comment.