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

打包 rn 提示 common js 样式路径错误 #7442

Closed
Holl9 opened this issue Aug 26, 2020 · 1 comment
Closed

打包 rn 提示 common js 样式路径错误 #7442

Holl9 opened this issue Aug 26, 2020 · 1 comment
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-2 Version - 2.x

Comments

@Holl9
Copy link

Holl9 commented Aug 26, 2020

相关平台

React Native

使用框架: React

复现步骤

yarn dev:rn 正常
yarn build:rn 打包,提示 common.js 样式错误

期望结果

正常打包

实际结果

打包报错

环境信息

👽 Taro v2.2.13


  Taro CLI 2.2.13 environment info:
    System:
      OS: macOS 10.15.6
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.18.2 - ~/.nvm/versions/node/v12.18.2/bin/node
      Yarn: 1.22.4 - ~/.nvm/versions/node/v12.18.2/bin/yarn
      npm: 6.14.5 - ~/.nvm/versions/node/v12.18.2/bin/npm
    npmPackages:
      @tarojs/components: 2.2.13 => 2.2.13 
      @tarojs/components-qa: 2.2.13 => 2.2.13 
      @tarojs/components-rn: 2.2.13 => 2.2.13 
      @tarojs/mini-runner: 2.2.13 => 2.2.13 
      @tarojs/plugin-sass: 2.2.13 => 2.2.13 
      @tarojs/plugin-terser: 2.2.13 => 2.2.13 
      @tarojs/redux: 2.2.13 => 2.2.13 
      @tarojs/redux-h5: 2.2.13 => 2.2.13 
      @tarojs/rn-runner: 2.2.13 => 2.2.13 
      @tarojs/router: 2.2.13 => 2.2.13 
      @tarojs/taro: 2.2.13 => 2.2.13 
      @tarojs/taro-alipay: 2.2.13 => 2.2.13 
      @tarojs/taro-h5: 2.2.13 => 2.2.13 
      @tarojs/taro-qq: 2.2.13 => 2.2.13 
      @tarojs/taro-quickapp: 2.2.13 => 2.2.13 
      @tarojs/taro-redux-rn: 2.2.13 => 2.2.13 
      @tarojs/taro-rn: 2.2.13 => 2.2.13 
      @tarojs/taro-router-rn: 2.2.13 => 2.2.13 
      @tarojs/taro-swan: 2.2.13 => 2.2.13 
      @tarojs/taro-tt: 2.2.13 => 2.2.13 
      @tarojs/taro-weapp: 2.2.13 => 2.2.13 
      @tarojs/webpack-runner: 2.2.13 => 2.2.13 
      eslint-config-taro: 2.2.13 => 2.2.13 
      eslint-plugin-taro: 2.2.13 => 2.2.13 
      nerv-devtools: ^1.5.7 => 1.5.7 
      nervjs: ^1.5.7 => 1.5.7 
      react: 16.8.0 => 16.8.0 
      react-native: 0.59.9 => 0.59.9 
      stylelint-config-taro-rn: 2.2.13 => 2.2.13 
      stylelint-taro-rn: 2.2.13 => 2.2.13 

image

@taro-bot2 taro-bot2 bot added F-react Framework - React T-rn Target - 编译到 React Native V-2 Version - 2.x labels Aug 26, 2020
@Pines-Cheng
Copy link
Contributor

Taro 2.2.x 版本基于 webpack 进行了改造,webpack 是针对 Web 平台的打包工具,在资源的处理上还是存在很多限制,和 RN 的使用场景并不符合,因此导致了很多棘手的问题,3.x 的 RN 适配已经去除了 webpack,欢迎尝试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-2 Version - 2.x
Projects
None yet
Development

No branches or pull requests

2 participants