Hello World!
Before diving deep into Re.Pack and introducing it into project, it's important to understand when and why to use Re.Pack and how does it compare with alternatives.
What @callstack/repack actually is?
React Native environment and Browser environment have differences. React Native needs to run additional JS setup/init code so that it's usable at all. There's a great discrepancy between available APIs. In React Native we also have platform specific files — e.g.: .ios.js, .android.js and so on.
Putting all the above together, makes webpack unable to produce bundle at all due to build errors and then the bundle produced by webpack is unusable by default.
Therefore, we need to make changes to webpack configuration and change how and what webpack puts into the final bundle. All these necessary changes are encapsulated inside Re.Pack in form of webpack plugins.
So to answer the question:
Tabs
Package Manager Tabs
Example Table
Here is a simple markdown table:
Inline Code Block
npm install rspress -D
Code Block
Code Block with Highlight
Container cases
The command is started through the React Native Community CLI's start command, which is overridden inside react-native.config.js to spawn Re.Pack's dev server.
The main purpose of this plugin is to limit the build performance impact of the react-native-reanimated babel plugin.
If you're using webpack with babel-loader, you probably don't need this plugin. Instead, you should follow the official Reanimated documentation and add the Reanimated Babel plugin directly to your babel.config.js:
By default, extracted asset files are copied to assets/ directory for iOS and drawable-* directories (e.g. drawable-mdpi, drawable-hdpi, etc.) for Android which matches Metro's asset handling behavior.
Looking to do more with your assets? Check out the guides on:
Details
This loader uses flow-remove-types under the hood. You can learn more about it here.
LinkCards
Cards
Badges
tip info warning danger note
Custom Badges
Rspress

