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
H5
https://github.com/xughv/taro-test
使用框架: React
位于 node_modules 中的文件如果使用到 @tarojs/taro 中部分方法会报错:
node_modules
@tarojs/taro
import { useReady } from "@tarojs/taro";
可正常使用。
修正 taro-h5/src/index 导出,当前 useReady 等方法仅包含在 export default 对象中。
taro-h5/src/index
useReady
export default
非默认导出中未包含 useReady 等方法。
Taro CLI 3.0.14 environment info: System: OS: Linux 4.4 Ubuntu 18.04.2 LTS (Bionic Beaver) Shell: 5.4.2 - /usr/bin/zsh Binaries: Node: 12.13.0 - /usr/local/bin/node Yarn: 1.9.2 - /mnt/c/Program Files (x86)/Yarn/bin/yarn npm: 6.12.0 - /usr/local/bin/npm npmPackages: @tarojs/components: 3.0.17 => 3.0.17 @tarojs/mini-runner: 3.0.17 => 3.0.17 @tarojs/react: 3.0.17 => 3.0.17 @tarojs/runtime: 3.0.17 => 3.0.17 @tarojs/taro: 3.0.17 => 3.0.17 @tarojs/webpack-runner: 3.0.17 => 3.0.17 babel-preset-taro: 3.0.17 => 3.0.17 eslint-config-taro: 3.0.17 => 3.0.17 react: ^16.10.0 => 16.14.0
项目目录中文件未出现该问题是因为 esm 通过 Babel 进行了转换,尝试修改 webpack-runner 中 babel-loader exclude 不覆盖 node_modules 也将不会产生报错。
webpack-runner
exclude
The text was updated successfully, but these errors were encountered:
缺失了 @tarojs/runtime 中方法
@tarojs/runtime
Sorry, something went wrong.
好像 taro-api 中的 API 在 taro-h5 中并没有完整导出 😰: https://github.com/NervJS/taro/blob/next/packages/taro-api/src/index.js#L37 https://github.com/NervJS/taro/blob/next/packages/taro-h5/src/taro/index.js#L72
taro-api
taro-h5
fix(taro-h5): 补全 taro-h5 导出的散装 API, fix #8189
cd7b90a
fix(taro-h5): 补全 taro-h5 导出的散装 API, fix #8189 (#8192)
32ea25d
* fix(taro-h5): 补全 taro-h5 导出的散装 API, fix #8189 * fix: ci
Successfully merging a pull request may close this issue.
相关平台
H5
复现仓库
https://github.com/xughv/taro-test
使用框架: React
复现步骤
位于
node_modules
中的文件如果使用到@tarojs/taro
中部分方法会报错:期望结果
可正常使用。
修正
taro-h5/src/index
导出,当前useReady
等方法仅包含在export default
对象中。实际结果
非默认导出中未包含
useReady
等方法。环境信息
补充信息
项目目录中文件未出现该问题是因为 esm 通过 Babel 进行了转换,尝试修改
webpack-runner
中 babel-loaderexclude
不覆盖node_modules
也将不会产生报错。The text was updated successfully, but these errors were encountered: