Skip to content

[Discussion] Moving react-native-packager into a new repository. #13976

@cpojer

Description

@cpojer

Hey everyone!

The JavaScript Tools team at Facebook, especially @davidaurelio and @jeanlauliac, have made big improvements to react-native-packager's performance and reliability this year so far. As more and more people write JavaScript for mobile applications, it is essential for a bundler to be fast, reliable and scalable.

Here are some of the highlights from this half so far:

  • 10x faster source map generation. Read Fast Source Map Generation for React Native.
  • Rewrote symbolication from a 10s blocking call to a ~2s async call (b6ca952).
  • When adding/removing dependencies, the reload time was reduced from 7 seconds to 4 seconds on large repositories at Facebook.
  • Many performance minded improvements (still ways to go!) to improve startup performance. Internally at Facebook, we built a global transform cache with a server that stores all transformed files. This has a public interface, however it requires a separate server implementation in open source – we are happy to give advice if anyone wants to build an open source server component to speed up initial load time for large apps.

Next week we are planning to split react-native-packager off of React Native. We haven't been able to take enough care of open source requests around react-native-packager because of the sheer size of the react-native repository. We know there are a couple of long-standing issues and we'd like to finally address them in a smaller codebase that is easier to contribute to and easier to maintain:

  • Make it easier to configure react-native-packager.
  • Symlink support.
  • Ability to use custom transformations and languages.

What will change as a user of react-native?

Nothing.

What will change for maintainers of the react-native repo?

The new repository will require releases to be lined up with releases of react-native but we aim to make the publishing process simple.

What will change when sending Pull Requests to react-native?

Contributors will have to send pull requests to the new repository for react-native-packager.

What will change for engineers at Facebook?

We aren't changing our current workflow but we may change to use GitHub-first development for react-native-packager in the future.

Please let us know if you have any concerns. The team and I are happy to address them.

cc @davidaurelio, @jeanlauliac

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions