Releases: callstack/repack
repack-dev-server 1.0.2
3.4.0
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 withwebpack-cli
) to store compilation stats in the specified file.
Compilation stats can be used to analyze the bundle (e.g. withwebpack-bundle-analyzer
or https://statoscope.tech/).
repack-init 1.0.4
3.3.1
This Release comes with:
- One patch change – an upgrade of an Android library (
nimbus-jose-jwt
) used to decode JWT. This upgrade was needed because of a security vulnerability affecting this package in the previous version used by Repack. - A few typos fixed in the example usage of the
Federated
module andRepackPlugin
– #398. Thank you, @ergenekonyigit , for your contribution! 🎉
Patch Changes
3.3.0
3.3.0
This release comes with:
- three fixes from @jbroma that make living with a project using Repack with webpack instead of Metro bundler easier, and
- one significant change – the optional
ChunksToHermesBytecodePlugin
created by @oblador & @mikeduminy at Klarna. This one can be manually added to the webpack config to ensure all chunks (or a subset of them, if theexclude
parameter is specified) produced in the production build are indeed complied to the Hermes bytecode. Once again, big thanks for the contribution and I hope it's only the beginning of a great cooperation 🎉
📖 ChunksToHermesBytecodePlugin
Docs can be found here: https://re-pack.netlify.app/docs/configuration/plugins/chunks-to-hermes
Minor Changes
- #378
14afc61
Thanks @mikeduminy! - Add ChunksToHermesBytecodePlugin to transform all emitted chunks with Hermes
Patch Changes
-
#391
0693fda
Thanks @jbroma! - Fix: stricter versions for dependencies inside podspec -
#365
cf6c77a
Thanks @jbroma! - Updated getResolveOptions exposed by RePack to prefer 'default' condition over webpack's defaults ['require', 'node'] -
#382
c1a5a2b
Thanks @jbroma! - Fixed and issue where URL for remote asset only included basename from publicPath
repack-init v1.0.3
repack-init v1.0.2
Introducing @callstack/repack-init
, which helps you setup RePack in your project in seconds!
After a few initial problems with release it's finally here!
Summary
repack-init
is a utility npm package that automates the process of integrating the Repack
bundler into React Native projects.
Here's a summary of the functionality repack-init
provides:
- Package Manager Detection: Identifies the package manager (npm or yarn) being used in the project.
- React Native Verification: Checks whether React Native is installed in the project, and what version is being used.
- Dependency Addition: Utilizes the established package manager to add necessary dependencies to the React-Native project.
- Configuration of React Native Config: Checks for the existence of
react-native.config.js
and adds or modifies the necessary fields (commands). - Webpack Configuration: Creates and configures
webpack.config.js
based on user-provided flags (--mjs or --cjs). - iOS Modification: Updates the
project.pbxproj
file in the iOS directory. - Android Modification: Updates the
build.gradle
file in the Android directory based on specific React Native version requirements.
This tool aims to simplify the setup of Repack
in React Native projects, ensuring developers can quickly start using Repack
's features.
Limitations:
Minimum required node
version: 16
Usage
Usage: @callstack/repack-init [options]
Options:
-e, --entry Path to main entry point for the React-Native project
[string] [default: "index.js"]
-f, --format Format of the webpack.config file
[string] [choices: "mjs", "cjs"] [default: "mjs"]
-v, --verbose Enables verbose logging [boolean] [default: false]
--version Show version number [boolean]
--help Show help [boolean]
Example outputs
✔ Dependencies installed
✔ Created webpack.config.mjs from template
✔ Created react-native.config.js
✔ Added "webpack-bundle" as bundleCommand to android/app/build.gradle
✔ Added "webpack-bundle" as BUNDLE_COMMAND to build phase shellScript in ios/test1.xcodeproj/project.pbxproj
🎉 Setup complete. Thanks for using Re.Pack!
1.0.2
Patch Changes
- Build the package properly before publishing to npm 🤦
1.0.1
Patch Changes
1.0.0
Major Changes
3.2.0
This release has two main features/improvements: Code Signing and Remote Assets.
Remote Assets
This has been an issue (#147, #223) for a long time, Repack users had to either manually implement a way to expose static assets (like images, videos etc) from the Remote Chunks/Federated Modules and then consume them in the Host Apps/Super Apps or, there was a more straightforward way – configure assets loader to base64 encode the images and inline them into the JS bundles. This was not the ideal solution because then the JS bundles quickly exploded in size, especially if the remote code was assets heavy.
Thanks to fantastic work from @jbroma, a built-in solution in Repack makes it easier to generate Remote Assets during build time and automatically adjust the JS bundles to use these assets. More thorough guides on handling assets are being worked on and will soon be added to the documentation website. For now, please refer to the usage
section in the PR description: #331
Code Signing
This is a big one 🚀 ! Security is critical, especially in applications that allow remote code execution. That's why we bring an easy-to-configure way to cryptographically sign bundles which will be available for remote consumption in the Module Federation architecture. This will make it easy to ensure that the code the final users of your app are downloading is the code you intend them to download and is not tampered with. For more context and info on how to set it up, please refer to this PR: #348. We create a documentation page dedicated to this topic soon.
Repack
Minor Changes
Code Signing:
-
#318
6e12c14
Thanks @jbroma! - Added CodeSigning abilities to RePack: -
#348
76e98e9
Thanks @jbroma! - Embed code-signing signatures into the bundles:- This potentially is a breaking change: min iOS version was bumped from 10 to 12 due to the usage of JWTDecode dependency
- Introduced
CodeSigningPlugin
for generating code-signed bundles - Implemented
CodeSigningUtils
extension for native part of theScriptManager
to verify signed bundles on Android and iOS
Remote Assets
-
#331
515fb05
Thanks @jbroma! - Added remote-assets functionality to the assetsLoader -
#328
4f155dd
Thanks @jbroma! - Auto device scale resolution for inlined assets
Patch Changes
- #330
f142e06
Thanks @jbroma! - Code-Signing - move execution of the plugin to the later stage of compilation
- #347
2180c09
Thanks @jbroma! - Fix OutputPlugin issue where chunks have no associated files with them
TesterApp
Minor Changes
Patch Changes
3.2.0-rc.1
3.2.0-rc.0
This Release candidate introduces a new feature – Code Signing. It allows you to sign your bundles during build time and verify them on the client side. This feature is currently in experimental mode and the implementation is subject to change. Once we are confident that the API is stable, we will release a stable version of this feature along with the documentation and examples.