Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@dcloudio/vite-plugin-uni 的 bug #5247

Open
norangit opened this issue Dec 10, 2024 · 0 comments
Open

@dcloudio/vite-plugin-uni 的 bug #5247

norangit opened this issue Dec 10, 2024 · 0 comments

Comments

@norangit
Copy link

@dcloudio/vite-plugin-uni 中用到了 @vitejs/plugin-vue,在@dcloudio/vite-plugin-uni@3.0.0-alpha-4040120241209001 版本中(可能之前一直有问题)。

仓库文件 里的 154 行,这个判断逻辑有问题,参考 vite 插件官方文档 的配置 template.transformAssetUrls 的值是一个对象,格式如下:

{
  video: ['src', 'poster'],
  source: ['src'],
  img: ['src'],
  image: ['xlink:href', 'href'],
  use: ['xlink:href', 'href']
}

而我看代码里实际是读取 template.transformAssetUrls.tags 的,如果用户按照 vite 官网的配置,那就永远也不会生效,这也是我花了1天时间才决定看看uni app的代码原因,希望能更正过来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant