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

config的subPackages,RN平台中并没有合并编译到pages #6230

Closed
directguo opened this issue May 7, 2020 · 3 comments
Closed

config的subPackages,RN平台中并没有合并编译到pages #6230

directguo opened this issue May 7, 2020 · 3 comments
Assignees

Comments

@directguo
Copy link

问题描述

config的subPackages,RN平台中并没有合并编译到pages

复现步骤

  1. 按如下代码配置
  2. yarn dev:rn
  3. 查看编译后的app.js
    4.subPackages中的pages,并没有合并到config.pages中
  • 编译前
  config = {
    pages: ['packages/taro-yum-common/start/index'],
    window: {
      'backgroundTextStyle': 'light',
      'navigationBarBackgroundColor': '#fff',
      'navigationBarTitleText': 'WeChat',
      'navigationBarTextStyle': 'black'
    },
    navigateToMiniProgramAppIdList: [
      'wx4c78682bea26ab3c'
    ],
    permission: { 'scope.userLocation': { 'desc': '你的位置信息将用于小程序位置接口的效果展示' } },
    subPackages: [
      {
        'root': 'taro',
        'pages': [
          'pages/demo/home/index',
          'pages/demo/list/index',
          'pages/demo/detail/index',
          'pages/test/list/list',
          'pages/test/detail/detail',
          'pages/test/component/index'
        ]
      },
      { 'root': 'cardBag', 'pages': ['pages/cardBag/index'] }
    ]
  }
  • 编译后
    _this.RootStack = _taroRouterRn2.default.initRouter([['packages/taro-yum-common/start/index', packagesTaroYumCommonStartIndex]], Taro, {
      window: {
        'backgroundTextStyle': 'light',
        'navigationBarBackgroundColor': '#fff',
        'navigationBarTitleText': 'WeChat',
        'navigationBarTextStyle': 'black'
      },
      navigateToMiniProgramAppIdList: ['wx4c78682bea26ab3c'],
      permission: {
        'scope.userLocation': {
          'desc': '你的位置信息将用于小程序位置接口的效果展示'
        }
      },
      subPackages: [{
        'root': 'taro',
        'pages': ['pages/demo/home/index', 'pages/demo/list/index', 'pages/demo/detail/index', 'pages/test/list/list', 'pages/test/detail/detail', 'pages/test/component/index']
      }, {
        'root': 'cardBag',
        'pages': ['pages/cardBag/index']
      }]
    });

期望行为

希望合并到pages中

报错信息

系统信息

Taro CLI 2.2.2 environment info:
System:
OS: macOS 10.15.4
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.15.0 - /var/folders/q8/mb7tbs5171zcspr1xhvldjqh0000gn/T/yarn--1588828341548-0.15167790339281306/node
Yarn: 1.21.1 - /var/folders/q8/mb7tbs5171zcspr1xhvldjqh0000gn/T/yarn--1588828341548-0.15167790339281306/yarn
npm: 6.13.7 - /usr/local/bin/npm
npmPackages:
@tarojs/cli: 2.2.2 => 2.2.2
@tarojs/components: 2.2.2 => 2.2.2
@tarojs/components-qa: 2.2.2 => 2.2.2
@tarojs/components-rn: 2.2.2 => 2.2.2
@tarojs/mini-runner: 2.2.2 => 2.2.2
@tarojs/plugin-less: 2.2.2 => 2.2.2
@tarojs/redux: 2.2.2 => 2.2.2
@tarojs/redux-h5: ^2.2.2 => 2.2.3
@tarojs/rn-runner: ^2.2.3 => 2.2.3
@tarojs/router: 2.2.2 => 2.2.2
@tarojs/taro: 2.2.2 => 2.2.2
@tarojs/taro-alipay: 2.2.2 => 2.2.2
@tarojs/taro-h5: 2.2.2 => 2.2.2
@tarojs/taro-qq: 2.2.2 => 2.2.2
@tarojs/taro-quickapp: 2.2.2 => 2.2.2
@tarojs/taro-redux-rn: 2.2.2 => 2.2.2
@tarojs/taro-rn: 2.2.2 => 2.2.2
@tarojs/taro-router-rn: 2.2.2 => 2.2.2
@tarojs/taro-swan: 2.2.2 => 2.2.2
@tarojs/taro-tt: 2.2.2 => 2.2.2
@tarojs/taro-weapp: 2.2.2 => 2.2.2
@tarojs/webpack-runner: 2.2.2 => 2.2.2
eslint-config-taro: 2.2.2 => 2.2.2
nerv-devtools: ^1.5.6 => 1.5.6
nervjs: ^1.5.6 => 1.5.6
react: 16.8.3 => 16.8.3
react-native: 0.59.10 => 0.59.10
stylelint-config-taro-rn: 2.2.2 => 2.2.2
stylelint-taro-rn: 2.2.2 => 2.2.2

@taro-bot
Copy link

taro-bot bot commented May 7, 2020

CC @Pines-Cheng

@taro-bot
Copy link

taro-bot bot commented May 7, 2020

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@Pines-Cheng
Copy link
Contributor

fixed by:#6406

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

2 participants