From d4786d1833d4ff677f0acf21a59f78d0383cdd26 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Wed, 9 Mar 2022 16:07:10 +0800 Subject: [PATCH] docs(vue): add transformAssetUrls example (#7232) Co-authored-by: Haoqun Jiang --- packages/plugin-vue/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/plugin-vue/README.md b/packages/plugin-vue/README.md index 81ed00e7..a232982e 100644 --- a/packages/plugin-vue/README.md +++ b/packages/plugin-vue/README.md @@ -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' @@ -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'] + } } } })