A Webpack-based toolkit to build your React Native application with full support of Webpack ecosystem.
MIT License
Bot releases are hidden (Show)
This release introduces long-awaited support for Rspack while maintaining full compatibility with webpack.
Try it Out:
To bootstrap a new project or migrate an existing project from Metro, run:
npx @callstack/[email protected]
Upgrading from Version 4:
Open react-native.config.js
and update the line:
require('callstack/repack/commands')
to:
require('callstack/repack/commands/rspack')
Install the necessary Rspack dependencies:
npm install @rspack/core @rspack/plugin-react-refresh @swc/helpers --save-dev
Check out the new Rspack templates for configuration and migrate your existing Webpack configurations to Rspack:
MJS Template: rspack.config.mjs
CJS Template: rspack.config.cjs
Migration Guide: if you are migrating from Webpack to Rspack, refer to the official guide: Rspack Migration Guide
Published by jbroma about 2 months ago
#710 a467bb5
Thanks @jbroma! - Use compile-time check to determine React-Native version in WebpackHMRClient
#697 14550ab
Thanks @jbroma! - Align CLI options for start
and bundle
commands with @react-native/community-cli-plugin
.
#703 4de5305
Thanks @hexboy! - Fix LoadingView
import in WebpackHMRClient
for React Native >=0.75
Published by jbroma 2 months ago
This release includes fixes for bundle caching, naming collisions, and typing in the native module, along with the addition of an assetPath
field for more control over remote assets.
You can read more about customising assetPath
here: https://re-pack.dev/docs/guides/remote-assets#customizing-asset-path
#680 b936d63
Thanks @jbroma! - Fix bundle caching after invalidating scripts
#683 8b07027
Thanks @jbroma! - Fix bundle naming collisions when using device filesystem cache
#641 c9eaef8
Thanks @jbroma! - Fix typing for methods exposed in native module
#651 a385b2b
Thanks @adammruk! - Added 'assetPath' field to remote assets config, enabling granular control over the generated URL and server location to the asset
#679 d8924c6
Thanks @jbroma! - Fix infinite loop when traversing the chunk graph in OutputPlugin
#647 e51b7a6
Thanks @jhso-dev! - Correctly parse platform from file URL
#656 1e27ae5
Thanks @barttom! - Improved descriptions of start and bundle command options
#678 46f1eb4
Thanks @jbroma! - Refactor OutputPlugin's chunk categorization algorithm
#646 9c119db
Thanks @jbroma! - Prevent infinite recursion when tracking down initial chunks in Output Plugin
Published by jbroma 4 months ago
#639 13db9ed
Thanks @jbroma! - Fix android native module configuration
Updated dependencies []:
Published by jbroma 5 months ago
This update brings full support for bridgeless mode when using new architecture of React Native 🎉
Published by jbroma 5 months ago
Re.Pack 4.0.0 is here 🎉
Check out Migration Guide in our fresh new docs at https://re-pack.dev
This release also marks the beginning of unified versioning for all Re.Pack packages
Special thanks to everyone involved in this release! 🙏
@thymikee @RafikiTiki @szymonrybczak @teneeto @troZee @kerm1it @krozniata @hosseinmd @lukemorawski
#430 0d96b11
Thanks @jbroma! - Upgrade to Node 18, drop support for Node 16
#530 470a7c1
Thanks @jbroma! - Remove ReactRefreshPlugin
in favor of DevelopmentPlugin
#435 63d973f
Thanks @jbroma! - CodeSigningPlugin
no longer accepts outputPath
property as configuration option, performs the code-signing in-place and integrates nicely with OutputPlugin
#537 6fa32cb
Thanks @jbroma! - Override the default start
and bundle
CLI commands for enhanced functionality and compatibility with react-native
versions >= 0.74. Additionally, this update ensures that running react-native run-ios
or react-native run-android
will launch the Re.Pack dev server by default instead of the Metro dev server.
#525 a74930b
Thanks @jbroma! - getResolveOptions
is now way more compatible with metro-resolver
and @react-native/metro-config
getResolveOptions
now accepts a second optional parameter called options with the following properties:
enablePackageExports
- defaults to false
preferNativePlatform
- defaults to true
@react-native/metro-config
.exports
field in package.json) is now optional and disabled by default.getResolveOptions
options parameter. This change was introduced to match metro
defaults.conditionNames
are now: ['require', 'import', 'react-native']
and match @react-native/metro-config
defaults.#495 50a7257
Thanks @troZee! - Add support for New Architecture
#508 fec8962
Thanks @RafikiTiki! - Fixed deprecated remote debugger integration:
@react-native-community/cli-server-api
package/debugger-app
and replaced it with @react-native-community/cli-debugger-ui
@react-native/dev-middleware
which enables us to use both Flipper and new experimental debugger#539 8270cb7
Thanks @jbroma! - OutputPlugin now supports configuration with empty object as compilation entry
#582 24585c0
Thanks @jbroma! - Use localhost
as a defined default for the dev-server
#508 fec8962
Thanks @RafikiTiki! - Added pass-through experimentalDebugger
flag to CLI commands to ensure compatibility with Metro and new experimental debugger for React Native
#580 b6c68dc
Thanks @jbroma! - Make Re.Pack compatible with use_frameworks!
#491 ebf1b19
Thanks @hosseinmd! - Log error before exit during bundling
#499 15ffcba
Thanks @jbroma! - Support non-classic(e.g. pnpm) paths to HMRClient from react-native
#496 a59b8ed
Thanks @krozniata! - Remove duplicated React-Core dependency from podspec
#588 b30bca0
Thanks @jbroma! - Keep separate logs for compilation stats specific to each platform
#612 b6eb0ea
Thanks @jbroma! - Update templates to include .cjs
and .mjs
extensions
#579 06a4da8
Thanks @jbroma! - Include NativeScriptManger.ts
in distributed files for codegen
#574 bab94bf
Thanks @jbroma! - Fix dev server crash caused by uninitialized progress senders
#555 8fe92be
Thanks @jbroma! - Fix getDirname
utility function on Windows
#596 b5ae6ac
Thanks @jbroma! - Fix crash when using Node >= 21 for bundling in development
#556 6c09015
Thanks @jbroma! - Update webpack.config
templates
#515 ee1cc79
Thanks @jbroma! - Use done
hook inside of OutputPlugin
#572 b134936
Thanks @jbroma! - Always match .json extension last during module resolution
#464 72c770b
Thanks @jbroma! - Upgrade TypeScript, ESLint, TypeDoc in the repository
#567 6417da7
Thanks @kerm1it! - Notify clients on all platforms when sending an HMR event update
#554 ed82e29
Thanks @jbroma! - Fix path to favicon.ico
on Windows
Published by jbroma 6 months ago
#580 b6c68dc
Thanks @jbroma! - make callstack-repack
pod compatible with use_frameworks!
#579 06a4da8
Thanks @jbroma! - include NativeScriptManger.ts
for codegen
#574 bab94bf
Thanks @jbroma! - fix dev server crash caused by uninitialized progress senders
#572 b134936
Thanks @jbroma! - always match .json extension last
Published by jbroma 6 months ago
You can now use @callstack/repack-init
to use pre-releases like this one:
npx @callstack/repack-init@rc --custom-version 4.0.0-rc.1
Published by jbroma 7 months ago
@callstack/repack-debugger-app
in this version and plan to remove it entirely in the next major release. We are currently working on supporting the new debugger.#430 0d96b11
Thanks @jbroma! - BREAKING CHANGE:
Upgrade to Node 18, drop support for Node 16.
#530 470a7c1
Thanks @jbroma! - BREAKING CHANGE:
ReactRefreshPlugin
was removed.
If you were using ReactRefreshPlugin
, please switch to DevelopmentPlugin
moving forward.
Users of RepackPlugin
can continue as is, with no changes required.
#435 63d973f
Thanks @jbroma! - BREAKING CHANGE:
CodeSigningPlugin no longer accepts outputPath
property as configuration option. Instead, it performs the code-signing in-place and integrates nicely with OutputPlugin.
#537 6fa32cb
Thanks @jbroma! - BREAKING CHANGE:
Re.Pack commands now override the default start
and bundle
CLI commands for enhanced functionality and compatibility with react-native
versions >= 0.74. For earlier versions of react-native
(< 0.74), the traditional commands webpack-start
and webpack-bundle
remain available and recommended.
This change primarily impacts setups where both Metro and Re.Pack are used simultaneously.
To maintain your current workflow without adopting these overrides, especially to avoid conflicts in projects using both Metro and Re.Pack, you can opt out by filtering out the new command names and reverting to the legacy webpack
prefixed commands:
// react-native.config.js
const commands = require('@callstack/repack/commands');
module.exports = {
commands: commands.filter((command) => command.name.startsWith('webpack')),
};
Additionally, this update ensures that running react-native run-ios
or react-native run-android
will launch the Re.Pack dev server by default instead of the Metro dev server.
#525 a74930b
Thanks @jbroma! - BREAKING CHANGE:
getResolveOptions
is now way more compatible with metro-resolver
and @react-native/metro-config
getResolveOptions
now accepts a second optional parameter called options with the following properties:
enablePackageExports
- defaults to false
preferNativePlatform
- defaults to true
@react-native/metro-config
.exports
field in package.json) is now optional and disabled by default.getResolveOptions
options parameter. This change was introduced to match metro
defaults.conditionNames
are now: ['require', 'import', 'react-native']
and match @react-native/metro-config
defaults.#495 50a7257
Thanks @troZee and @teneeto for prior work! - Support for New Architecture
8270cb7
Thanks @jbroma! - OutputPlugin now supports configuration with empty object as compilation entry.#491 ebf1b19
Thanks @hosseinmd! - log error before exit when compilation has error
#499 15ffcba
Thanks @jbroma! - Support non-classic(pnpm) paths to HMRClient from react-native
#496 a59b8ed
Thanks @krozniata! - Remove duplicated React-Core dependency from podspec
#515 ee1cc79
Thanks @jbroma! - Use done
hook inside of OutputPlugin
#464 72c770b
Thanks @jbroma! - chore: upgrade TypeScript, ESLint, TypeDoc
Updated dependencies [0d96b11
, 72c770b
]:
Published by RafikiTiki 10 months ago
This release has two main changes:
e1476e6
Thanks @szymonrybczak! - fix: get commands options and description from new package (support RN>=0.73)#479 b1ad518
Thanks @ambar! - Added the ability to fully leverage the webpack built-in caching mechanism to optimise cold build times.
Updated dependencies [cc997a2
]:
Published by RafikiTiki 10 months ago
Published by RafikiTiki 12 months ago
📖 Learn more about what Lazy Compilation is and how to use it:
https://re-pack.netlify.app/docs/configuration/guides/lazy-compilation
Published by RafikiTiki about 1 year ago
7deea25
Thanks @jbroma! - Add builtin support for react-native deep imports when using Module Federation#343 0141fc1
Thanks @piccinnigius! - Fix ERR_UNSUPPORTED_ESM_URL_SCHEME on Windows
Updated dependencies [a66785d
, 719c2ef
]:
Published by RafikiTiki about 1 year ago
Published by RafikiTiki about 1 year ago
Published by RafikiTiki about 1 year ago
Two minor
changes
CodeSigningPlugin
i.e. turning it off in developmentd4d7dc7
Thanks @jbroma! - Added enabled flag to CodeSigningPlugin, this is useful when you want to disable the plugin in development environment and only keep it in production. For now this flag defaults to true to prevent a breaking change.#408 3bcce76
Thanks @eps1lon! - Allow storing compilation stats.
You can now run webpack-bundle
with --json <file> --stats <preset>
(like with webpack-cli
) to store compilation stats in the specified file.
Compilation stats can be used to analyze the bundle (e.g. with webpack-bundle-analyzer
or https://statoscope.tech/).