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

app.js 中的 config,如果key有引号,则在RN平台不被编译 #6229

Closed
directguo opened this issue May 7, 2020 · 2 comments · Fixed by #6565
Closed

app.js 中的 config,如果key有引号,则在RN平台不被编译 #6229

directguo opened this issue May 7, 2020 · 2 comments · Fixed by #6565
Assignees

Comments

@directguo
Copy link

问题描述

app.js 中的 config,如果key有引号,则在RN平台不被编译

复现步骤

  1. 按照以下示例编写config,其中pages带引号
    2.执行yarn dev:rn
  2. 查看rn_temp中的app.js
  3. _this.RootStack = 那一行中,传入的pages为空数组
class App extends Component {
config = {
  "pages": ['packages/taro-yum-common/start/index'],
  "window": {
    'backgroundTextStyle': 'light',
    'navigationBarBackgroundColor': '#fff',
    'navigationBarTitleText': 'WeChat',
    'navigationBarTextStyle': 'black'
  },
}

  componentWillMount() {
    console.log('业务代码的 componentWillMount')
  }

  componentDidMount() {
  }

  render() {
    return (
      <Provider store={store}>
        <Index />
      </Provider>
    )
  }
}

期望行为

能够正确识别带引号的key

报错信息

系统信息

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

补充信息

如果您有功能上的建议,可以提到 FeatHub

使用上的问题,欢迎在「Taro 社区」一起交流

@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~

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 a pull request may close this issue.

2 participants