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

3.5.4 prebundle H5构建报错 #12385

Closed
Aliom252181 opened this issue Aug 26, 2022 · 2 comments · Fixed by #12491
Closed

3.5.4 prebundle H5构建报错 #12385

Aliom252181 opened this issue Aug 26, 2022 · 2 comments · Fixed by #12491
Assignees
Labels
A-runner Area - Webpack runner 相关 E-medium Helper Wanted - Medium F-react Framework - React P-1 High, patch T-h5 Target - 编译到 H5 V-3 Version - 3.x
Milestone

Comments

@Aliom252181
Copy link
Contributor

相关平台

H5

浏览器版本: chrome最新版
使用框架: React

复现步骤

从3.5.2升级到3.5.4

项目定义了跨端组件,里面有用到rn的包里面的类型定义,dev:h5的时候 prebundle提示包含了react native 然后开始报错;H5报错,具体错误如下图。

目前解决方式:
在3.5.4关闭prebundle特性后,报错消失。

  compiler: {
    type: "webpack5",
    prebundle: {
      enable: false
    }
  },

期望结果

正常构建(下图为3.5.2版本输出)
image
image

实际结果

异常构建
image
image

环境信息

👽 Taro v3.5.4


  Taro CLI 3.5.4 environment info:
    System:
      OS: macOS 12.5.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 18.6.0 - ~/.nvm/versions/node/v18.6.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v18.6.0/bin/yarn
      npm: 8.18.0 - ~/.nvm/versions/node/v18.6.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.4 => 3.5.4 
      @tarojs/components: 3.5.4 => 3.5.4 
      @tarojs/helper: 3.5.4 => 3.5.4 
      @tarojs/plugin-framework-react: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-alipay: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-jd: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-qq: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-swan: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-tt: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-weapp: 3.5.4 => 3.5.4 
      @tarojs/react: 3.5.4 => 3.5.4 
      @tarojs/rn-runner: 3.5.4 => 3.5.4 
      @tarojs/router: 3.5.4 => 3.5.4 
      @tarojs/runtime: 3.5.4 => 3.5.4 
      @tarojs/shared: 3.5.4 => 3.5.4 
      @tarojs/taro: 3.5.4 => 3.5.4 
      @tarojs/taro-h5: 3.5.4 => 3.5.4 
      @tarojs/taro-rn: 3.5.4 => 3.5.4 
      @tarojs/webpack5-runner: 3.5.4 => 3.5.4 
      babel-preset-taro: 3.5.4 => 3.5.4 
      eslint-config-taro: 3.5.4 => 3.5.4 
      expo: ~46.0.1 => 46.0.9 
      react: ^17.0.2 => 17.0.2 
      react-native: ^0.68.2 => 0.68.3 
      taro-ui: ^3.1.0.beta.3 => 3.1.0-beta.3 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Aug 26, 2022
@ZakaryCode
Copy link
Contributor

目前扫描项目依赖时,并不会根据不同端做筛查,可以先手动 exclude 相关依赖

@ZakaryCode ZakaryCode added A-runner Area - Webpack runner 相关 P-1 High, patch E-medium Helper Wanted - Medium labels Aug 26, 2022
@taro-bot2 taro-bot2 bot modified the milestone: 3.5.5 Aug 26, 2022
@ZakaryCode ZakaryCode assigned ZakaryCode and unassigned Chen-jj Aug 26, 2022
@Aliom252181
Copy link
Contributor Author

exclude

了解了,感谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runner Area - Webpack runner 相关 E-medium Helper Wanted - Medium F-react Framework - React P-1 High, patch T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants