GithubHelp home page GithubHelp logo

cyioser / split_jsbundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iossocket/split_jsbundle

0.0 0.0 0.0 4.08 MB

Split jsbundle to several jsbundle, and implement lazy loading

JavaScript 31.62% Ruby 5.65% Objective-C 25.87% Java 32.13% Starlark 4.73%

split_jsbundle's Introduction

split js bundle

How to run it

  1. npm ci
  2. cd ios && pod install
  3. Open iOS project by Xcode and run

Related script

  1. iOS
react-native bundle --platform ios --dev false --entry-file base.js --bundle-output build/ios/common.jsbundle --assets-dest build/ios/

react-native bundle --platform ios --dev false --entry-file index.js --bundle-output build/ios/main_app_all.jsbundle --assets-dest build/ios/

react-native bundle --platform ios --dev false --entry-file rewards/index.js --bundle-output build/ios/sub_app_all.jsbundle --assets-dest build/ios/

node diff.js ./build/ios/common.jsbundle ./build/ios/main_app_all.jsbundle ./build/ios/main_app.jsbundle
node diff.js ./build/ios/common.jsbundle ./build/ios/sub_app_all.jsbundle ./build/ios/sub_app.jsbundle
  1. Android
react-native bundle --platform android --dev false --minify=true --entry-file base.js --bundle-output build/android/common.jsbundle --assets-dest build/android/res

react-native bundle --platform android --dev false --minify=true --entry-file index.js --bundle-output build/android/main_app_all.jsbundle --assets-dest build/android/res

react-native bundle --platform android --dev false --entry-file rewards/index.js --bundle-output build/ios/sub_app_all.jsbundle --assets-dest build/android/res

node diff.js ./build/android/common.jsbundle ./build/android/main_app_all.jsbundle ./build/android/main_app.jsbundle
node diff.js ./build/android/common.jsbundle ./build/android/sub_app_all.jsbundle ./build/android/sub_app.jsbundle

解读:

  1. React Native 拆包实践1 - bundle server的启动过程
  2. React Native 拆包实践2 - react-native start
  3. React Native 拆包实践3 - react-native bundle
  4. React Native 拆包实践4 - createModuleIdFactory
  5. React Native 拆包实践5 - iOS 按需加载jsbundle
  6. React Native 拆包实践6 - Android 启动流程
  7. React Native 拆包实践7 - Android 按需加载jsbundle

split_jsbundle's People

Contributors

iossocket avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.