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

【Bug 公告】关于 2.x 版本使用 taro-ui 编译打包后报错的问题修复 #8010

Closed
luckyadam opened this issue Nov 9, 2020 · 2 comments

Comments

@luckyadam
Copy link
Member

各位 Taro 同仁,非常抱歉,我们在 2.2 以上版本中引入了一个严重的问题,即在 2.2 以上版本中使用 taro-ui 编译打包后报错,而导致页面无法出现。

问题的具体原因是,production 模式下 taro-ui 组件代码被当成副作用移除了, 可以加上 webpack 的 sideEffect 配置来解决

image

webpackChain (chain) {
  chain.optimization.sideEffects(false)
}

由于这个问题给大家带来巨大的困扰,我们深表歉意,后续我们将更加细致确保版本功能的稳定,同时更加积极地跟进社区反馈问题的修复。

相关 issue:
#7913 (comment)

@sun0207
Copy link

sun0207 commented Feb 26, 2021

棒棒哒

@chaoyangrex
Copy link

#8976
该 issue 是我提出的,下面版本下 build 也会出现组件找不到的情况,按照上面配置修改,还是会出现同样的问题,希望大佬解决下 @luckyadam
taro 1.3.0-beta.4
taro-ui": "^1.5.4"

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

No branches or pull requests

4 participants