Skip to content

5.4.0

Choose a tag to compare

@github-actions github-actions released this 26 Sep 17:08
· 28 commits to main since this release
e418047

Minor Changes

  • #1430 33df89a Thanks @jbroma! - Bring the Rspack development experience in line with Webpack by compiling each
    platform only when its bundle is first requested. Multi-platform development
    servers no longer eagerly build unused platforms, so launching an iOS app does
    not wait for Android to compile, and vice versa.

  • #1424 8dcc116 Thanks @jbroma! - Add the unified @callstack/repack/commands entry point with automatic bundler detection and a --bundler override. Re.Pack Init now uses it, while bundler-specific entry points remain available with deprecation warnings.

Patch Changes

  • #1453 4a24b29 Thanks @gabrieldonadel! - Fix Android configuration on AGP 9, where built-in Kotlin support registers the
    kotlin extension itself and the explicit kotlin-android apply failed with
    "Cannot add extension with name 'kotlin'". The plugin - and the kotlinOptions
    block it contributes - is now applied only when nothing has registered that
    extension, leaving AGP 8 and android.builtInKotlin=false projects unchanged.

  • #1457 20e5a64 Thanks @KallinikosMil! - Fix the assets loader failing on Windows. Public paths for both remote and extracted assets were joined with path.join, which rewrites the separators to backslashes on Windows; for remote assets that turned https://… into a string new URL rejects, so any bundle containing a remote asset failed with TypeError: Invalid URL. Both are URLs rather than filesystem paths and are now joined with path.posix.join, which produces the same output on Linux and macOS as before.

  • #1456 e283ccf Thanks @ilteoood! - Fix BabelPlugin to set the babel-loader entry of resolveLoader.fallback as an array containing the resolved path, instead of a plain string. Rspack's resolver and downstream tools that consume the resolved loader config (e.g. RSDoctor) expect the value to be an array; a bare string triggered Given napi value is not an array on NapiResolveOptions.fallback. This still matches Rspack's ResolveAlias ({ [x: string]: string | false | (string | false)[] }) and Webpack's resolver loader fallback shape.

  • #1440 9f3278c Thanks @MikitasK! - Let ChunkLoadError propagate through the guarded __webpack_require__ instead of reporting it as fatal, so a failed dynamic import (including a missing Module Federation exposed chunk) rejects the import promise and can be handled by a React Error Boundary. Other remote loading failures, such as an unreachable remote entry, are not affected by this change.

  • #1434 ed1003f Thanks @MikitasK! - Fix development symbolication for Module Federation host and remote bundles. The host now follows a remote bundle's declared source map, invalid generated webpack source URLs no longer invalidate an otherwise usable map, symbolication continues when an individual frame cannot be mapped, and code frames use the matching source map's embedded source content. The dev server also logs the first useful symbolicated runtime frame as a fallback when opening the source file from the device is delayed.

  • #1470 4a36980 Thanks @dannyhw! - Fix source map source names and development stack frames for files whose path
    URLs would encode.

    • babel-loader and babel-swc-loader no longer set sourceRoot. Webpack, and
      Rspack whenever Babel produced the map, prepended it to the absolute source
      path, so project files were named src/<dir>/<absolute path> in development
      and release source maps.
    • The dev server now returns symbolicated file names exactly as the bundler
      emitted them. Before, source-map percent-encoded them, so a frame outside the
      project root came back as [projectRoot%5E2]/..., and a path with a space or
      non-ASCII character came back encoded. The encoded name broke opening the file
      from LogBox and reading its source when the map has no embedded content.
    • Development asset requests with an encoded directory name no longer 404.
  • #1449 09e7375 Thanks @yunsung-miso! - Keep the original error message for iOS script download failures instead of surfacing "Unknown error from a native module".

  • #1454 b440b44 Thanks @giaBaoJS! - Read the react-native config from the array form of shared in ModuleFederationPlugin, so the generated react-native/ and @react-native/ deep imports inherit its eager, import and version values instead of falling back to the defaults.

  • #1424 8dcc116 Thanks @jbroma! - Reject pending webpack asset requests when compilation fails instead of leaving requests hanging.

  • #1443 c17c212 Thanks @Francesco-Voto! - Support React Native 0.87. Polyfills are read from rn-get-polyfills.js when
    present, otherwise from @react-native/js-polyfills (resolved from the project,
    falling back through @react-native/metro-config), with an actionable error when
    neither can be found. The asset registry request is aliased to
    src/asset-registry.js on the 0.87 layout, and react-native/src/private is
    aliased to disk so first-party packages' deep imports keep resolving once package
    exports are enabled (0.87 dropped the ./src/* export wildcard). On 0.86 and
    earlier behaviour is unchanged.

  • #1446 87c6d94 Thanks @giaBaoJS! - Fix the webpack compiler double-joining absolute paths in getSource. The dev server resolves symbolicated stack frames to absolute paths before asking the compiler for their source, but the webpack compiler joined them onto the project root a second time, so the lookup failed. This only affected the fallback used when a frame's source is not embedded in the source map, for example with nosources-* devtools, and now matches the Rspack compiler.

  • #1444 8fba597 Thanks @giaBaoJS! - Fix production bundles shipping unminified with terser-webpack-plugin 5.6.0 and newer, which only minifies .js assets by default and silently skipped Re.Pack's .bundle output.

  • Updated dependencies [ed1003f, 4a36980]:

    • @callstack/repack-dev-server@5.4.0