提交 6b5d95ef 编写于 作者: 辛宝Otto's avatar 辛宝Otto 🥊

fix(vite-plugin-uni): 正确保留用户传递的配置

上级 37e04eb8
......@@ -136,11 +136,12 @@ export function initPluginVueOptions(
createUniVueTransformAssetUrls(
isExternalUrl(options.base) ? options.base : ''
)
templateOptions.transformAssetUrls = builtInTransformAssetUrls
// 用户传递配置 eg: transformAssetUrls.tags = {'my-image': ['src']}
// docs: https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue
const userOptionsTransformAssetUrls = templateOptions.transformAssetUrls
templateOptions.transformAssetUrls = builtInTransformAssetUrls
if (
typeof userOptionsTransformAssetUrls !== 'boolean' &&
!!userOptionsTransformAssetUrls?.tags &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册