repack

A Webpack-based toolkit to build your React Native application with full support of Webpack ecosystem.

MIT License

Downloads
24.2K
Stars
1.5K
Committers
34

Bot releases are hidden (Show)

repack - 5.0.0-alpha.0 Latest Release

Published by jbroma about 1 month ago

Important Notes

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:

  1. Open react-native.config.js and update the line:

    require('callstack/repack/commands')
    

    to:

    require('callstack/repack/commands/rspack')
    
  2. Install the necessary Rspack dependencies:

    npm install @rspack/core @rspack/plugin-react-refresh @swc/helpers --save-dev
    
  3. 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

Major Changes

repack - 4.3.3

Published by jbroma about 1 month ago

Patch Changes

  • #745 dbbaf72 Thanks @ra1nj! - Fixed error message on iOS when the HTTP status is not 2xx.

  • #739 300524b Thanks @ra1nj! - Fix url query being encoded twice on iOS

repack - 4.3.2

Published by jbroma about 2 months ago

Patch Changes

repack - 4.3.1

Published by jbroma about 2 months ago

Important updates

--reset-cache flag is kept only for compatibility and has no effect.

Patch Changes

  • #714 bad76d7 Thanks @jbroma! - Fix missing --reset-cache flag for both start and bundle CLI commands
repack - 4.3.0

Published by jbroma about 2 months ago

Minor Changes

Patch Changes

  • #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

repack - 4.2.0

Published by jbroma 2 months ago

Important updates

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

Minor Changes

  • #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

Patch Changes

repack - 4.1.1

Published by jbroma 4 months ago

Patch Changes

repack - 4.1.0

Published by jbroma 4 months ago

Important updates

This update brings full support for bridgeless mode when using new architecture of React Native 🎉

Minor Changes

Patch Changes

repack - 4.0.0

Published by jbroma 5 months ago

Important updates

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

Major Changes

  • #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

    1. getResolveOptions now accepts a second optional parameter called options with the following properties:
      • enablePackageExports - defaults to false
      • preferNativePlatform - defaults to true
    2. Order of extensions was changed to match the order from @react-native/metro-config.
    3. Resolution via Package Exports (exports field in package.json) is now optional and disabled by default.
      It can now be enabled via getResolveOptions options parameter. This change was introduced to match metro defaults.
    4. Default 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:

    • Removed vendored code and used middlewares from @react-native-community/cli-server-api
    • Removed package/debugger-app and replaced it with @react-native-community/cli-debugger-ui
    • Removed vendored code responsible for integration with Flipper debugger & custom implementation of the Hermes Inspector Proxy
    • Added integration with @react-native/dev-middleware which enables us to use both Flipper and new experimental debugger

Minor Changes

  • #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

Patch Changes

repack - 4.0.0-rc.2

Published by jbroma 6 months ago

Minor Changes

Patch Changes

repack - 4.0.0-rc.1

Published by jbroma 6 months ago

Important Updates

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

Minor Changes

Patch Changes

repack - 4.0.0-rc.0

Published by jbroma 7 months ago

Important Updates

  • We are deprecating @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.
  • Unified Package Versioning: This release marks the beginning of unified versioning for all Re.Pack packages

Major Changes

  • #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

    1. getResolveOptions now accepts a second optional parameter called options with the following properties:
      • enablePackageExports - defaults to false
      • preferNativePlatform - defaults to true
    2. Order of extensions was changed to match the order from @react-native/metro-config.
    3. Resolution via Package Exports (exports field in package.json) is now optional and disabled by default.
      It can now be enabled via getResolveOptions options parameter. This change was introduced to match metro defaults.
    4. Default 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

Minor Changes

  • #539 8270cb7 Thanks @jbroma! - OutputPlugin now supports configuration with empty object as compilation entry.

Patch Changes

repack - 3.7.0

Published by RafikiTiki 10 months ago

3.7.0

Summary

This release has two main changes:

  • compatibility with the latest React Native release (0.73.x)
  • improvement in terms of webpack builds caching

Minor Changes

  • #477 e1476e6 Thanks @szymonrybczak! - fix: get commands options and description from new package (support RN>=0.73)

Patch Changes

  • #479 b1ad518 Thanks @ambar! - Added the ability to fully leverage the webpack built-in caching mechanism to optimise cold build times.

  • Updated dependencies [cc997a2]:

repack - repack-dev-server 1.1.0

Published by RafikiTiki 10 months ago

1.1.0

Minor Changes

  • #475 cc997a2 Thanks @szymonrybczak! - Added X-React-Native-Project-Root header, so the RN CLI picks up the running bundler correctly
repack - 3.6.0

Published by RafikiTiki 12 months ago

3.6.0

📖 Learn more about what Lazy Compilation is and how to use it:
https://re-pack.netlify.app/docs/configuration/guides/lazy-compilation

Minor Changes

  • #457 74de630 Thanks @jbroma! - Support lazy-compilation for dynamic imports
repack - 3.5.1

Published by RafikiTiki about 1 year ago

3.5.1

Patch Changes

  • #444 88dc11f Thanks @jbroma! - Fix ValidationError in ModuleFederationPlugin caused by reactNativeDeepImports prop
repack - 3.5.0

Published by RafikiTiki about 1 year ago

3.5.0

Minor Changes

  • #265 a288e1a Thanks @justusburger! - Ensure file lists in manifests are sorted
  • #421 7deea25 Thanks @jbroma! - Add builtin support for react-native deep imports when using Module Federation

Patch Changes

  • #422 430d6be Thanks @jbroma ! - Fix inlining assets in react-native versions >= 0.72
repack - repack-init 1.1.0

Published by RafikiTiki about 1 year ago

1.1.0

Minor Changes

  • #428 8a68670 Thanks @jbroma! - Init: Support bun for installing Re.Pack dependencies
repack - repack-dev-server 1.0.2

Published by RafikiTiki about 1 year ago

1.0.2

Patch Changes

  • #441 a66785d Thanks @hexboy! - fix(dev-server): fix Failed to open stack frame in editor error
  • #426 719c2ef Thanks @jbroma! - Upgraded source-map to 0.7.4
repack - 3.4.0

Published by RafikiTiki about 1 year ago

This Release comes with

Two minor changes

  • The First one enabled a better way to control CodeSigningPlugin i.e. turning it off in development
  • The second one is a change that was merged to the old v3 branch, but it somehow got mixed up and never really was released, thanks @eps1lon for handling that!

Minor Changes

  • #409 d4d7dc7 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/).