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
React Native
使用框架: React
Taro RN 不分不管是单页面应用还是多页面应用 都会引入react-navigation ,达到了400多KB, 包体增大,在android 手机端,加载js 过程中会有 100毫秒左右的时间差
单页面不引入
引入
👽 Taro v3.6.6 Taro CLI 3.6.6 environment info: System: OS: macOS 13.4 Shell: 5.9 - /bin/zsh Binaries: Node: 18.13.0 - /usr/local/bin/node Yarn: 1.22.19 - ~/.yarn/bin/yarn npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm npmPackages: @tarojs/cli: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/components: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/components-rn: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/helper: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/plugin-framework-react: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/plugin-html: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/plugin-mini-ci: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/plugin-platform-alipay: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/plugin-platform-h5: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/plugin-platform-jd: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/plugin-platform-qq: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/plugin-platform-swan: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/plugin-platform-tt: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/plugin-platform-weapp: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/react: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/rn-runner: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/runtime: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/shared: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/taro: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/taro-rn: 3.6.5-canary.1 => 3.6.5-canary.1 @tarojs/webpack5-runner: 3.6.5-canary.1 => 3.6.5-canary.1 babel-preset-taro: 3.6.5-canary.1 => 3.6.5-canary.1 eslint-config-taro: 3.6.5-canary.1 => 3.6.5-canary.1 expo: ~48.0.0 => 48.0.11 react: ^18.2.0 => 18.2.0 react-native: ^0.71.6 => 0.71.7 npmGlobalPackages: typescript: 5.0.2
The text was updated successfully, but these errors were encountered:
fix(rn): 单页面引入react-navigation导致体积过大问题(NervJS#14079)
aa07b98
9dcdf8b
默认都会引入,在app.config 配置有一个开关打开,单页面就不会引入react-navigation, eg:
export default defineAppConfig({ pages: [ 'pages/index/index' ], rn:{ singleMode: true, // 默认是false } })
如果pages的页面从一个到多个页面,需要重启下yarn start
yarn start
Sorry, something went wrong.
4d4e838
fix(rn): 单页面引入react-navigation导致体积过大问题(#14079) (#14199)
6f13d82
* fix(rn): 单页面引入react-navigation导致体积过大问题(#14079) * style: runtime-rn code format * test(rn): update rn transformer snapshots --------- Co-authored-by: tony chen <329604487@qq.com>
yechunxi
Successfully merging a pull request may close this issue.
相关平台
React Native
使用框架: React
复现步骤
Taro RN 不分不管是单页面应用还是多页面应用 都会引入react-navigation ,达到了400多KB, 包体增大,在android 手机端,加载js 过程中会有 100毫秒左右的时间差
期望结果
单页面不引入
实际结果
引入
环境信息
The text was updated successfully, but these errors were encountered: