We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当修饰符用在export之前,各个环境下都报not defined 错误。
具体看代码
@connect( ({apply}) => ({apply}), dispatch => ({ updateOrderInfo: () => dispatch(updateOrderInfo()) }) ) export default class chooseBank extends Component { }
成功运行
ReferenceError: chooseBank is not defined
Taro CLI 2.0.1 environment info: System: OS: macOS 10.15.2 Shell: 5.7.1 - /bin/zsh Binaries: Node: 10.14.2 - ~/.nvm/versions/node/v10.14.2/bin/node Yarn: 1.16.0 - ~/.nvm/versions/node/v10.14.2/bin/yarn npm: 6.13.4 - ~/.nvm/versions/node/v10.14.2/bin/npm npmPackages: @tarojs/async-await: 2.0.2 => 2.0.2 @tarojs/cli: 2.0.2 => 2.0.2 @tarojs/components: 2.0.2 => 2.0.2 @tarojs/mini-runner: 2.0.2 => 2.0.2 @tarojs/plugin-babel: 2.0.2 => 2.0.2 @tarojs/plugin-csso: 2.0.2 => 2.0.2 @tarojs/plugin-less: 2.0.2 => 2.0.2 @tarojs/plugin-uglifyjs: 2.0.2 => 2.0.2 @tarojs/redux: 2.0.2 => 2.0.2 @tarojs/redux-h5: 2.0.2 => 2.0.2 @tarojs/router: 2.0.2 => 2.0.2 @tarojs/taro: 2.0.2 => 2.0.2 @tarojs/taro-alipay: 2.0.2 => 2.0.2 @tarojs/taro-h5: 2.0.2 => 2.0.2 @tarojs/taro-qq: 2.0.2 => 2.0.2 @tarojs/taro-quickapp: 2.0.2 => 2.0.2 @tarojs/taro-swan: 2.0.2 => 2.0.2 @tarojs/taro-tt: 2.0.2 => 2.0.2 @tarojs/taro-weapp: 2.0.2 => 2.0.2 @tarojs/webpack-runner: 2.0.2 => 2.0.2 eslint-config-taro: 2.0.2 => 2.0.2 eslint-plugin-taro: 2.0.2 => 2.0.2 nerv-devtools: ^1.5.6 => 1.5.6 nervjs: ^1.5.6 => 1.5.6 stylelint-config-taro-rn: 2.0.2 => 2.0.2 stylelint-taro-rn: 2.0.2 => 2.0.2
使用 babel 直接编译的代码能看到
var chooseBank = (_dec = (0, _redux.connect)(); Page(__webpack_require__(/*! @tarojs/taro-swan */ "./node_modules/@tarojs/taro-swan/index.js").default.createComponent(chooseBank, true));
但经过taro的会变成
_class = (_dec = (0, _redux.connect)(); Page(__webpack_require__(/*! @tarojs/taro-swan */ "./node_modules/@tarojs/taro-swan/index.js").default.createComponent(chooseBank, true));
The text was updated successfully, but these errors were encountered:
欢迎提交 Issue~
如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏
如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。
Good luck and happy coding~
Sorry, something went wrong.
Dup #5086
export 和 class 分开写
export
class
class MyClass {} export default MyClass
No branches or pull requests
问题描述
当修饰符用在export之前,各个环境下都报not defined 错误。
复现步骤
具体看代码
期望行为
成功运行
报错信息
ReferenceError: chooseBank is not defined
系统信息
Taro CLI 2.0.1 environment info:
System:
OS: macOS 10.15.2
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.14.2 - ~/.nvm/versions/node/v10.14.2/bin/node
Yarn: 1.16.0 - ~/.nvm/versions/node/v10.14.2/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v10.14.2/bin/npm
npmPackages:
@tarojs/async-await: 2.0.2 => 2.0.2
@tarojs/cli: 2.0.2 => 2.0.2
@tarojs/components: 2.0.2 => 2.0.2
@tarojs/mini-runner: 2.0.2 => 2.0.2
@tarojs/plugin-babel: 2.0.2 => 2.0.2
@tarojs/plugin-csso: 2.0.2 => 2.0.2
@tarojs/plugin-less: 2.0.2 => 2.0.2
@tarojs/plugin-uglifyjs: 2.0.2 => 2.0.2
@tarojs/redux: 2.0.2 => 2.0.2
@tarojs/redux-h5: 2.0.2 => 2.0.2
@tarojs/router: 2.0.2 => 2.0.2
@tarojs/taro: 2.0.2 => 2.0.2
@tarojs/taro-alipay: 2.0.2 => 2.0.2
@tarojs/taro-h5: 2.0.2 => 2.0.2
@tarojs/taro-qq: 2.0.2 => 2.0.2
@tarojs/taro-quickapp: 2.0.2 => 2.0.2
@tarojs/taro-swan: 2.0.2 => 2.0.2
@tarojs/taro-tt: 2.0.2 => 2.0.2
@tarojs/taro-weapp: 2.0.2 => 2.0.2
@tarojs/webpack-runner: 2.0.2 => 2.0.2
eslint-config-taro: 2.0.2 => 2.0.2
eslint-plugin-taro: 2.0.2 => 2.0.2
nerv-devtools: ^1.5.6 => 1.5.6
nervjs: ^1.5.6 => 1.5.6
stylelint-config-taro-rn: 2.0.2 => 2.0.2
stylelint-taro-rn: 2.0.2 => 2.0.2
补充信息
使用 babel 直接编译的代码能看到
但经过taro的会变成
The text was updated successfully, but these errors were encountered: