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

fix: 修复 使用了三方插件时,用 HBuilderX 发行打包 easycom 不生效的问题 #4911

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

Xiphin
Copy link

@Xiphin Xiphin commented May 18, 2024

开发微信小程序的时候,在项目下的 vite.config 里使用了 @dcloudio/vite-plugin-uni 插件时,开发运行没有问题,但是发行打包时 easycom 会不生效,easycom 里的组件不会打包到项目里,原因分析如下:

initEasycom 是在项目下的 vite.config 运行的

而 HBuilderX下的 @dcloudio/vite-plugin-uni 读取不到它的值

所以此时 hasEasycom 还是 false,直接返回了:

导致 source 没有值,未定义:

const source = matchEasycom(tag)

@Xiphin
Copy link
Author

Xiphin commented May 18, 2024

关联的 Issues #4895

@Xiphin
Copy link
Author

Xiphin commented May 18, 2024

@fxy060608 request review

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

Successfully merging this pull request may close these issues.

1 participant