├── .changeset ├── README.md ├── config.json └── mean-webs-travel.md ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── 1-bug-report.yml │ ├── 2-feature-request.yml │ ├── 3-documentation.yml │ └── config.yml └── workflows │ ├── stale-bot.yml │ └── test.yml ├── .gitignore ├── .husky └── pre-commit ├── .npmrc ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── ARCHITECTURE.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── apps ├── tester-app │ ├── .gitignore │ ├── .ruby-version │ ├── Gemfile │ ├── Gemfile.lock │ ├── __tests__ │ │ ├── bundle.test.ts │ │ ├── configs │ │ │ ├── rspack.config.mjs │ │ │ └── webpack.config.mjs │ │ └── start.test.ts │ ├── android │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── global.css │ ├── index.js │ ├── ios │ │ ├── Podfile │ │ ├── Podfile.lock │ │ └── TesterApp.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── nativewind-env.d.ts │ ├── package.json │ ├── react-native.config.js │ ├── rspack.config.mjs │ ├── scripts │ │ └── release.js │ ├── src │ │ ├── App.tsx │ │ ├── assetsTest │ │ │ ├── AssetFrame.tsx │ │ │ ├── AssetsTestContainer.tsx │ │ │ ├── inlineAssets │ │ │ │ ├── webpack.png │ │ │ │ ├── webpack@2x.png │ │ │ │ └── webpack@3x.png │ │ │ ├── localAssets │ │ │ │ ├── webpack.png │ │ │ │ ├── webpack@2x.png │ │ │ │ └── webpack@3x.png │ │ │ └── remoteAssets │ │ │ │ ├── webpack.png │ │ │ │ ├── webpack@2x.png │ │ │ │ └── webpack@3x.png │ │ ├── asyncChunks │ │ │ ├── Async.local.tsx │ │ │ └── AsyncContainer.tsx │ │ ├── global.d.ts │ │ ├── miniapp │ │ │ ├── MiniApp.tsx │ │ │ ├── MiniAppsContainer.tsx │ │ │ └── callstack-dark.png │ │ ├── nativewind │ │ │ ├── Basic.tsx │ │ │ ├── ComponentWithVariants.tsx │ │ │ ├── CustomComponent.tsx │ │ │ ├── DarkMode.tsx │ │ │ ├── FuncsDirs.tsx │ │ │ ├── NativeWindView.tsx │ │ │ ├── Responsive.tsx │ │ │ ├── Reusables.tsx │ │ │ └── ui │ │ │ │ ├── Button.tsx │ │ │ │ ├── Text.tsx │ │ │ │ └── utils.ts │ │ ├── reanimated │ │ │ └── ReanimatedBox.tsx │ │ ├── remoteChunks │ │ │ ├── Remote.tsx │ │ │ └── RemoteContainer.tsx │ │ ├── setup.ts │ │ └── ui │ │ │ ├── AppContainer.tsx │ │ │ ├── Button.tsx │ │ │ ├── Section.tsx │ │ │ ├── SectionContainer.tsx │ │ │ ├── Text.tsx │ │ │ ├── types.ts │ │ │ ├── undraw_Developer_activity_re_39tg.svg │ │ │ └── utils.ts │ ├── tailwind.config.js │ ├── tsconfig.json │ ├── vitest.config.mts │ └── webpack.config.mjs ├── tester-federation-v2 │ ├── .gitignore │ ├── .ruby-version │ ├── Gemfile │ ├── Gemfile.lock │ ├── android │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── config.host-app.mjs │ ├── config.mini-app.mjs │ ├── configs │ │ ├── rspack.host-app.mjs │ │ ├── rspack.mini-app.mjs │ │ ├── webpack.host-app.mjs │ │ └── webpack.mini-app.mjs │ ├── ios │ │ ├── ModuleFederationTesterV2.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── Podfile │ │ └── Podfile.lock │ ├── package.json │ ├── react-native.config.js │ ├── src │ │ ├── host │ │ │ ├── App.tsx │ │ │ ├── index.js │ │ │ ├── navigation │ │ │ │ └── MainNavigator.tsx │ │ │ └── screens │ │ │ │ ├── DetailScreen.tsx │ │ │ │ ├── HomeScreen.tsx │ │ │ │ └── MiniAppScreen.tsx │ │ └── mini │ │ │ ├── App.tsx │ │ │ ├── assets │ │ │ ├── pic_1.jpg │ │ │ ├── pic_2.jpg │ │ │ └── pic_3.jpg │ │ │ ├── index.js │ │ │ ├── navigation │ │ │ └── MainNavigator.tsx │ │ │ └── screens │ │ │ └── GalleryScreen.tsx │ └── tsconfig.json └── tester-federation │ ├── .gitignore │ ├── .ruby-version │ ├── Gemfile │ ├── Gemfile.lock │ ├── android │ ├── build.gradle │ ├── debug.keystore │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── config.host-app.mjs │ ├── config.mini-app.mjs │ ├── configs │ ├── rspack.host-app.mjs │ ├── rspack.mini-app.mjs │ ├── webpack.host-app.mjs │ └── webpack.mini-app.mjs │ ├── ios │ ├── ModuleFederationTester.xcworkspace │ │ └── contents.xcworkspacedata │ ├── Podfile │ └── Podfile.lock │ ├── package.json │ ├── react-native.config.js │ ├── src │ ├── host │ │ ├── App.tsx │ │ ├── index.js │ │ ├── navigation │ │ │ └── MainNavigator.tsx │ │ └── screens │ │ │ ├── DetailScreen.tsx │ │ │ ├── HomeScreen.tsx │ │ │ └── MiniAppScreen.tsx │ └── mini │ │ ├── App.tsx │ │ ├── assets │ │ ├── pic_1.jpg │ │ ├── pic_2.jpg │ │ └── pic_3.jpg │ │ ├── index.js │ │ ├── navigation │ │ └── MainNavigator.tsx │ │ └── screens │ │ └── GalleryScreen.tsx │ └── tsconfig.json ├── biome.jsonc ├── logo.png ├── nx.json ├── overview.png ├── package.json ├── packages ├── dev-server │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── src │ │ ├── createServer.ts │ │ ├── index.ts │ │ ├── plugins │ │ │ ├── api │ │ │ │ ├── apiPlugin.ts │ │ │ │ └── index.ts │ │ │ ├── compiler │ │ │ │ ├── compilerPlugin.ts │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ ├── devtools │ │ │ │ ├── devtoolsPlugin.ts │ │ │ │ └── index.ts │ │ │ ├── favicon │ │ │ │ ├── faviconPlugin.ts │ │ │ │ └── index.ts │ │ │ ├── multipart │ │ │ │ ├── index.ts │ │ │ │ ├── multipartPlugin.ts │ │ │ │ └── types.ts │ │ │ ├── symbolicate │ │ │ │ ├── Symbolicator.ts │ │ │ │ ├── index.ts │ │ │ │ ├── sybmolicatePlugin.ts │ │ │ │ └── types.ts │ │ │ └── wss │ │ │ │ ├── WebSocketRouter.ts │ │ │ │ ├── WebSocketServer.ts │ │ │ │ ├── WebSocketServerAdapter.ts │ │ │ │ ├── index.ts │ │ │ │ ├── servers │ │ │ │ ├── WebSocketApiServer.ts │ │ │ │ ├── WebSocketDevClientServer.ts │ │ │ │ ├── WebSocketEventsServer.ts │ │ │ │ ├── WebSocketHMRServer.ts │ │ │ │ └── WebSocketMessageServer.ts │ │ │ │ ├── types.ts │ │ │ │ └── wssPlugin.ts │ │ ├── types.ts │ │ └── utils │ │ │ └── normalizeOptions.ts │ ├── static │ │ └── favicon.ico │ └── tsconfig.json ├── init │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── rslib.config.ts │ ├── src │ │ ├── bin.ts │ │ ├── index.ts │ │ ├── tasks │ │ │ ├── checkPackageManager.ts │ │ │ ├── checkProjectExists.ts │ │ │ ├── checkRepositoryExists.ts │ │ │ ├── collectProjectOptions.ts │ │ │ ├── completeSetup.ts │ │ │ ├── createBundlerConfig.ts │ │ │ ├── createNewProject.ts │ │ │ ├── modifyDependencies.ts │ │ │ ├── modifyIOS.ts │ │ │ ├── modifyReactNativeConfig.ts │ │ │ ├── setupGit.ts │ │ │ └── welcomeMessage.ts │ │ ├── types │ │ │ ├── pm.ts │ │ │ └── xcode.d.ts │ │ └── utils │ │ │ ├── error.ts │ │ │ ├── logger.ts │ │ │ ├── prompts.ts │ │ │ ├── spinner.ts │ │ │ └── validators.ts │ ├── tsconfig.json │ └── versions.json ├── plugin-expo-modules │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── plugin.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── plugin-nativewind │ ├── CHANGELOG.md │ ├── README.md │ ├── loader │ │ ├── index.d.ts │ │ └── index.js │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── loader.ts │ │ ├── plugin.ts │ │ └── utils.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── plugin-reanimated │ ├── CHANGELOG.md │ ├── README.md │ ├── loader │ │ ├── index.d.ts │ │ └── index.js │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── loader.ts │ │ ├── plugin.ts │ │ └── rules.ts │ ├── tsconfig.build.json │ └── tsconfig.json └── repack │ ├── .clang-format │ ├── CHANGELOG.md │ ├── README.md │ ├── android │ ├── CMakeLists.txt │ ├── build.gradle │ ├── gradle.properties │ └── src │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── AndroidManifestNew.xml │ │ ├── cpp │ │ │ ├── NativeScriptLoader.cpp │ │ │ ├── NativeScriptLoader.h │ │ │ └── OnLoad.cpp │ │ └── java │ │ │ └── com │ │ │ └── callstack │ │ │ └── repack │ │ │ ├── CodeSigningUtils.kt │ │ │ ├── FileSystemScriptLoader.kt │ │ │ ├── RemoteScriptLoader.kt │ │ │ ├── ScriptConfig.kt │ │ │ ├── ScriptLoadingError.kt │ │ │ ├── ScriptManagerModule.kt │ │ │ └── ScriptManagerPackage.kt │ │ ├── newarch │ │ └── ScriptManagerSpec.kt │ │ ├── oldarch │ │ └── ScriptManagerSpec.kt │ │ └── versioned │ │ └── CallInvoker │ │ ├── 73 │ │ └── com │ │ │ └── callstack │ │ │ └── repack │ │ │ └── NativeScriptLoader.kt │ │ └── latest │ │ └── com │ │ └── callstack │ │ └── repack │ │ └── NativeScriptLoader.kt │ ├── babel.config.js │ ├── callstack-repack.podspec │ ├── client │ ├── index.d.ts │ └── index.js │ ├── commands │ ├── rspack.d.ts │ ├── rspack.js │ ├── webpack.d.ts │ └── webpack.js │ ├── ios │ ├── CodeSigningErrors.swift │ ├── CodeSigningUtils.swift │ ├── ErrorCodes.h │ ├── ScriptConfig.h │ ├── ScriptConfig.mm │ ├── ScriptManager.h │ └── ScriptManager.mm │ ├── jest.config.js │ ├── jest.setup.js │ ├── mf │ ├── core-plugin.d.ts │ ├── core-plugin.js │ ├── prefetch-plugin.d.ts │ ├── prefetch-plugin.js │ ├── resolver-plugin.d.ts │ └── resolver-plugin.js │ ├── package.json │ ├── src │ ├── commands │ │ ├── common │ │ │ ├── __tests__ │ │ │ │ ├── getMimeType.test.ts │ │ │ │ ├── setupInteractions.test.ts │ │ │ │ └── setupStatsWriter.test.ts │ │ │ ├── adaptFilenameToPlatform.ts │ │ │ ├── cliError.ts │ │ │ ├── config │ │ │ │ ├── __tests__ │ │ │ │ │ ├── getEnvOptions.test.ts │ │ │ │ │ ├── loadProjectConfig.test.ts │ │ │ │ │ ├── makeCompilerConfig.test.ts │ │ │ │ │ └── normalizeConfig.test.ts │ │ │ │ ├── getCliOverrides.ts │ │ │ │ ├── getCommandConfig.ts │ │ │ │ ├── getConfigFilePath.ts │ │ │ │ ├── getEnvOptions.ts │ │ │ │ ├── getRepackConfig.ts │ │ │ │ ├── loadProjectConfig.ts │ │ │ │ ├── makeCompilerConfig.ts │ │ │ │ ├── normalizeConfig.ts │ │ │ │ └── validatePlugins.ts │ │ │ ├── getMimeType.ts │ │ │ ├── index.ts │ │ │ ├── logo.ts │ │ │ ├── parseFileUrl.ts │ │ │ ├── resetPersistentCache.ts │ │ │ ├── runAdbReverse.ts │ │ │ ├── setupEnvironment.ts │ │ │ ├── setupInteractions.ts │ │ │ └── setupStatsWriter.ts │ │ ├── consts.ts │ │ ├── options.ts │ │ ├── rspack │ │ │ ├── Compiler.ts │ │ │ ├── bundle.ts │ │ │ ├── index.ts │ │ │ ├── profile.ts │ │ │ ├── start.ts │ │ │ └── types.ts │ │ ├── types.ts │ │ └── webpack │ │ │ ├── Compiler.ts │ │ │ ├── CompilerWorker.ts │ │ │ ├── bundle.ts │ │ │ ├── index.ts │ │ │ ├── start.ts │ │ │ └── types.ts │ ├── env.ts │ ├── index.ts │ ├── loaders │ │ ├── assetsLoader │ │ │ ├── __tests__ │ │ │ │ ├── __fixtures__ │ │ │ │ │ ├── logo.android.png │ │ │ │ │ ├── logo.ios.png │ │ │ │ │ ├── logo.png │ │ │ │ │ ├── star@1x.png │ │ │ │ │ ├── star@2x.png │ │ │ │ │ └── star@3x.png │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── assetsLoader.test.ts.snap │ │ │ │ └── assetsLoader.test.ts │ │ │ ├── assetsLoader.ts │ │ │ ├── convertToRemoteAssets.ts │ │ │ ├── extractAssets.ts │ │ │ ├── index.ts │ │ │ ├── inlineAssets.ts │ │ │ ├── options.ts │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── flowLoader │ │ │ ├── flowLoader.ts │ │ │ ├── index.ts │ │ │ └── options.ts │ │ └── reactRefreshLoader │ │ │ ├── index.ts │ │ │ └── reactRefreshLoader.ts │ ├── logging │ │ ├── compose.ts │ │ ├── index.ts │ │ ├── makeLogEntryFromFastifyLog.ts │ │ ├── reporters │ │ │ ├── ConsoleReporter.ts │ │ │ └── FileReporter.ts │ │ └── types.ts │ ├── modules │ │ ├── DevServerClient.ts │ │ ├── EmptyModule.ts │ │ ├── FederationRuntimePlugins │ │ │ ├── CorePlugin.ts │ │ │ ├── PrefetchPlugin.ts │ │ │ ├── ResolverPlugin.ts │ │ │ └── __tests__ │ │ │ │ ├── CorePlugin.test.ts │ │ │ │ └── ResolverPlugin.test.ts │ │ ├── IncludeModules.ts │ │ ├── InitializeScriptManager.ts │ │ ├── ScriptManager │ │ │ ├── NativeScriptManager.ts │ │ │ ├── Script.ts │ │ │ ├── ScriptManager.ts │ │ │ ├── __tests__ │ │ │ │ ├── ScriptManager.test.ts │ │ │ │ └── ScriptManagerHooks.test.ts │ │ │ ├── federated.ts │ │ │ ├── getWebpackContext.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── WebpackHMRClient.ts │ │ ├── configurePublicPath.ts │ │ └── getDevServerLocation.ts │ ├── plugins │ │ ├── BabelPlugin.ts │ │ ├── CodeSigningPlugin │ │ │ ├── CodeSigningPlugin.ts │ │ │ ├── config.ts │ │ │ └── index.ts │ │ ├── DevelopmentPlugin.ts │ │ ├── HermesBytecodePlugin │ │ │ ├── ChunksToHermesBytecodePlugin.ts │ │ │ ├── HermesBytecodePlugin.ts │ │ │ ├── index.ts │ │ │ └── utils │ │ │ │ ├── composeSourceMaps.ts │ │ │ │ ├── getHermesCLIPath.ts │ │ │ │ ├── index.ts │ │ │ │ └── transformBundleToHermesBytecode.ts │ │ ├── LoggerPlugin.ts │ │ ├── ManifestPlugin.ts │ │ ├── ModuleFederationPlugin.ts │ │ ├── ModuleFederationPluginV1.ts │ │ ├── ModuleFederationPluginV2.ts │ │ ├── NativeEntryPlugin.ts │ │ ├── OutputPlugin │ │ │ ├── OutputPlugin.ts │ │ │ ├── config.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── RepackPlugin.ts │ │ ├── RepackTargetPlugin │ │ │ ├── GuardedRequireRuntimeModule.ts │ │ │ ├── InitRuntimeModule.ts │ │ │ ├── LoadScriptRuntimeModule.ts │ │ │ ├── RepackTargetPlugin.ts │ │ │ ├── implementation │ │ │ │ ├── guardedRequire.ts │ │ │ │ ├── init.ts │ │ │ │ └── loadScript.ts │ │ │ └── index.ts │ │ ├── SourceMapPlugin.ts │ │ ├── __tests__ │ │ │ ├── CodeSigningPlugin.test.ts │ │ │ ├── HermesBytecodePlugin.test.ts │ │ │ ├── ModuleFederationPluginV1.test.ts │ │ │ ├── ModuleFederationPluginV2.test.ts │ │ │ ├── OutputPlugin.test.ts │ │ │ └── __fixtures__ │ │ │ │ ├── example.chunk.bundle │ │ │ │ ├── example.container.bundle │ │ │ │ ├── local.chunk.bundle │ │ │ │ ├── main.bundle │ │ │ │ ├── testRS256.pem │ │ │ │ └── testRS256.pem.pub │ │ ├── index.ts │ │ └── utils │ │ │ ├── AssetsCopyProcessor.ts │ │ │ ├── AuxiliaryAssetsCopyProcessor.ts │ │ │ ├── ConfigurationError.ts │ │ │ ├── __tests__ │ │ │ ├── AssetsCopyProcessor.test.ts │ │ │ ├── AuxiliaryAssetsCopyProcessor.test.ts │ │ │ └── moveElementBefore.test.ts │ │ │ ├── isRspackCompiler.ts │ │ │ └── moveElementBefore.ts │ ├── types.ts │ ├── types │ │ ├── dev-server-options.d.ts │ │ ├── flow-remove-types.d.ts │ │ └── runtime-globals.d.ts │ └── utils │ │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── getAssetTransformRules.test.ts.snap │ │ ├── getAssetTransformRules.test.ts │ │ ├── getModulePaths.test.ts │ │ └── getResolveOptions.test.ts │ │ ├── assetExtensions.ts │ │ ├── federated.ts │ │ ├── getAssetTransformRules.ts │ │ ├── getCodegenTransformRules.ts │ │ ├── getDirname.ts │ │ ├── getFlowTransformRules.ts │ │ ├── getJsTransformRules.ts │ │ ├── getModulePaths.ts │ │ ├── getPublicPath.ts │ │ ├── getResolveOptions.ts │ │ ├── getSwcLoaderOptions.ts │ │ └── index.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── patches └── @rspress__plugin-llms@2.0.0-beta.3.patch ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── templates ├── rspack.config.cjs ├── rspack.config.mjs ├── webpack.config.cjs └── webpack.config.mjs ├── tests └── metro-compat │ ├── README.md │ ├── babel.config.js │ ├── jest.config.js │ ├── jest.setup.js │ ├── package.json │ ├── resolver │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── index-test.js.snap │ │ ├── assets-test.js │ │ ├── browser-spec-test.js │ │ ├── index-test.js │ │ ├── package-exports-test.js │ │ ├── package-imports-test.js │ │ ├── platform-extensions-test.js │ │ ├── symlinks-test.js │ │ └── utils.js │ ├── resolve-error.ts │ └── resolve.ts │ ├── tsconfig.json │ └── update-tests.js ├── tsconfig.base.json └── website ├── .gitignore ├── global.d.ts ├── package.json ├── rspress.config.ts ├── src ├── latest │ ├── 404.mdx │ ├── _meta.json │ ├── api │ │ ├── _meta.json │ │ ├── cli │ │ │ ├── _meta.json │ │ │ ├── bundle.mdx │ │ │ ├── init.mdx │ │ │ └── start.mdx │ │ ├── index.md │ │ ├── loaders │ │ │ ├── _meta.json │ │ │ ├── assets-loader.md │ │ │ ├── flow-loader.md │ │ │ └── react-refresh-loader.md │ │ ├── plugins │ │ │ ├── _meta.json │ │ │ ├── code-signing.md │ │ │ ├── hermes-bytecode.md │ │ │ ├── internal.md │ │ │ ├── module-federation-v1.mdx │ │ │ ├── module-federation-v2.mdx │ │ │ └── repack.md │ │ ├── runtime │ │ │ ├── _meta.json │ │ │ ├── script-manager.md │ │ │ └── script.md │ │ └── utils │ │ │ ├── _meta.json │ │ │ ├── constants.md │ │ │ ├── get-asset-extension-regexp.md │ │ │ ├── get-asset-transform-rules.md │ │ │ ├── get-codegen-transform-rules.md │ │ │ ├── get-dirname.md │ │ │ ├── get-flow-transform-rules.md │ │ │ ├── get-js-transform-rules.md │ │ │ ├── get-module-paths.md │ │ │ ├── get-resolve-options.md │ │ │ └── get-swc-loader-options.md │ ├── docs │ │ ├── _meta.json │ │ ├── features │ │ │ ├── _meta.json │ │ │ ├── code-splitting.md │ │ │ ├── dev-server.mdx │ │ │ ├── devtools.md │ │ │ ├── flow-support.md │ │ │ ├── module-federation.md │ │ │ ├── module-resolution.md │ │ │ └── reanimated.mdx │ │ ├── getting-started │ │ │ ├── _meta.json │ │ │ ├── bundlers.md │ │ │ ├── introduction.md │ │ │ ├── microfrontends.md │ │ │ └── quick-start.mdx │ │ ├── guides │ │ │ ├── _meta.json │ │ │ ├── bundle-analysis.mdx │ │ │ ├── configuration.mdx │ │ │ ├── debugging.md │ │ │ ├── deploy.mdx │ │ │ ├── expo-modules.mdx │ │ │ ├── inline-assets.md │ │ │ ├── remote-assets.md │ │ │ └── svg.md │ │ ├── migration-guides │ │ │ ├── _meta.json │ │ │ ├── metro.mdx │ │ │ ├── repack-v4.mdx │ │ │ └── rspack.mdx │ │ └── resources │ │ │ └── glossary.md │ ├── index.md │ ├── public │ │ └── img │ │ │ ├── asset-not-found.png │ │ │ ├── banner.svg │ │ │ ├── devtools-mf.png │ │ │ ├── devtools.png │ │ │ ├── favicon.ico │ │ │ ├── init.png │ │ │ ├── logo_dark.svg │ │ │ ├── logo_light.svg │ │ │ ├── mf_icon.svg │ │ │ ├── monolith_vs_mf.svg │ │ │ ├── og-image.png │ │ │ ├── repack-deploy-url.png │ │ │ ├── rspack_icon.svg │ │ │ ├── start.png │ │ │ └── webpack_icon.svg │ └── styles │ │ └── index.css ├── v2 │ ├── 404.mdx │ ├── _meta.json │ ├── api │ │ ├── _meta.json │ │ ├── about.md │ │ ├── node │ │ │ ├── _meta.json │ │ │ ├── classes │ │ │ │ ├── AssetsPlugin.md │ │ │ │ ├── AssetsResolverPlugin.md │ │ │ │ ├── BaseDevServer.md │ │ │ │ ├── DevServer.md │ │ │ │ ├── DevServerPlugin.md │ │ │ │ ├── DevServerProxy.md │ │ │ │ ├── JavaScriptLooseModePlugin.md │ │ │ │ ├── LoggerPlugin.md │ │ │ │ ├── OutputPlugin.md │ │ │ │ ├── Reporter.md │ │ │ │ ├── Symbolicator.md │ │ │ │ ├── TargetPlugin.md │ │ │ │ ├── WebSocketDebuggerServer.md │ │ │ │ ├── WebSocketDevClientServer.md │ │ │ │ ├── WebSocketEventsServer.md │ │ │ │ ├── WebSocketHMRServer.md │ │ │ │ ├── WebSocketMessageServer.md │ │ │ │ └── WebSocketServer.md │ │ │ ├── functions │ │ │ │ ├── bundle.md │ │ │ │ ├── getAssetExtensionsRegExp.md │ │ │ │ ├── getContext.md │ │ │ │ ├── getDevServerOptions.md │ │ │ │ ├── getEntry.md │ │ │ │ ├── getInitializationEntries.md │ │ │ │ ├── getMode.md │ │ │ │ ├── getPlatform.md │ │ │ │ ├── getPublicPath.md │ │ │ │ ├── getReactNativePath.md │ │ │ │ ├── getResolveOptions.md │ │ │ │ ├── isMinimizeEnabled.md │ │ │ │ └── start.md │ │ │ ├── index.md │ │ │ ├── interfaces │ │ │ │ ├── AssetsPluginConfig.md │ │ │ │ ├── AssetsResolverPluginConfig.md │ │ │ │ ├── BaseDevServerConfig.md │ │ │ │ ├── BundleArguments.md │ │ │ │ ├── CliOptions.md │ │ │ │ ├── CodeFrame.md │ │ │ │ ├── Command.md │ │ │ │ ├── CommonArguments.md │ │ │ │ ├── CompilerWorker.md │ │ │ │ ├── DevServerConfig.md │ │ │ │ ├── DevServerLoggerOptions.md │ │ │ │ ├── DevServerOptions.md │ │ │ │ ├── DevServerPluginConfig.md │ │ │ │ ├── DevServerProxyConfig.md │ │ │ │ ├── EventMessage.md │ │ │ │ ├── Fallback.md │ │ │ │ ├── GetPublicPathOptions.md │ │ │ │ ├── HMRMessage.md │ │ │ │ ├── HMRMessageBody.md │ │ │ │ ├── InitializationEntriesOptions.md │ │ │ │ ├── InputStackFrame.md │ │ │ │ ├── JavaScriptLooseModePluginConfig.md │ │ │ │ ├── LogEntry.md │ │ │ │ ├── LoggerPluginConfig.md │ │ │ │ ├── OutputPluginConfig.md │ │ │ │ ├── ReactNativeIdObject.md │ │ │ │ ├── ReactNativeMessage.md │ │ │ │ ├── ReactNativeStackFrame.md │ │ │ │ ├── ReporterConfig.md │ │ │ │ ├── StackFrame.md │ │ │ │ ├── StartArguments.md │ │ │ │ ├── SymbolicatorResults.md │ │ │ │ ├── WebSocketEventsServerConfig.md │ │ │ │ ├── WebSocketHMRServerConfig.md │ │ │ │ ├── WebpackOptions.md │ │ │ │ └── WebpackPlugin.md │ │ │ ├── types │ │ │ │ ├── DevServerReply.md │ │ │ │ ├── DevServerRequest.md │ │ │ │ ├── FastifyDevServer.md │ │ │ │ ├── GenericFilter.md │ │ │ │ ├── LogType.md │ │ │ │ ├── Mode.md │ │ │ │ ├── OnSendHookHandler.md │ │ │ │ ├── Rule.md │ │ │ │ └── WebpackLogger.md │ │ │ └── variables │ │ │ │ ├── ASSET_EXTENSIONS.md │ │ │ │ ├── DEFAULT_PORT.md │ │ │ │ └── SCALABLE_ASSETS.md │ │ └── react-native │ │ │ ├── _meta.json │ │ │ ├── classes │ │ │ ├── Chunk.md │ │ │ └── ChunkManager.md │ │ │ ├── index.md │ │ │ ├── interfaces │ │ │ ├── ChunkConfig.md │ │ │ ├── ChunkManagerConfig.md │ │ │ ├── RemoteChunkLocation.md │ │ │ └── StorageApi.md │ │ │ └── types │ │ │ └── RemoteChunkResolver.md │ ├── docs │ │ ├── _meta.json │ │ ├── about.md │ │ ├── code-splitting │ │ │ ├── _meta.json │ │ │ ├── caching-versioning.md │ │ │ ├── code-push.md │ │ │ ├── concepts.md │ │ │ ├── glossary.md │ │ │ ├── guide-async-chunks.md │ │ │ ├── react-navigation.md │ │ │ └── usage.md │ │ ├── configuration │ │ │ └── webpack-config.mdx │ │ ├── getting-started.mdx │ │ ├── guides │ │ │ └── svg.md │ │ ├── known-issues.md │ │ ├── loaders │ │ │ └── assets-loader.md │ │ └── migration-guides │ │ │ └── repack-v1-to-v2.mdx │ ├── index.md │ └── public │ │ ├── configs │ │ └── webpack.config │ │ ├── diffs │ │ ├── repack_v1-v2.diff │ │ ├── repack_v2-v3.diff │ │ ├── repack_v3-v4_cjs.diff │ │ └── repack_v3-v4_mjs.diff │ │ └── img │ │ ├── banner.svg │ │ ├── devtools-mf.png │ │ ├── devtools.png │ │ ├── favicon.ico │ │ ├── init.png │ │ ├── logo_dark.svg │ │ ├── logo_light.svg │ │ ├── monolith_vs_mf.svg │ │ ├── og-image.png │ │ └── start.png ├── v3 │ ├── 404.mdx │ ├── _meta.json │ ├── api │ │ ├── _meta.json │ │ ├── about.md │ │ ├── dev-server │ │ │ ├── _meta.json │ │ │ ├── enums │ │ │ │ └── Internal.EventTypes.md │ │ │ ├── functions │ │ │ │ └── createServer.md │ │ │ ├── index.md │ │ │ ├── interfaces │ │ │ │ ├── CodeFrame.md │ │ │ │ ├── CompilerDelegate.md │ │ │ │ ├── HmrDelegate.md │ │ │ │ ├── InputStackFrame.md │ │ │ │ ├── ProgressData.md │ │ │ │ ├── ReactNativeStackFrame.md │ │ │ │ ├── Server.Api.Asset.md │ │ │ │ ├── Server.Api.CompilationStats.md │ │ │ │ ├── Server.Api.Delegate.md │ │ │ │ ├── Server.Config.md │ │ │ │ ├── Server.Delegate.md │ │ │ │ ├── Server.DelegateContext.md │ │ │ │ ├── Server.LoggerDelegate.md │ │ │ │ ├── Server.MessagesDelegate.md │ │ │ │ ├── Server.Options.md │ │ │ │ ├── StackFrame.md │ │ │ │ ├── SymbolicatorDelegate.md │ │ │ │ └── SymbolicatorResults.md │ │ │ ├── modules │ │ │ │ ├── Internal.md │ │ │ │ ├── Server.Api.md │ │ │ │ └── Server.md │ │ │ └── types │ │ │ │ └── SendProgress.md │ │ └── repack │ │ │ ├── _meta.json │ │ │ ├── classes │ │ │ ├── ConsoleReporter.md │ │ │ ├── FileReporter.md │ │ │ ├── RepackPlugin.md │ │ │ ├── plugins.AssetsResolverPlugin.md │ │ │ ├── plugins.ChunksToHermesBytecodePlugin.md │ │ │ ├── plugins.CodeSigningPlugin.md │ │ │ ├── plugins.DevelopmentPlugin.md │ │ │ ├── plugins.JavaScriptLooseModePlugin.md │ │ │ ├── plugins.LoggerPlugin.md │ │ │ ├── plugins.ManifestPlugin.md │ │ │ ├── plugins.ModuleFederationPlugin.md │ │ │ ├── plugins.OutputPlugin.md │ │ │ ├── plugins.ReactRefreshPlugin.md │ │ │ └── plugins.RepackTargetPlugin.md │ │ │ ├── client │ │ │ ├── _meta.json │ │ │ ├── classes │ │ │ │ ├── Script.md │ │ │ │ └── ScriptManager.md │ │ │ ├── functions │ │ │ │ ├── Federated.createURLResolver.md │ │ │ │ ├── Federated.importModule.md │ │ │ │ └── getWebpackContext.md │ │ │ ├── index.md │ │ │ ├── interfaces │ │ │ │ ├── Federated.URLResolverConfig.md │ │ │ │ ├── NormalizedScriptLocator.md │ │ │ │ ├── ResolverOptions.md │ │ │ │ ├── ScriptLocator.md │ │ │ │ ├── StorageApi.md │ │ │ │ └── WebpackContext.md │ │ │ ├── modules │ │ │ │ └── Federated.md │ │ │ └── types │ │ │ │ ├── Federated.URLResolver.md │ │ │ │ └── ScriptLocatorResolver.md │ │ │ ├── functions │ │ │ ├── Federated.createRemote.md │ │ │ ├── adaptFilenameToPlatform.md │ │ │ ├── bundle.md │ │ │ ├── composeReporters.md │ │ │ ├── getAssetExtensionsRegExp.md │ │ │ ├── getDirname.md │ │ │ ├── getInitializationEntries.md │ │ │ ├── getPublicPath.md │ │ │ ├── getResolveOptions.md │ │ │ ├── getWebpackEnvOptions.md │ │ │ ├── makeLogEntryFromFastifyLog.md │ │ │ └── start.md │ │ │ ├── index.md │ │ │ ├── interfaces │ │ │ ├── BundleArguments.md │ │ │ ├── CliOptions.md │ │ │ ├── CommonArguments.md │ │ │ ├── ConsoleReporterConfig.md │ │ │ ├── DevServerOptions.md │ │ │ ├── Fallback.md │ │ │ ├── FileReporterConfig.md │ │ │ ├── GetPublicPathOptions.md │ │ │ ├── HMRMessage.md │ │ │ ├── HMRMessageBody.md │ │ │ ├── InitializationEntriesOptions.md │ │ │ ├── LogEntry.md │ │ │ ├── RepackPluginConfig.md │ │ │ ├── Reporter.md │ │ │ ├── StartArguments.md │ │ │ ├── WebpackEnvOptions.md │ │ │ ├── WebpackPlugin.md │ │ │ ├── plugins.AssetsResolverPluginConfig.md │ │ │ ├── plugins.CodeSigningPluginConfig.md │ │ │ ├── plugins.DevelopmentPluginConfig.md │ │ │ ├── plugins.JavaScriptLooseModePluginConfig.md │ │ │ ├── plugins.LoggerPluginConfig.md │ │ │ ├── plugins.ModuleFederationPluginConfig.md │ │ │ ├── plugins.OutputPluginConfig.md │ │ │ ├── plugins.ReactRefreshPluginConfig.md │ │ │ └── plugins.RepackTargetPluginConfig.md │ │ │ ├── modules │ │ │ ├── Federated.md │ │ │ └── plugins.md │ │ │ ├── types │ │ │ ├── LogType.md │ │ │ ├── Rule.md │ │ │ ├── WebpackLogger.md │ │ │ ├── plugins.DestinationConfig.md │ │ │ ├── plugins.DestinationMatchRules.md │ │ │ ├── plugins.DestinationSpec.md │ │ │ ├── plugins.GenericFilter.md │ │ │ ├── plugins.LocalDestinationConfig.md │ │ │ └── plugins.RemoteDestinationConfig.md │ │ │ └── variables │ │ │ ├── ASSET_EXTENSIONS.md │ │ │ ├── Federated.SHARED_REACT.md │ │ │ ├── Federated.SHARED_REACT_NATIVE.md │ │ │ └── SCALABLE_ASSETS.md │ ├── docs │ │ ├── _meta.json │ │ ├── about.md │ │ ├── cli-commands │ │ │ └── repack-init.md │ │ ├── code-splitting │ │ │ ├── _meta.json │ │ │ ├── caching-versioning.md │ │ │ ├── code-push.md │ │ │ ├── concept.md │ │ │ ├── glossary.md │ │ │ ├── guide-async-chunks.md │ │ │ ├── local-vs-remote-chunks.md │ │ │ ├── react-navigation.md │ │ │ └── usage.md │ │ ├── configuration │ │ │ ├── templates.mdx │ │ │ └── webpack-config.mdx │ │ ├── getting-started.mdx │ │ ├── guides │ │ │ ├── inline-assets.md │ │ │ ├── lazy-compilation.mdx │ │ │ ├── remote-assets.md │ │ │ └── svg.md │ │ ├── known-issues.md │ │ ├── loaders │ │ │ └── assets-loader.md │ │ ├── migration-guides │ │ │ ├── repack-v1-to-v2.mdx │ │ │ └── repack-v2-to-v3.mdx │ │ ├── module-federation.md │ │ ├── plugins │ │ │ └── chunks-to-hermes.mdx │ │ └── web-support.md │ ├── index.md │ └── public │ │ ├── configs │ │ └── webpack.config │ │ ├── diffs │ │ ├── repack_v1-v2.diff │ │ ├── repack_v2-v3.diff │ │ ├── repack_v3-v4_cjs.diff │ │ └── repack_v3-v4_mjs.diff │ │ └── img │ │ ├── banner.svg │ │ ├── devtools-mf.png │ │ ├── devtools.png │ │ ├── favicon.ico │ │ ├── init.png │ │ ├── logo_dark.svg │ │ ├── logo_light.svg │ │ ├── monolith_vs_mf.svg │ │ ├── og-image.png │ │ └── start.png └── v4 │ ├── 404.mdx │ ├── _meta.json │ ├── api │ ├── _meta.json │ ├── about.md │ ├── dev-server │ │ ├── _meta.json │ │ ├── enums │ │ │ └── Internal.EventTypes.md │ │ ├── functions │ │ │ └── createServer.md │ │ ├── index.md │ │ ├── interfaces │ │ │ ├── CodeFrame.md │ │ │ ├── CompilerDelegate.md │ │ │ ├── HmrDelegate.md │ │ │ ├── InputStackFrame.md │ │ │ ├── ProgressData.md │ │ │ ├── ReactNativeStackFrame.md │ │ │ ├── Server.Api.Asset.md │ │ │ ├── Server.Api.CompilationStats.md │ │ │ ├── Server.Api.Delegate.md │ │ │ ├── Server.Config.md │ │ │ ├── Server.Delegate.md │ │ │ ├── Server.DelegateContext.md │ │ │ ├── Server.LoggerDelegate.md │ │ │ ├── Server.MessagesDelegate.md │ │ │ ├── Server.Options.md │ │ │ ├── StackFrame.md │ │ │ ├── SymbolicatorDelegate.md │ │ │ └── SymbolicatorResults.md │ │ ├── modules │ │ │ ├── Internal.md │ │ │ ├── Server.Api.md │ │ │ └── Server.md │ │ └── types │ │ │ └── SendProgress.md │ └── repack │ │ ├── _meta.json │ │ ├── classes │ │ ├── ConsoleReporter.md │ │ ├── FileReporter.md │ │ ├── RepackPlugin.md │ │ ├── plugins.AssetsResolverPlugin.md │ │ ├── plugins.ChunksToHermesBytecodePlugin.md │ │ ├── plugins.CodeSigningPlugin.md │ │ ├── plugins.DevelopmentPlugin.md │ │ ├── plugins.JavaScriptLooseModePlugin.md │ │ ├── plugins.LoggerPlugin.md │ │ ├── plugins.ManifestPlugin.md │ │ ├── plugins.ModuleFederationPlugin.md │ │ ├── plugins.OutputPlugin.md │ │ ├── plugins.ReactRefreshPlugin.md │ │ └── plugins.RepackTargetPlugin.md │ │ ├── client │ │ ├── _meta.json │ │ ├── classes │ │ │ ├── Script.md │ │ │ └── ScriptManager.md │ │ ├── functions │ │ │ ├── Federated.createURLResolver.md │ │ │ ├── Federated.importModule.md │ │ │ └── getWebpackContext.md │ │ ├── index.md │ │ ├── interfaces │ │ │ ├── Federated.URLResolverConfig.md │ │ │ ├── NormalizedScriptLocator.md │ │ │ ├── ResolverOptions.md │ │ │ ├── ScriptLocator.md │ │ │ ├── StorageApi.md │ │ │ └── WebpackContext.md │ │ ├── modules │ │ │ └── Federated.md │ │ └── types │ │ │ ├── Federated.URLResolver.md │ │ │ └── ScriptLocatorResolver.md │ │ ├── functions │ │ ├── Federated.createRemote.md │ │ ├── adaptFilenameToPlatform.md │ │ ├── bundle.md │ │ ├── composeReporters.md │ │ ├── getAssetExtensionsRegExp.md │ │ ├── getDirname.md │ │ ├── getInitializationEntries.md │ │ ├── getPublicPath.md │ │ ├── getResolveOptions.md │ │ ├── getWebpackEnvOptions.md │ │ ├── makeLogEntryFromFastifyLog.md │ │ └── start.md │ │ ├── index.md │ │ ├── interfaces │ │ ├── BundleArguments.md │ │ ├── CliOptions.md │ │ ├── CommonArguments.md │ │ ├── ConsoleReporterConfig.md │ │ ├── DevServerOptions.md │ │ ├── Fallback.md │ │ ├── FileReporterConfig.md │ │ ├── GetPublicPathOptions.md │ │ ├── HMRMessage.md │ │ ├── HMRMessageBody.md │ │ ├── InitializationEntriesOptions.md │ │ ├── LogEntry.md │ │ ├── RepackPluginConfig.md │ │ ├── Reporter.md │ │ ├── StartArguments.md │ │ ├── WebpackEnvOptions.md │ │ ├── WebpackPlugin.md │ │ ├── plugins.AssetsResolverPluginConfig.md │ │ ├── plugins.CodeSigningPluginConfig.md │ │ ├── plugins.DevelopmentPluginConfig.md │ │ ├── plugins.JavaScriptLooseModePluginConfig.md │ │ ├── plugins.LoggerPluginConfig.md │ │ ├── plugins.ModuleFederationPluginConfig.md │ │ ├── plugins.OutputPluginConfig.md │ │ ├── plugins.ReactRefreshPluginConfig.md │ │ └── plugins.RepackTargetPluginConfig.md │ │ ├── modules │ │ ├── Federated.md │ │ └── plugins.md │ │ ├── types │ │ ├── LogType.md │ │ ├── Rule.md │ │ ├── WebpackLogger.md │ │ ├── plugins.DestinationConfig.md │ │ ├── plugins.DestinationMatchRules.md │ │ ├── plugins.DestinationSpec.md │ │ ├── plugins.GenericFilter.md │ │ ├── plugins.LocalDestinationConfig.md │ │ └── plugins.RemoteDestinationConfig.md │ │ └── variables │ │ ├── ASSET_EXTENSIONS.md │ │ ├── Federated.SHARED_REACT.md │ │ ├── Federated.SHARED_REACT_NATIVE.md │ │ └── SCALABLE_ASSETS.md │ ├── docs │ ├── _meta.json │ ├── about.md │ ├── cli-commands │ │ ├── _meta.json │ │ ├── bundle.md │ │ ├── repack-init.md │ │ └── start.md │ ├── code-splitting │ │ ├── _meta.json │ │ ├── caching-versioning.md │ │ ├── code-push.md │ │ ├── concept.md │ │ ├── glossary.md │ │ ├── guide-async-chunks.md │ │ ├── local-vs-remote-chunks.md │ │ ├── react-navigation.md │ │ └── usage.md │ ├── configuration │ │ ├── templates.mdx │ │ └── webpack-config.mdx │ ├── getting-started.mdx │ ├── guides │ │ ├── _meta.json │ │ ├── inline-assets.md │ │ ├── lazy-compilation.mdx │ │ ├── remote-assets.md │ │ └── svg.md │ ├── known-issues.md │ ├── loaders │ │ └── assets-loader.md │ ├── migration-guides │ │ ├── repack-v1-to-v2.mdx │ │ ├── repack-v2-to-v3.mdx │ │ └── repack-v3-to-v4.mdx │ ├── module-federation.md │ ├── plugins │ │ ├── _meta.json │ │ ├── chunks-to-hermes.md │ │ ├── code-signing.md │ │ └── index.md │ └── web-support.md │ ├── index.md │ └── public │ ├── configs │ └── webpack.config │ ├── diffs │ ├── repack_v1-v2.diff │ ├── repack_v2-v3.diff │ ├── repack_v3-v4_cjs.diff │ └── repack_v3-v4_mjs.diff │ └── img │ ├── banner.svg │ ├── devtools-mf.png │ ├── devtools.png │ ├── favicon.ico │ ├── init.png │ ├── logo_dark.svg │ ├── logo_light.svg │ ├── monolith_vs_mf.svg │ ├── og-image.png │ └── start.png ├── theme └── index.tsx ├── tsconfig.json └── vercel.json /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", 3 | "changelog": ["@changesets/changelog-github", { "repo": "callstack/repack" }], 4 | "commit": false, 5 | "fixed": [ 6 | [ 7 | "@callstack/repack", 8 | "@callstack/repack-dev-server", 9 | "@callstack/repack-init", 10 | "@callstack/repack-plugin-reanimated", 11 | "@callstack/repack-plugin-nativewind", 12 | "@callstack/repack-plugin-expo-modules" 13 | ] 14 | ], 15 | "linked": [], 16 | "access": "restricted", 17 | "baseBranch": "main", 18 | "updateInternalDependencies": "patch", 19 | "ignore": [ 20 | "tester-app", 21 | "tester-federation", 22 | "tester-federation-v2", 23 | "metro-compat-test", 24 | "website" 25 | ], 26 | "snapshot": { 27 | "useCalculatedVersion": true 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.changeset/mean-webs-travel.md: -------------------------------------------------------------------------------- 1 | --- 2 | "@callstack/repack-dev-server": patch 3 | --- 4 | 5 | Fix React Native DevTools not showing source maps for MF2 remotes 6 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | 7 | [*.{js,json,yml}] 8 | charset = utf-8 9 | indent_style = space 10 | indent_size = 2 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Questions & Discussions 4 | url: https://github.com/callstack/repack/discussions 5 | about: Use GitHub discussions for message-board style questions and discussions. 6 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | pnpm lint 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=false 2 | link-workspace-packages=true 3 | package-manager-strict=true 4 | package-manager-strict-version=false 5 | update-notifier=false 6 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["biomejs.biome"] 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Attach", 9 | "port": 9229, 10 | "request": "attach", 11 | "skipFiles": ["/**"], 12 | "type": "pwa-node" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /apps/tester-app/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /apps/tester-app/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby '>= 2.6.10' 5 | 6 | # Exclude problematic versions of cocoapods and activesupport that causes build failures. 7 | gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' 8 | gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' 9 | gem 'xcodeproj', '< 1.26.0' 10 | 11 | # Ruby 3.4.0 has removed some libraries from the standard library. 12 | gem 'bigdecimal' 13 | gem 'logger' 14 | gem 'benchmark' 15 | gem 'mutex_m' 16 | -------------------------------------------------------------------------------- /apps/tester-app/__tests__/configs/rspack.config.mjs: -------------------------------------------------------------------------------- 1 | import baseConfig from '../../rspack.config.mjs'; 2 | 3 | export default (env) => { 4 | const config = baseConfig(env); 5 | return { 6 | ...config, 7 | output: { 8 | ...config.output, 9 | path: process.env.TEST_WEBPACK_OUTPUT_DIR, 10 | }, 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /apps/tester-app/__tests__/configs/webpack.config.mjs: -------------------------------------------------------------------------------- 1 | export default async (env) => { 2 | const config = (await import('../../webpack.config.mjs')).default(env); 3 | return { 4 | ...config, 5 | cache: false, 6 | output: { 7 | ...config.output, 8 | path: process.env.TEST_WEBPACK_OUTPUT_DIR, 9 | }, 10 | experiments: { 11 | ...config.output.experiments, 12 | lazyCompilation: false, 13 | }, 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /apps/tester-app/android/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/android/debug.keystore -------------------------------------------------------------------------------- /apps/tester-app/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /apps/tester-app/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /apps/tester-app/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | mavenCentral() 5 | google() 6 | } 7 | } 8 | 9 | rootProject.name = "TesterApp" 10 | 11 | apply(from: { 12 | def searchDir = rootDir.toPath() 13 | do { 14 | def p = searchDir.resolve("node_modules/react-native-test-app/test-app.gradle") 15 | if (p.toFile().exists()) { 16 | return p.toRealPath().toString() 17 | } 18 | } while (searchDir = searchDir.getParent()) 19 | throw new GradleException("Could not find `react-native-test-app`"); 20 | }()) 21 | applyTestAppSettings(settings) 22 | -------------------------------------------------------------------------------- /apps/tester-app/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:@react-native/babel-preset'], 3 | comments: true, 4 | plugins: [ 5 | [ 6 | '@babel/plugin-transform-react-jsx', 7 | { 8 | runtime: 'automatic', 9 | importSource: 'nativewind', 10 | }, 11 | ], 12 | ], 13 | }; 14 | -------------------------------------------------------------------------------- /apps/tester-app/global.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | .custom-style-test { 6 | color: mediumpurple; 7 | } 8 | 9 | .calc-element { 10 | width: calc(var(--my-variable) - (20px + 2rem)); 11 | } 12 | 13 | :root { 14 | --H: 200; 15 | --S: 50%; 16 | --L: 40%; 17 | --color-values: purple; 18 | } 19 | 20 | .color-element { 21 | background-color: hsl( 22 | calc(var(--H) + 20), 23 | calc(var(--S) - 10%), 24 | calc(var(--L) + 30%) 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /apps/tester-app/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import { name as appName } from './app.json'; 3 | import App from './src/App'; 4 | 5 | // ScriptManager setup 6 | import './src/setup'; 7 | 8 | AppRegistry.registerComponent(appName, () => App); 9 | -------------------------------------------------------------------------------- /apps/tester-app/ios/Podfile: -------------------------------------------------------------------------------- 1 | ws_dir = Pathname.new(__dir__) 2 | ws_dir = ws_dir.parent until 3 | File.exist?("#{ws_dir}/node_modules/react-native-test-app/test_app.rb") || 4 | ws_dir.expand_path.to_s == '/' 5 | require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb" 6 | 7 | workspace 'TesterApp.xcworkspace' 8 | 9 | options = { 10 | :bridgeless_enabled => true, 11 | :fabric_enabled => true, 12 | :hermes_enabled => true, 13 | } 14 | 15 | use_test_app! options 16 | -------------------------------------------------------------------------------- /apps/tester-app/ios/TesterApp.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/tester-app/ios/TesterApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /apps/tester-app/nativewind-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | // NOTE: This file should not be edited and should be committed with your source code. It is generated by NativeWind. 4 | -------------------------------------------------------------------------------- /apps/tester-app/react-native.config.js: -------------------------------------------------------------------------------- 1 | const { configureProjects } = require('react-native-test-app'); 2 | 3 | const useWebpack = Boolean(process.env.USE_WEBPACK); 4 | 5 | module.exports = { 6 | project: configureProjects({ 7 | android: { 8 | sourceDir: 'android', 9 | }, 10 | ios: { 11 | sourceDir: 'ios', 12 | }, 13 | }), 14 | commands: useWebpack 15 | ? require('@callstack/repack/commands/webpack') 16 | : require('@callstack/repack/commands/rspack'), 17 | }; 18 | -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/AssetFrame.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | Image, 3 | type ImageSourcePropType, 4 | type ImageStyle, 5 | type StyleProp, 6 | StyleSheet, 7 | Text, 8 | View, 9 | } from 'react-native'; 10 | 11 | export function AssetFrame({ 12 | name, 13 | source, 14 | style, 15 | }: { 16 | name: string; 17 | source: ImageSourcePropType; 18 | style?: StyleProp; 19 | }) { 20 | return ( 21 | 22 | {name} 23 | 24 | {`Scale: x${Image.resolveAssetSource(source).scale}`} 25 | 26 | ); 27 | } 28 | 29 | const styles = StyleSheet.create({ 30 | container: { 31 | flex: 1, 32 | justifyContent: 'center', 33 | alignItems: 'center', 34 | }, 35 | }); 36 | -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/AssetsTestContainer.tsx: -------------------------------------------------------------------------------- 1 | import { StyleSheet, View } from 'react-native'; 2 | import { AssetFrame } from './AssetFrame'; 3 | 4 | export function AssetsTestContainer() { 5 | return ( 6 | 7 | 8 | 12 | 16 | 17 | ); 18 | } 19 | 20 | const styles = StyleSheet.create({ 21 | container: { 22 | flexDirection: 'row', 23 | paddingVertical: 20, 24 | }, 25 | }); 26 | -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/inlineAssets/webpack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/src/assetsTest/inlineAssets/webpack.png -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/inlineAssets/webpack@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/src/assetsTest/inlineAssets/webpack@2x.png -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/inlineAssets/webpack@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/src/assetsTest/inlineAssets/webpack@3x.png -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/localAssets/webpack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/src/assetsTest/localAssets/webpack.png -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/localAssets/webpack@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/src/assetsTest/localAssets/webpack@2x.png -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/localAssets/webpack@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/src/assetsTest/localAssets/webpack@3x.png -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/remoteAssets/webpack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/src/assetsTest/remoteAssets/webpack.png -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/remoteAssets/webpack@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/src/assetsTest/remoteAssets/webpack@2x.png -------------------------------------------------------------------------------- /apps/tester-app/src/assetsTest/remoteAssets/webpack@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/src/assetsTest/remoteAssets/webpack@3x.png -------------------------------------------------------------------------------- /apps/tester-app/src/asyncChunks/Async.local.tsx: -------------------------------------------------------------------------------- 1 | import { Text } from '../ui/Text'; 2 | 3 | export default function Async() { 4 | return Async: this text comes from async chunk; 5 | } 6 | -------------------------------------------------------------------------------- /apps/tester-app/src/asyncChunks/AsyncContainer.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react'; 2 | import { View } from 'react-native'; 3 | 4 | import { Text } from '../ui/Text'; 5 | 6 | const Async = React.lazy(() => import('./Async.local')); 7 | 8 | export function AsyncContainer() { 9 | const [value, setValue] = useState('not updated'); 10 | 11 | useEffect(() => { 12 | setTimeout(() => { 13 | setValue('updated'); 14 | }, 1000); 15 | }); 16 | 17 | return ( 18 | 19 | Async container status: {value} 20 | Loading...}> 21 | 22 | 23 | 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /apps/tester-app/src/global.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.png'; 2 | declare module '*.svg'; 3 | -------------------------------------------------------------------------------- /apps/tester-app/src/miniapp/MiniApp.tsx: -------------------------------------------------------------------------------- 1 | import { Image, StyleSheet, View } from 'react-native'; 2 | 3 | import { Text } from '../ui/Text'; 4 | 5 | import img from './callstack-dark.png'; 6 | 7 | export default function MiniApp() { 8 | return ( 9 | 10 | MiniApp: this text comes from MiniApp 11 | 16 | 17 | ); 18 | } 19 | 20 | const styles = StyleSheet.create({ 21 | container: { 22 | flex: 1, 23 | marginTop: 32, 24 | paddingBottom: 24, 25 | paddingHorizontal: 24, 26 | justifyContent: 'center', 27 | alignItems: 'center', 28 | }, 29 | image: { 30 | marginTop: 12, 31 | }, 32 | }); 33 | -------------------------------------------------------------------------------- /apps/tester-app/src/miniapp/callstack-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-app/src/miniapp/callstack-dark.png -------------------------------------------------------------------------------- /apps/tester-app/src/nativewind/Basic.tsx: -------------------------------------------------------------------------------- 1 | import { StyleSheet, Text, View } from 'react-native'; 2 | 3 | export default function Basic() { 4 | return ( 5 | 6 | Colored through CSS! 7 | 8 | ); 9 | } 10 | 11 | const styles = StyleSheet.create({ 12 | container: { 13 | flex: 1, 14 | alignItems: 'center', 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /apps/tester-app/src/nativewind/ComponentWithVariants.tsx: -------------------------------------------------------------------------------- 1 | import { Text } from 'react-native'; 2 | 3 | const variantStyles = { 4 | default: 'rounded', 5 | primary: 'bg-blue-500 text-white', 6 | secondary: 'bg-white-500 text-black', 7 | }; 8 | 9 | type Props = { 10 | variant: keyof typeof variantStyles; 11 | className?: string; 12 | } & React.ComponentProps; 13 | 14 | export default function ComponentWithVariants({ 15 | variant, 16 | className, 17 | ...props 18 | }: Props) { 19 | return ( 20 | 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /apps/tester-app/src/nativewind/CustomComponent.tsx: -------------------------------------------------------------------------------- 1 | import { Text } from 'react-native'; 2 | 3 | export default function CustomComponent({ className }: { className: string }) { 4 | const defaultStyles = 'p-2 text-black dark:text-white'; 5 | return ( 6 | 7 | I am a custom component 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /apps/tester-app/src/nativewind/DarkMode.tsx: -------------------------------------------------------------------------------- 1 | import { colorScheme } from 'nativewind'; 2 | import { Button } from 'react-native'; 3 | 4 | export default function DarkMode() { 5 | return ( 6 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /apps/tester-app/src/nativewind/ui/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from 'clsx'; 2 | import { twMerge } from 'tailwind-merge'; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | 8 | export function fixImports(rawfile: string) { 9 | return rawfile 10 | .replace('./typography', '~/components/ui/typography') 11 | .replace('./text', '~/components/ui/text') 12 | .replaceAll('../../components', '~/components') 13 | .replaceAll('../../lib', '~/lib'); 14 | } 15 | -------------------------------------------------------------------------------- /apps/tester-app/src/remoteChunks/Remote.tsx: -------------------------------------------------------------------------------- 1 | import { StyleSheet, View } from 'react-native'; 2 | 3 | import { Text } from '../ui/Text'; 4 | 5 | export default function Remote() { 6 | return ( 7 | 8 | Remote: this text comes from remote chunk 9 | 10 | ); 11 | } 12 | 13 | const styles = StyleSheet.create({ 14 | container: { 15 | justifyContent: 'center', 16 | alignItems: 'center', 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /apps/tester-app/src/ui/AppContainer.tsx: -------------------------------------------------------------------------------- 1 | import { SafeAreaView, ScrollView, StatusBar } from 'react-native'; 2 | 3 | import type { WithChildren } from './types'; 4 | import { getDefaultBackgroundStyle, useIsDarkMode } from './utils'; 5 | 6 | type AppContainerProps = WithChildren<{}>; 7 | 8 | export function AppContainer({ children }: AppContainerProps) { 9 | const isDarkMode = useIsDarkMode(); 10 | const backgroundStyle = getDefaultBackgroundStyle(isDarkMode); 11 | 12 | return ( 13 | 14 | 15 | 19 | {children} 20 | 21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /apps/tester-app/src/ui/Button.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | Button as RNButton, 3 | type ButtonProps as RNButtonProps, 4 | type StyleProp, 5 | StyleSheet, 6 | View, 7 | type ViewStyle, 8 | } from 'react-native'; 9 | 10 | type ButtonProps = RNButtonProps & { 11 | style?: StyleProp; 12 | }; 13 | 14 | export function Button({ title, disabled, onPress, style }: ButtonProps) { 15 | return ( 16 | 17 | 18 | 19 | ); 20 | } 21 | 22 | const styles = StyleSheet.create({ 23 | container: { 24 | marginVertical: 6, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /apps/tester-app/src/ui/SectionContainer.tsx: -------------------------------------------------------------------------------- 1 | import { View } from 'react-native'; 2 | import { Colors, Header } from 'react-native/Libraries/NewAppScreen'; 3 | 4 | import type { WithChildren } from './types'; 5 | import DeveloperActivitySvg from './undraw_Developer_activity_re_39tg.svg'; 6 | import { useIsDarkMode } from './utils'; 7 | 8 | type SectionContainerProps = WithChildren<{}>; 9 | 10 | export function SectionContainer({ children }: SectionContainerProps) { 11 | const isDarkMode = useIsDarkMode(); 12 | return ( 13 | <> 14 |
15 | 16 | 21 | {children} 22 | 23 | 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /apps/tester-app/src/ui/Text.tsx: -------------------------------------------------------------------------------- 1 | import { Text as RNText, type StyleProp, type TextStyle } from 'react-native'; 2 | import { Colors } from 'react-native/Libraries/NewAppScreen'; 3 | 4 | import type { WithChildren } from './types'; 5 | import { useIsDarkMode } from './utils'; 6 | 7 | type TextProps = WithChildren<{ 8 | colorLight?: string; 9 | colorDark?: string; 10 | style?: StyleProp; 11 | }>; 12 | 13 | export function Text({ colorLight, colorDark, children, style }: TextProps) { 14 | const isDarkMode = useIsDarkMode(); 15 | 16 | const colorInDarkMode = colorLight ?? Colors.lighter; 17 | const colorInLightMode = colorDark ?? Colors.darker; 18 | 19 | const color = isDarkMode ? colorInDarkMode : colorInLightMode; 20 | 21 | return {children}; 22 | } 23 | -------------------------------------------------------------------------------- /apps/tester-app/src/ui/types.ts: -------------------------------------------------------------------------------- 1 | export type WithChildren = React.PropsWithChildren; 2 | -------------------------------------------------------------------------------- /apps/tester-app/src/ui/utils.ts: -------------------------------------------------------------------------------- 1 | import { useColorScheme } from 'react-native'; 2 | import { Colors } from 'react-native/Libraries/NewAppScreen'; 3 | 4 | export const useIsDarkMode = () => useColorScheme() === 'dark'; 5 | 6 | export const getDefaultBackgroundStyle = (isDarkMode: boolean) => ({ 7 | backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, 8 | }); 9 | -------------------------------------------------------------------------------- /apps/tester-app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./src/**/*.{js,jsx,ts,tsx}'], 4 | presets: [require('nativewind/preset')], 5 | theme: { 6 | extend: { 7 | color: { 8 | custom: 'var(--my-custom-color)', 9 | primary: 'rgb(var(--color-values) / )', 10 | }, 11 | }, 12 | }, 13 | plugins: [ 14 | // Set a default value on the `:root` element 15 | ({ addBase }) => 16 | addBase({ 17 | ':root': { 18 | '--color-values': '255 0 0', 19 | '--color-rgb': 'rgb(255 0 0)', 20 | }, 21 | }), 22 | ], 23 | darkMode: 'class', 24 | }; 25 | -------------------------------------------------------------------------------- /apps/tester-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@react-native/typescript-config/tsconfig.json", 3 | "compilerOptions": { 4 | "module": "ES2022" // for dynamic imports & top-level await 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/tester-app/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config'; 2 | 3 | export default defineConfig({ 4 | test: {}, 5 | }); 6 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby '>= 2.6.10' 5 | 6 | # Exclude problematic versions of cocoapods and activesupport that causes build failures. 7 | gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' 8 | gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' 9 | gem 'xcodeproj', '< 1.26.0' 10 | 11 | # Ruby 3.4.0 has removed some libraries from the standard library. 12 | gem 'bigdecimal' 13 | gem 'logger' 14 | gem 'benchmark' 15 | gem 'mutex_m' 16 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/android/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-federation-v2/android/debug.keystore -------------------------------------------------------------------------------- /apps/tester-federation-v2/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-federation-v2/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /apps/tester-federation-v2/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | mavenCentral() 5 | google() 6 | } 7 | } 8 | 9 | rootProject.name = "ModuleFederationTesterV2" 10 | 11 | apply(from: { 12 | def searchDir = rootDir.toPath() 13 | do { 14 | def p = searchDir.resolve("node_modules/react-native-test-app/test-app.gradle") 15 | if (p.toFile().exists()) { 16 | return p.toRealPath().toString() 17 | } 18 | } while (searchDir = searchDir.getParent()) 19 | throw new GradleException("Could not find `react-native-test-app`"); 20 | }()) 21 | applyTestAppSettings(settings) 22 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/microsoft/react-native-test-app/trunk/schema.json", 3 | "name": "ModuleFederationTesterV2", 4 | "displayName": "ModuleFederationTesterV2", 5 | "singleApp": "host-app", 6 | "components": [ 7 | { 8 | "appKey": "HostApp", 9 | "displayName": "HostApp", 10 | "slug": "host-app" 11 | } 12 | ], 13 | "android": { 14 | "package": "com.tester.federationV2", 15 | "signingConfigs": { 16 | "debug": { 17 | "storeFile": "android/debug.keystore" 18 | }, 19 | "release": { 20 | "storeFile": "android/debug.keystore" 21 | } 22 | } 23 | }, 24 | "ios": { 25 | "bundleIdentifier": "com.tester.federationV2" 26 | }, 27 | "resources": { 28 | "android": [], 29 | "ios": [] 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:@react-native/babel-preset'], 3 | comments: true, 4 | }; 5 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/config.host-app.mjs: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | import { fileURLToPath } from 'node:url'; 3 | 4 | import rspackConfig from './configs/rspack.host-app.mjs'; 5 | import webpackConfig from './configs/webpack.host-app.mjs'; 6 | 7 | const __filename = fileURLToPath(import.meta.url); 8 | const __dirname = path.dirname(__filename); 9 | 10 | const useWebpack = Boolean(process.env.USE_WEBPACK); 11 | 12 | export default (env) => { 13 | env.context = __dirname; 14 | 15 | return useWebpack ? webpackConfig(env) : rspackConfig(env); 16 | }; 17 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/config.mini-app.mjs: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | import { fileURLToPath } from 'node:url'; 3 | 4 | import rspackConfig from './configs/rspack.mini-app.mjs'; 5 | import webpackConfig from './configs/webpack.mini-app.mjs'; 6 | 7 | const __filename = fileURLToPath(import.meta.url); 8 | const __dirname = path.dirname(__filename); 9 | 10 | const useWebpack = Boolean(process.env.USE_WEBPACK); 11 | 12 | export default (env) => { 13 | env.context = __dirname; 14 | 15 | return useWebpack ? webpackConfig(env) : rspackConfig(env); 16 | }; 17 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/ios/ModuleFederationTesterV2.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/ios/Podfile: -------------------------------------------------------------------------------- 1 | ws_dir = Pathname.new(__dir__) 2 | ws_dir = ws_dir.parent until 3 | File.exist?("#{ws_dir}/node_modules/react-native-test-app/test_app.rb") || 4 | ws_dir.expand_path.to_s == '/' 5 | require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb" 6 | 7 | workspace 'ModuleFederationTesterV2.xcworkspace' 8 | 9 | options = { 10 | :bridgeless_enabled => true, 11 | :fabric_enabled => true, 12 | :hermes_enabled => true, 13 | } 14 | 15 | use_test_app! options 16 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/react-native.config.js: -------------------------------------------------------------------------------- 1 | const { configureProjects } = require('react-native-test-app'); 2 | 3 | const useWebpack = Boolean(process.env.USE_WEBPACK); 4 | 5 | module.exports = { 6 | project: configureProjects({ 7 | android: { 8 | sourceDir: 'android', 9 | }, 10 | ios: { 11 | sourceDir: 'ios', 12 | }, 13 | }), 14 | commands: useWebpack 15 | ? require('@callstack/repack/commands/webpack') 16 | : require('@callstack/repack/commands/rspack'), 17 | }; 18 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/src/host/App.tsx: -------------------------------------------------------------------------------- 1 | import { NavigationContainer } from '@react-navigation/native'; 2 | import MainNavigator from './navigation/MainNavigator'; 3 | 4 | const App = () => { 5 | return ( 6 | 7 | 8 | 9 | ); 10 | }; 11 | 12 | export default App; 13 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/src/host/screens/DetailScreen.tsx: -------------------------------------------------------------------------------- 1 | import { StyleSheet, Text, View } from 'react-native'; 2 | 3 | const DetailScreen = () => { 4 | return ( 5 | 6 | DetailScreen 7 | 8 | ); 9 | }; 10 | 11 | const styles = StyleSheet.create({ 12 | container: { 13 | flex: 1, 14 | gap: 10, 15 | justifyContent: 'center', 16 | alignItems: 'center', 17 | }, 18 | label: { 19 | fontSize: 20, 20 | fontWeight: '700', 21 | }, 22 | }); 23 | 24 | export default DetailScreen; 25 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/src/host/screens/MiniAppScreen.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ActivityIndicator, StyleSheet, View } from 'react-native'; 3 | 4 | const MiniAppNavigator = React.lazy(() => import('MiniApp/MiniAppNavigator')); 5 | 6 | const FallbackComponent = () => ( 7 | 8 | 9 | 10 | ); 11 | 12 | const MiniAppScreen = () => { 13 | return ( 14 | }> 15 | 16 | 17 | ); 18 | }; 19 | 20 | const styles = StyleSheet.create({ 21 | container: { 22 | flex: 1, 23 | justifyContent: 'center', 24 | alignItems: 'center', 25 | }, 26 | }); 27 | 28 | export default MiniAppScreen; 29 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/src/mini/App.tsx: -------------------------------------------------------------------------------- 1 | import { NavigationContainer } from '@react-navigation/native'; 2 | import MainNavigator from './navigation/MainNavigator'; 3 | 4 | const MiniApp = () => { 5 | return ( 6 | 7 | 8 | 9 | ); 10 | }; 11 | 12 | export default MiniApp; 13 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/src/mini/assets/pic_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-federation-v2/src/mini/assets/pic_1.jpg -------------------------------------------------------------------------------- /apps/tester-federation-v2/src/mini/assets/pic_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-federation-v2/src/mini/assets/pic_2.jpg -------------------------------------------------------------------------------- /apps/tester-federation-v2/src/mini/assets/pic_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-federation-v2/src/mini/assets/pic_3.jpg -------------------------------------------------------------------------------- /apps/tester-federation-v2/src/mini/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | 3 | import App from './App'; 4 | 5 | // standalone MiniApp 6 | AppRegistry.registerComponent('MiniApp', () => App); 7 | -------------------------------------------------------------------------------- /apps/tester-federation-v2/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@react-native/typescript-config/tsconfig.json", 3 | "compilerOptions": { 4 | "module": "ES2020", // for dynamic imports 5 | "paths": { 6 | "*": ["./@mf-types/*"] 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/tester-federation/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /apps/tester-federation/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby '>= 2.6.10' 5 | 6 | # Exclude problematic versions of cocoapods and activesupport that causes build failures. 7 | gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' 8 | gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' 9 | gem 'xcodeproj', '< 1.26.0' 10 | 11 | # Ruby 3.4.0 has removed some libraries from the standard library. 12 | gem 'bigdecimal' 13 | gem 'logger' 14 | gem 'benchmark' 15 | gem 'mutex_m' 16 | -------------------------------------------------------------------------------- /apps/tester-federation/android/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-federation/android/debug.keystore -------------------------------------------------------------------------------- /apps/tester-federation/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-federation/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /apps/tester-federation/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /apps/tester-federation/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | mavenCentral() 5 | google() 6 | } 7 | } 8 | 9 | rootProject.name = "ModuleFederationTester" 10 | 11 | apply(from: { 12 | def searchDir = rootDir.toPath() 13 | do { 14 | def p = searchDir.resolve("node_modules/react-native-test-app/test-app.gradle") 15 | if (p.toFile().exists()) { 16 | return p.toRealPath().toString() 17 | } 18 | } while (searchDir = searchDir.getParent()) 19 | throw new GradleException("Could not find `react-native-test-app`"); 20 | }()) 21 | applyTestAppSettings(settings) 22 | -------------------------------------------------------------------------------- /apps/tester-federation/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/microsoft/react-native-test-app/trunk/schema.json", 3 | "name": "ModuleFederationTester", 4 | "displayName": "ModuleFederationTester", 5 | "singleApp": "host-app", 6 | "components": [ 7 | { 8 | "appKey": "HostApp", 9 | "displayName": "HostApp", 10 | "slug": "host-app" 11 | } 12 | ], 13 | "android": { 14 | "package": "com.tester.federation", 15 | "signingConfigs": { 16 | "debug": { 17 | "storeFile": "android/debug.keystore" 18 | }, 19 | "release": { 20 | "storeFile": "android/debug.keystore" 21 | } 22 | } 23 | }, 24 | "ios": { 25 | "bundleIdentifier": "com.tester.federation" 26 | }, 27 | "resources": { 28 | "android": [], 29 | "ios": [] 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /apps/tester-federation/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:@react-native/babel-preset'], 3 | comments: true, 4 | }; 5 | -------------------------------------------------------------------------------- /apps/tester-federation/config.host-app.mjs: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | import { fileURLToPath } from 'node:url'; 3 | 4 | import rspackConfig from './configs/rspack.host-app.mjs'; 5 | import webpackConfig from './configs/webpack.host-app.mjs'; 6 | 7 | const __filename = fileURLToPath(import.meta.url); 8 | const __dirname = path.dirname(__filename); 9 | 10 | const useWebpack = Boolean(process.env.USE_WEBPACK); 11 | 12 | export default (env) => { 13 | env.context = __dirname; 14 | 15 | return useWebpack ? webpackConfig(env) : rspackConfig(env); 16 | }; 17 | -------------------------------------------------------------------------------- /apps/tester-federation/config.mini-app.mjs: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | import { fileURLToPath } from 'node:url'; 3 | 4 | import rspackConfig from './configs/rspack.mini-app.mjs'; 5 | import webpackConfig from './configs/webpack.mini-app.mjs'; 6 | 7 | const __filename = fileURLToPath(import.meta.url); 8 | const __dirname = path.dirname(__filename); 9 | 10 | const useWebpack = Boolean(process.env.USE_WEBPACK); 11 | 12 | export default (env) => { 13 | env.context = __dirname; 14 | 15 | return useWebpack ? webpackConfig(env) : rspackConfig(env); 16 | }; 17 | -------------------------------------------------------------------------------- /apps/tester-federation/ios/ModuleFederationTester.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/tester-federation/ios/Podfile: -------------------------------------------------------------------------------- 1 | ws_dir = Pathname.new(__dir__) 2 | ws_dir = ws_dir.parent until 3 | File.exist?("#{ws_dir}/node_modules/react-native-test-app/test_app.rb") || 4 | ws_dir.expand_path.to_s == '/' 5 | require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb" 6 | 7 | workspace 'ModuleFederationTester.xcworkspace' 8 | 9 | options = { 10 | :bridgeless_enabled => true, 11 | :fabric_enabled => true, 12 | :hermes_enabled => true, 13 | } 14 | 15 | use_test_app! options 16 | -------------------------------------------------------------------------------- /apps/tester-federation/react-native.config.js: -------------------------------------------------------------------------------- 1 | const { configureProjects } = require('react-native-test-app'); 2 | 3 | const useWebpack = Boolean(process.env.USE_WEBPACK); 4 | 5 | module.exports = { 6 | project: configureProjects({ 7 | android: { 8 | sourceDir: 'android', 9 | }, 10 | ios: { 11 | sourceDir: 'ios', 12 | }, 13 | }), 14 | commands: useWebpack 15 | ? require('@callstack/repack/commands/webpack') 16 | : require('@callstack/repack/commands/rspack'), 17 | }; 18 | -------------------------------------------------------------------------------- /apps/tester-federation/src/host/App.tsx: -------------------------------------------------------------------------------- 1 | import { NavigationContainer } from '@react-navigation/native'; 2 | import MainNavigator from './navigation/MainNavigator'; 3 | 4 | const App = () => { 5 | return ( 6 | 7 | 8 | 9 | ); 10 | }; 11 | 12 | export default App; 13 | -------------------------------------------------------------------------------- /apps/tester-federation/src/host/index.js: -------------------------------------------------------------------------------- 1 | import { Federated, ScriptManager } from '@callstack/repack/client'; 2 | import AsyncStorage from '@react-native-async-storage/async-storage'; 3 | import { AppRegistry, Platform } from 'react-native'; 4 | 5 | import { components } from '../../app.json'; 6 | import App from './App'; 7 | 8 | ScriptManager.shared.setStorage(AsyncStorage); 9 | 10 | const resolveURL = Federated.createURLResolver({ 11 | containers: { MiniApp: 'http://localhost:8082/[name][ext]' }, 12 | }); 13 | 14 | ScriptManager.shared.addResolver(async (scriptId, caller) => { 15 | return { 16 | url: resolveURL(scriptId, caller), 17 | query: { platform: Platform.OS }, 18 | cache: process.env.MF_CACHE, 19 | }; 20 | }); 21 | 22 | AppRegistry.registerComponent(components[0].appKey, () => App); 23 | -------------------------------------------------------------------------------- /apps/tester-federation/src/host/screens/DetailScreen.tsx: -------------------------------------------------------------------------------- 1 | import { StyleSheet, Text, View } from 'react-native'; 2 | 3 | const DetailScreen = () => { 4 | return ( 5 | 6 | DetailScreen 7 | 8 | ); 9 | }; 10 | 11 | const styles = StyleSheet.create({ 12 | container: { 13 | flex: 1, 14 | gap: 10, 15 | justifyContent: 'center', 16 | alignItems: 'center', 17 | }, 18 | label: { 19 | fontSize: 20, 20 | fontWeight: '700', 21 | }, 22 | }); 23 | 24 | export default DetailScreen; 25 | -------------------------------------------------------------------------------- /apps/tester-federation/src/host/screens/MiniAppScreen.tsx: -------------------------------------------------------------------------------- 1 | import { Federated } from '@callstack/repack/client'; 2 | import React from 'react'; 3 | import { ActivityIndicator, StyleSheet, View } from 'react-native'; 4 | 5 | const MiniAppNavigator = React.lazy(() => 6 | Federated.importModule('MiniApp', './MiniAppNavigator') 7 | ); 8 | 9 | const FallbackComponent = () => ( 10 | 11 | 12 | 13 | ); 14 | 15 | const MiniAppScreen = () => { 16 | return ( 17 | }> 18 | 19 | 20 | ); 21 | }; 22 | 23 | const styles = StyleSheet.create({ 24 | container: { 25 | flex: 1, 26 | justifyContent: 'center', 27 | alignItems: 'center', 28 | }, 29 | }); 30 | 31 | export default MiniAppScreen; 32 | -------------------------------------------------------------------------------- /apps/tester-federation/src/mini/App.tsx: -------------------------------------------------------------------------------- 1 | import { NavigationContainer } from '@react-navigation/native'; 2 | import MainNavigator from './navigation/MainNavigator'; 3 | 4 | export default function App() { 5 | return ( 6 | 7 | 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /apps/tester-federation/src/mini/assets/pic_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-federation/src/mini/assets/pic_1.jpg -------------------------------------------------------------------------------- /apps/tester-federation/src/mini/assets/pic_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-federation/src/mini/assets/pic_2.jpg -------------------------------------------------------------------------------- /apps/tester-federation/src/mini/assets/pic_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/apps/tester-federation/src/mini/assets/pic_3.jpg -------------------------------------------------------------------------------- /apps/tester-federation/src/mini/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | 3 | import App from './App'; 4 | 5 | // standalone MiniApp 6 | AppRegistry.registerComponent('MiniApp', () => App); 7 | -------------------------------------------------------------------------------- /apps/tester-federation/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@react-native/typescript-config/tsconfig.json", 3 | "compilerOptions": { 4 | "module": "ES2020" // for dynamic imports 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/logo.png -------------------------------------------------------------------------------- /overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/overview.png -------------------------------------------------------------------------------- /packages/dev-server/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './createServer.js'; 2 | export * from './types.js'; 3 | -------------------------------------------------------------------------------- /packages/dev-server/src/plugins/api/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './apiPlugin.js'; 2 | -------------------------------------------------------------------------------- /packages/dev-server/src/plugins/compiler/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './compilerPlugin.js'; 2 | export * from './types.js'; 3 | -------------------------------------------------------------------------------- /packages/dev-server/src/plugins/devtools/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './devtoolsPlugin.js'; 2 | -------------------------------------------------------------------------------- /packages/dev-server/src/plugins/favicon/faviconPlugin.ts: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | import { fileURLToPath } from 'node:url'; 3 | import type { FastifyInstance } from 'fastify'; 4 | import fastifyFavicon from 'fastify-favicon'; 5 | import fastifyPlugin from 'fastify-plugin'; 6 | 7 | const dirname = path.dirname(fileURLToPath(import.meta.url)); 8 | const pathToImgDir = path.join(dirname, '../../../static'); 9 | 10 | async function faviconPlugin(instance: FastifyInstance) { 11 | instance.register(fastifyFavicon, { path: pathToImgDir }); 12 | } 13 | 14 | export default fastifyPlugin(faviconPlugin, { 15 | name: 'favicon-plugin', 16 | }); 17 | -------------------------------------------------------------------------------- /packages/dev-server/src/plugins/favicon/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './faviconPlugin.js'; 2 | -------------------------------------------------------------------------------- /packages/dev-server/src/plugins/multipart/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './multipartPlugin.js'; 2 | export * from './types.js'; 3 | -------------------------------------------------------------------------------- /packages/dev-server/src/plugins/multipart/types.ts: -------------------------------------------------------------------------------- 1 | import type { IncomingHttpHeaders } from 'node:http'; 2 | 3 | export interface MultipartHandler { 4 | writeChunk: ( 5 | headers: IncomingHttpHeaders, 6 | data: T, 7 | isLast?: boolean 8 | ) => void; 9 | setHeader: (name: string, value: string | string[] | undefined) => void; 10 | end: (data: T) => void; 11 | } 12 | 13 | declare module 'fastify' { 14 | interface FastifyReply { 15 | asMultipart: () => MultipartHandler | undefined; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/dev-server/src/plugins/symbolicate/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './sybmolicatePlugin.js'; 2 | export * from './Symbolicator.js'; 3 | export * from './types.js'; 4 | -------------------------------------------------------------------------------- /packages/dev-server/src/plugins/wss/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './wssPlugin.js'; 2 | export * from './WebSocketServer.js'; 3 | export * from './types.js'; 4 | -------------------------------------------------------------------------------- /packages/dev-server/src/plugins/wss/types.ts: -------------------------------------------------------------------------------- 1 | import type { IncomingMessage } from 'node:http'; 2 | import type { Socket } from 'node:net'; 3 | import type { ServerOptions } from 'ws'; 4 | 5 | export interface WebSocketServerInterface { 6 | shouldUpgrade(pathname: string): boolean; 7 | upgrade(request: IncomingMessage, socket: Socket, head: Buffer): void; 8 | } 9 | 10 | export type WebSocketServerOptions = { 11 | name: string; 12 | path: string | string[]; 13 | wss?: Omit; 14 | }; 15 | -------------------------------------------------------------------------------- /packages/dev-server/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/packages/dev-server/static/favicon.ico -------------------------------------------------------------------------------- /packages/dev-server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "dist" 6 | }, 7 | "include": ["src/**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/init/rslib.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from '@rslib/core'; 2 | 3 | export default defineConfig({ 4 | lib: [ 5 | { 6 | format: 'esm', 7 | syntax: 'es2021', 8 | dts: false, 9 | source: { 10 | entry: { 11 | bin: 'src/bin.ts', 12 | }, 13 | }, 14 | output: { 15 | minify: true, 16 | }, 17 | }, 18 | ], 19 | }); 20 | -------------------------------------------------------------------------------- /packages/init/src/tasks/checkRepositoryExists.ts: -------------------------------------------------------------------------------- 1 | import { findRoot } from '@manypkg/find-root'; 2 | import logger from '../utils/logger.js'; 3 | 4 | /** 5 | * Checks if the repository exists 6 | * 7 | * @param cwd current working directory 8 | * @returns repository root directory if it exists, undefined otherwise 9 | */ 10 | export default async function checkRepositoryExists( 11 | cwd: string 12 | ): Promise { 13 | try { 14 | const { rootDir } = await findRoot(cwd); 15 | logger.info(`Found root of the repository at ${rootDir}`); 16 | return rootDir; 17 | } catch { 18 | logger.info('No repository found'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/init/src/tasks/completeSetup.ts: -------------------------------------------------------------------------------- 1 | import { note, outro } from '@clack/prompts'; 2 | import chalk from 'chalk'; 3 | import dedent from 'dedent'; 4 | import type { PackageManager } from '../types/pm.js'; 5 | 6 | export default function completeSetup( 7 | projectName: string, 8 | packageManager: PackageManager, 9 | projectExists: boolean 10 | ) { 11 | const nextSteps = dedent` 12 | ${projectExists ? '' : `cd ${projectName}`} 13 | ${packageManager.runCommand} install 14 | ${packageManager.runCommand} start 15 | 16 | ${chalk.blue('[ios]')} 17 | ${packageManager.dlxCommand} pod-install 18 | ${packageManager.runCommand} run ios 19 | 20 | ${chalk.green('[android]')} 21 | ${packageManager.runCommand} run android 22 | `; 23 | 24 | note(nextSteps, 'Next steps'); 25 | outro('Done.'); 26 | } 27 | -------------------------------------------------------------------------------- /packages/init/src/tasks/welcomeMessage.ts: -------------------------------------------------------------------------------- 1 | import { log } from '@clack/prompts'; 2 | import dedent from 'dedent'; 3 | import gradient from 'gradient-string'; 4 | 5 | const logo = dedent` 6 | ▄▀▀▀ ▀▀▀▀ █▀▀█ █▀▀█ ▄▀▀▀ █ █ 7 | █ ▀▀▀▀ █▀▀▀ █▀▀█ █ █▀▀▄ 8 | ▀ ▀▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀ ▀ ▀ 9 | `; 10 | 11 | export default function welcomeMessage() { 12 | log.message( 13 | gradient([ 14 | { color: '#9b6dff', pos: 0.45 }, 15 | { color: '#3ce4cb', pos: 0.9 }, 16 | ]).multiline(logo) 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /packages/init/src/types/pm.ts: -------------------------------------------------------------------------------- 1 | export type PM = 'npm' | 'yarn' | 'pnpm' | 'bun'; 2 | 3 | export interface PackageManager { 4 | name: PM; 5 | runCommand: string; 6 | dlxCommand: string; 7 | } 8 | -------------------------------------------------------------------------------- /packages/init/src/utils/error.ts: -------------------------------------------------------------------------------- 1 | export class RepackInitError extends Error { 2 | constructor(message: string) { 3 | super(message); 4 | this.name = 'RepackInitError'; 5 | this.stack = undefined; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/init/src/utils/logger.ts: -------------------------------------------------------------------------------- 1 | import { log } from '@clack/prompts'; 2 | 3 | let verbose = false; 4 | 5 | type LogFn = (message: string) => void; 6 | 7 | const verboseWrapper = (logFn: LogFn) => { 8 | return (message: string) => (verbose ? logFn(message) : undefined); 9 | }; 10 | 11 | const logger = { 12 | error: verboseWrapper(log.error), 13 | info: verboseWrapper(log.info), 14 | success: verboseWrapper(log.success), 15 | warn: verboseWrapper(log.warn), 16 | // always log fatal errors 17 | fatal: log.error, 18 | }; 19 | 20 | export default logger; 21 | 22 | export function enableVerboseLogging() { 23 | verbose = true; 24 | } 25 | -------------------------------------------------------------------------------- /packages/init/src/utils/prompts.ts: -------------------------------------------------------------------------------- 1 | import { cancel, isCancel } from '@clack/prompts'; 2 | 3 | export function cancelPromptAndExit(message?: string) { 4 | cancel(message ?? 'Operation cancelled.'); 5 | process.exit(0); 6 | } 7 | 8 | export function checkCancelPrompt(value: unknown) { 9 | if (isCancel(value)) { 10 | cancelPromptAndExit(); 11 | } 12 | 13 | return value as T; 14 | } 15 | -------------------------------------------------------------------------------- /packages/init/src/utils/spinner.ts: -------------------------------------------------------------------------------- 1 | import { spinner } from '@clack/prompts'; 2 | 3 | const instance = spinner(); 4 | 5 | export default instance; 6 | -------------------------------------------------------------------------------- /packages/init/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "dist" 6 | }, 7 | "include": ["src/**/*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/init/versions.json: -------------------------------------------------------------------------------- 1 | { 2 | "rspack": { 3 | "@rspack/core": "^1.3.4", 4 | "@swc/helpers": "^0.5.17" 5 | }, 6 | "webpack": { 7 | "terser-webpack-plugin": "^5.3.14", 8 | "webpack": "^5.99.5" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/plugin-expo-modules/src/index.ts: -------------------------------------------------------------------------------- 1 | export { ExpoModulesPlugin } from './plugin.js'; 2 | -------------------------------------------------------------------------------- /packages/plugin-expo-modules/src/plugin.ts: -------------------------------------------------------------------------------- 1 | import type { Compiler, RspackPluginInstance } from '@rspack/core'; 2 | 3 | interface ExpoModulesPluginOptions { 4 | /** 5 | * Target application platform (e.g. `ios`, `android`). 6 | * 7 | * By default, the platform is inferred from `compiler.options.name` which is set by Re.Pack. 8 | */ 9 | platform?: string; 10 | } 11 | 12 | export class ExpoModulesPlugin implements RspackPluginInstance { 13 | constructor(private options: ExpoModulesPluginOptions = {}) {} 14 | 15 | apply(compiler: Compiler) { 16 | const platform = this.options.platform ?? (compiler.options.name as string); 17 | 18 | // expo modules expect this to be defined in runtime 19 | new compiler.webpack.DefinePlugin({ 20 | 'process.env.EXPO_OS': JSON.stringify(platform), 21 | }).apply(compiler); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/plugin-expo-modules/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "paths": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/plugin-expo-modules/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDirs": ["src", "../repack/src", "../dev-server/src"], 6 | "paths": { 7 | "@callstack/repack": ["../repack/src/index.ts"], 8 | "@callstack/repack/*": ["../repack/src/*"], 9 | "@callstack/repack-dev-server": ["../dev-server/src/index.ts"], 10 | "@callstack/repack-dev-server/*": ["../dev-server/src/*"] 11 | } 12 | }, 13 | "include": ["src/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/plugin-nativewind/loader/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from '../dist/loader.js'; 2 | -------------------------------------------------------------------------------- /packages/plugin-nativewind/loader/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../dist/loader.js'); 2 | -------------------------------------------------------------------------------- /packages/plugin-nativewind/src/index.ts: -------------------------------------------------------------------------------- 1 | export { NativeWindPlugin } from './plugin.js'; 2 | -------------------------------------------------------------------------------- /packages/plugin-nativewind/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "paths": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/plugin-nativewind/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDirs": ["src", "../repack/src", "../dev-server/src"], 6 | "paths": { 7 | "@callstack/repack": ["../repack/src/index.ts"], 8 | "@callstack/repack/*": ["../repack/src/*"], 9 | "@callstack/repack-dev-server": ["../dev-server/src/index.ts"], 10 | "@callstack/repack-dev-server/*": ["../dev-server/src/*"] 11 | } 12 | }, 13 | "include": ["src/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/plugin-reanimated/loader/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from '../dist/loader.js'; 2 | export { default } from '../dist/loader.js'; 3 | -------------------------------------------------------------------------------- /packages/plugin-reanimated/loader/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../dist/loader.js'); 2 | -------------------------------------------------------------------------------- /packages/plugin-reanimated/src/index.ts: -------------------------------------------------------------------------------- 1 | export { ReanimatedPlugin } from './plugin.js'; 2 | export { reanimatedModuleRules } from './rules.js'; 3 | -------------------------------------------------------------------------------- /packages/plugin-reanimated/src/plugin.ts: -------------------------------------------------------------------------------- 1 | import type { Compiler, RspackPluginInstance } from '@rspack/core'; 2 | import { reanimatedModuleRules } from './rules.js'; 3 | 4 | export class ReanimatedPlugin implements RspackPluginInstance { 5 | apply(compiler: Compiler) { 6 | // add rules for transpiling wih reanimated loader 7 | compiler.options.module.rules.push(reanimatedModuleRules); 8 | 9 | // ignore the 'setUpTests' warning from reanimated which is not relevant 10 | compiler.options.ignoreWarnings = compiler.options.ignoreWarnings ?? []; 11 | compiler.options.ignoreWarnings.push((warning) => 12 | /'`setUpTests` is available only in Jest environment\.'/.test( 13 | warning.message 14 | ) 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/plugin-reanimated/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "paths": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/plugin-reanimated/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDirs": ["src", "../repack/src", "../dev-server/src"], 6 | "types": ["../repack/src/types/dev-server-options.d.ts"], 7 | "paths": { 8 | "@callstack/repack": ["../repack/src/index.ts"], 9 | "@callstack/repack/*": ["../repack/src/*"], 10 | "@callstack/repack-dev-server": ["../dev-server/src/index.ts"], 11 | "@callstack/repack-dev-server/*": ["../dev-server/src/*"] 12 | } 13 | }, 14 | "include": ["src/**/*"] 15 | } 16 | -------------------------------------------------------------------------------- /packages/repack/android/gradle.properties: -------------------------------------------------------------------------------- 1 | RePack_kotlinVersion=1.7.0 2 | RePack_compileSdkVersion=29 3 | RePack_targetSdkVersion=29 4 | RePack_minSdkVersion=24 5 | -------------------------------------------------------------------------------- /packages/repack/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /packages/repack/android/src/main/AndroidManifestNew.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/repack/android/src/main/cpp/OnLoad.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "NativeScriptLoader.h" 3 | 4 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { 5 | return facebook::jni::initialize(vm, [] { NativeScriptLoader::registerNatives(); }); 6 | } 7 | -------------------------------------------------------------------------------- /packages/repack/android/src/main/java/com/callstack/repack/ScriptLoadingError.kt: -------------------------------------------------------------------------------- 1 | package com.callstack.repack 2 | 3 | enum class ScriptLoadingError(val code: String) { 4 | UnsupportedScheme("UnsupportedScheme"), 5 | NetworkFailure("NetworkFailure"), 6 | RequestFailure("RequestFailure"), 7 | ScriptEvalFailure("ScriptEvalFailure"), 8 | ScriptInvalidationFailure("ScriptInvalidationFailure"), 9 | ScriptCachingFailure("ScriptCachingFailure"), 10 | } 11 | -------------------------------------------------------------------------------- /packages/repack/android/src/newarch/ScriptManagerSpec.kt: -------------------------------------------------------------------------------- 1 | package com.callstack.repack 2 | 3 | import com.facebook.fbreact.specs.NativeScriptManagerSpec 4 | import com.facebook.react.bridge.ReactApplicationContext 5 | 6 | abstract class ScriptManagerSpec internal constructor(context: ReactApplicationContext) : NativeScriptManagerSpec(context) { 7 | } 8 | -------------------------------------------------------------------------------- /packages/repack/android/src/oldarch/ScriptManagerSpec.kt: -------------------------------------------------------------------------------- 1 | package com.callstack.repack 2 | 3 | import com.facebook.react.bridge.ReactApplicationContext 4 | import com.facebook.react.bridge.ReactContextBaseJavaModule 5 | import com.facebook.react.bridge.Promise 6 | import com.facebook.react.bridge.ReadableArray 7 | import com.facebook.react.bridge.ReadableMap 8 | 9 | abstract class ScriptManagerSpec internal constructor(context: ReactApplicationContext) : 10 | ReactContextBaseJavaModule(context) { 11 | abstract fun loadScript(scriptId: String, configMap: ReadableMap, promise: Promise) 12 | abstract fun prefetchScript(scriptId: String, configMap: ReadableMap, promise: Promise) 13 | abstract fun invalidateScripts(scriptIds: ReadableArray, promise: Promise) 14 | abstract fun unstable_evaluateScript(scriptSource: String, scriptSourceUrl: String): Boolean 15 | } 16 | -------------------------------------------------------------------------------- /packages/repack/client/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from '../dist/modules/ScriptManager/index.js'; 2 | -------------------------------------------------------------------------------- /packages/repack/client/index.js: -------------------------------------------------------------------------------- 1 | export * from '../dist/modules/ScriptManager/index.js'; 2 | -------------------------------------------------------------------------------- /packages/repack/commands/rspack.d.ts: -------------------------------------------------------------------------------- 1 | import commands from '../dist/commands/rspack/index.js'; 2 | export = commands; 3 | -------------------------------------------------------------------------------- /packages/repack/commands/rspack.js: -------------------------------------------------------------------------------- 1 | const commands = require('../dist/commands/rspack/index.js'); 2 | module.exports = commands.default; 3 | -------------------------------------------------------------------------------- /packages/repack/commands/webpack.d.ts: -------------------------------------------------------------------------------- 1 | import commands from '../dist/commands/webpack/index.js'; 2 | export = commands; 3 | -------------------------------------------------------------------------------- /packages/repack/commands/webpack.js: -------------------------------------------------------------------------------- 1 | const commands = require('../dist/commands/webpack/index.js'); 2 | module.exports = commands.default; 3 | -------------------------------------------------------------------------------- /packages/repack/ios/ErrorCodes.h: -------------------------------------------------------------------------------- 1 | #ifndef ErrorCodes_h 2 | #define ErrorCodes_h 3 | 4 | typedef NSString *ScriptManagerError NS_TYPED_ENUM; 5 | extern ScriptManagerError const CodeExecutionFailure = @"CodeExecutionFailure"; 6 | extern ScriptManagerError const InvalidationFailure = @"InvalidationFailure"; 7 | extern ScriptManagerError const ScriptDownloadFailure = @"ScriptDownloadFailure"; 8 | extern ScriptManagerError const UnsupportedScheme = @"UnsupportedScheme"; 9 | extern ScriptManagerError const ScriptConfigError = @"ScriptConfigError"; 10 | extern ScriptManagerError const RuntimeUnavailableError = @"RuntimeUnavailableError"; 11 | extern ScriptManagerError const CallInvokerUnavailableError = @"CallInvokerUnavailableError"; 12 | 13 | #endif /* ErrorCodes_h */ 14 | -------------------------------------------------------------------------------- /packages/repack/ios/ScriptManager.h: -------------------------------------------------------------------------------- 1 | #ifdef RCT_NEW_ARCH_ENABLED 2 | #import "RNScriptManagerSpec.h" 3 | 4 | @interface ScriptManager : NSObject 5 | #else 6 | #import 7 | 8 | @interface ScriptManager : NSObject 9 | #endif 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /packages/repack/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | clearMocks: true, 3 | moduleNameMapper: { 4 | '^(\\.{1,2}/.*)\\.js$': '$1', 5 | }, 6 | setupFiles: ['./jest.setup.js'], 7 | testEnvironment: 'node', 8 | testMatch: ['**/__tests__/**/*.ts?(x)'], 9 | }; 10 | -------------------------------------------------------------------------------- /packages/repack/jest.setup.js: -------------------------------------------------------------------------------- 1 | global.__DEV__ = false; 2 | 3 | // Increase the number of listeners to avoid MaxListenersExceededWarning 4 | // caused by RspackVirtualModulesPlugin 5 | // https://github.com/rspack-contrib/rspack-plugin-virtual-module/blob/827e9cbbf1e23eff4f0cd5b01fb2f3f319fce8f9/src/index.ts#L58 6 | process.setMaxListeners(100); 7 | -------------------------------------------------------------------------------- /packages/repack/mf/core-plugin.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from '../dist/modules/FederationRuntimePlugins/CorePlugin.js'; 2 | -------------------------------------------------------------------------------- /packages/repack/mf/core-plugin.js: -------------------------------------------------------------------------------- 1 | export { default } from '../dist/modules/FederationRuntimePlugins/CorePlugin.js'; 2 | -------------------------------------------------------------------------------- /packages/repack/mf/prefetch-plugin.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from '../dist/modules/FederationRuntimePlugins/PrefetchPlugin.js'; 2 | -------------------------------------------------------------------------------- /packages/repack/mf/prefetch-plugin.js: -------------------------------------------------------------------------------- 1 | export { default } from '../dist/modules/FederationRuntimePlugins/PrefetchPlugin.js'; 2 | -------------------------------------------------------------------------------- /packages/repack/mf/resolver-plugin.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from '../dist/modules/FederationRuntimePlugins/ResolverPlugin.js'; 2 | -------------------------------------------------------------------------------- /packages/repack/mf/resolver-plugin.js: -------------------------------------------------------------------------------- 1 | export { default } from '../dist/modules/FederationRuntimePlugins/ResolverPlugin.js'; 2 | -------------------------------------------------------------------------------- /packages/repack/src/commands/common/__tests__/getMimeType.test.ts: -------------------------------------------------------------------------------- 1 | import { getMimeType } from '../getMimeType.js'; 2 | 3 | describe('getMimeType', () => { 4 | it('should return correct MIME types for various file extensions', () => { 5 | expect(getMimeType('script.js')).toBe('application/javascript'); 6 | expect(getMimeType('main.bundle')).toBe('application/javascript'); 7 | expect(getMimeType('main.bundle.map')).toBe('application/json'); 8 | expect(getMimeType('hot-update.js')).toBe('application/javascript'); 9 | expect(getMimeType('image.png')).toBe('image/png'); 10 | expect(getMimeType('unknownfile.unknown')).toBe('text/plain'); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/repack/src/commands/common/adaptFilenameToPlatform.ts: -------------------------------------------------------------------------------- 1 | import os from 'node:os'; 2 | 3 | const isWindows = os.platform() === 'win32'; 4 | 5 | export const adaptFilenameToPlatform = (filename: string) => { 6 | if (isWindows) { 7 | return filename.replace(/\\/g, '/'); 8 | } 9 | return filename; 10 | }; 11 | -------------------------------------------------------------------------------- /packages/repack/src/commands/common/cliError.ts: -------------------------------------------------------------------------------- 1 | import { VERBOSE_ENV_KEY } from '../../env.js'; 2 | 3 | export class CLIError extends Error { 4 | constructor(message: string) { 5 | super(message); 6 | this.name = 'CLIError'; 7 | 8 | // hide stack trace in non-verbose mode 9 | if (!process.env[VERBOSE_ENV_KEY]) { 10 | this.stack = undefined; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/repack/src/commands/common/config/getRepackConfig.ts: -------------------------------------------------------------------------------- 1 | export function getRepackConfig() { 2 | return { 3 | devtool: 'source-map', 4 | output: { 5 | clean: true, 6 | hashFunction: 'xxhash64', 7 | filename: 'index.bundle', 8 | chunkFilename: '[name].chunk.bundle', 9 | path: '[context]/build/generated/[platform]', 10 | publicPath: 'noop:///', 11 | }, 12 | optimization: { 13 | chunkIds: 'named', 14 | }, 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /packages/repack/src/commands/common/getMimeType.ts: -------------------------------------------------------------------------------- 1 | import mimeTypes from 'mime-types'; 2 | 3 | /** 4 | * Get the MIME type for a given filename. 5 | * 6 | * Note: The `mime-types` library currently uses 'application/javascript' for JavaScript files, 7 | * but 'text/javascript' is more widely recognized and standard. 8 | * 9 | * @param {string} filename - The name of the file to get the MIME type for. 10 | * @returns {string} - The MIME type of the file. 11 | */ 12 | export function getMimeType(filename: string) { 13 | if (filename.endsWith('.bundle')) { 14 | return 'application/javascript'; 15 | } 16 | 17 | if (filename.endsWith('.map')) { 18 | return 'application/json'; 19 | } 20 | 21 | return mimeTypes.lookup(filename) || 'text/plain'; 22 | } 23 | -------------------------------------------------------------------------------- /packages/repack/src/commands/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adaptFilenameToPlatform.js'; 2 | export * from './getMimeType.js'; 3 | export * from './runAdbReverse.js'; 4 | export * from './parseFileUrl.js'; 5 | export * from './resetPersistentCache.js'; 6 | export * from './setupInteractions.js'; 7 | export * from './setupStatsWriter.js'; 8 | 9 | export * from './config/makeCompilerConfig.js'; 10 | -------------------------------------------------------------------------------- /packages/repack/src/commands/common/logo.ts: -------------------------------------------------------------------------------- 1 | import * as colorette from 'colorette'; 2 | import gradient from 'gradient-string'; 3 | 4 | const logoStr = ` 5 | ▄▀▀▀ ▀▀▀▀ █▀▀█ █▀▀█ ▄▀▀▀ █ █ 6 | █ ▀▀▀▀ █▀▀▀ █▀▀█ █ █▀▀▄ 7 | ▀ ▀▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀ ▀ ▀`; 8 | 9 | export default function logo(version: string, bundler: string) { 10 | const gradientLogo = gradient([ 11 | { color: '#9b6dff', pos: 0.45 }, 12 | { color: '#3ce4cb', pos: 0.9 }, 13 | ]).multiline(logoStr); 14 | 15 | return `${gradientLogo}\n${version}, powered by ${colorette.bold(bundler)}\n\n`; 16 | } 17 | -------------------------------------------------------------------------------- /packages/repack/src/commands/common/parseFileUrl.ts: -------------------------------------------------------------------------------- 1 | export function parseFileUrl(fileUrl: string, base?: string) { 2 | const url = new URL(fileUrl, base); 3 | const { pathname, searchParams } = url; 4 | 5 | let platform = searchParams.get('platform'); 6 | let filename = pathname; 7 | 8 | if (!platform) { 9 | const pathArray = pathname.split('/'); 10 | const platformFromPath = pathArray[1]; 11 | 12 | if (platformFromPath === 'ios' || platformFromPath === 'android') { 13 | platform = platformFromPath; 14 | filename = pathArray.slice(2).join('/'); 15 | } 16 | } 17 | 18 | if (!platform) { 19 | const [, platformOrName, name] = filename.split('.').reverse(); 20 | if (name !== undefined) { 21 | platform = platformOrName; 22 | } 23 | } 24 | 25 | return { 26 | filename: filename.replace(/^\//, ''), 27 | platform: platform || undefined, 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /packages/repack/src/commands/common/setupEnvironment.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ASSETS_DEST_ENV_KEY, 3 | BUNDLE_FILENAME_ENV_KEY, 4 | SOURCEMAP_FILENAME_ENV_KEY, 5 | VERBOSE_ENV_KEY, 6 | } from '../../env.js'; 7 | 8 | function setEnvVar(key: string, value: string | undefined): void { 9 | if (process.env[key] === undefined && value !== undefined) { 10 | process.env[key] = value; 11 | } 12 | } 13 | 14 | interface EnvironmentArgs { 15 | assetsDest?: string; 16 | bundleOutput?: string; 17 | sourcemapOutput?: string; 18 | verbose?: boolean; 19 | } 20 | 21 | export function setupEnvironment(args: EnvironmentArgs): void { 22 | setEnvVar(VERBOSE_ENV_KEY, args.verbose ? 'true' : undefined); 23 | setEnvVar(BUNDLE_FILENAME_ENV_KEY, args.bundleOutput); 24 | setEnvVar(SOURCEMAP_FILENAME_ENV_KEY, args.sourcemapOutput); 25 | setEnvVar(ASSETS_DEST_ENV_KEY, args.assetsDest); 26 | } 27 | -------------------------------------------------------------------------------- /packages/repack/src/commands/rspack/types.ts: -------------------------------------------------------------------------------- 1 | import type { MultiCompiler, StatsAsset } from '@rspack/core'; 2 | import type { RemoveRecord } from '../types.js'; 3 | 4 | type RspackStatsAsset = RemoveRecord; 5 | 6 | export interface CompilerAsset { 7 | data: Buffer; 8 | info: RspackStatsAsset['info']; 9 | size: number; 10 | } 11 | 12 | export type MultiWatching = ReturnType; 13 | -------------------------------------------------------------------------------- /packages/repack/src/env.ts: -------------------------------------------------------------------------------- 1 | export const VERBOSE_ENV_KEY = 'REPACK_VERBOSE'; 2 | export const WORKER_ENV_KEY = 'REPACK_WORKER'; 3 | 4 | export const BUNDLE_FILENAME_ENV_KEY = 'REPACK_BUNDLE_FILENAME'; 5 | export const SOURCEMAP_FILENAME_ENV_KEY = 'REPACK_SOURCEMAP_FILENAME'; 6 | export const ASSETS_DEST_ENV_KEY = 'REPACK_ASSETS_DEST'; 7 | 8 | export const EXPERIMENTAL_CACHE_ENV_KEY = 'REPACK_EXPERIMENTAL_CACHE'; 9 | -------------------------------------------------------------------------------- /packages/repack/src/index.ts: -------------------------------------------------------------------------------- 1 | export * as plugins from './plugins/index.js'; 2 | export * from './plugins/RepackPlugin.js'; 3 | export * from './types.js'; 4 | export * from './logging/index.js'; 5 | export * from './utils/index.js'; 6 | -------------------------------------------------------------------------------- /packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/logo.android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/logo.android.png -------------------------------------------------------------------------------- /packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/logo.ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/logo.ios.png -------------------------------------------------------------------------------- /packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/logo.png -------------------------------------------------------------------------------- /packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/star@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/star@1x.png -------------------------------------------------------------------------------- /packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/star@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/star@2x.png -------------------------------------------------------------------------------- /packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/star@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/packages/repack/src/loaders/assetsLoader/__tests__/__fixtures__/star@3x.png -------------------------------------------------------------------------------- /packages/repack/src/loaders/assetsLoader/index.ts: -------------------------------------------------------------------------------- 1 | import assetsLoader, { raw } from './assetsLoader.js'; 2 | 3 | export { raw }; 4 | export default assetsLoader; 5 | -------------------------------------------------------------------------------- /packages/repack/src/loaders/assetsLoader/types.ts: -------------------------------------------------------------------------------- 1 | export interface Asset { 2 | data: Buffer; 3 | dimensions: AssetDimensions | null; 4 | filename: string; 5 | scale: number; 6 | } 7 | 8 | export interface URISource { 9 | uri: string; 10 | width?: number; 11 | height?: number; 12 | scale?: number; 13 | } 14 | 15 | export interface AssetDimensions { 16 | width: number; 17 | height: number; 18 | } 19 | 20 | export interface CollectedScales { 21 | [key: string]: string; 22 | } 23 | 24 | export interface CollectOptions { 25 | name: string; 26 | platform: string; 27 | type: string; 28 | } 29 | -------------------------------------------------------------------------------- /packages/repack/src/loaders/flowLoader/flowLoader.ts: -------------------------------------------------------------------------------- 1 | import type { LoaderContext } from '@rspack/core'; 2 | import flowRemoveTypes from 'flow-remove-types'; 3 | import { getOptions } from './options.js'; 4 | 5 | export const raw = false; 6 | 7 | export default function flowLoader(this: LoaderContext, source: string) { 8 | this.cacheable(); 9 | const callback = this.async(); 10 | const options = getOptions(this); 11 | 12 | const result = flowRemoveTypes(source, options); 13 | const sourceMap = options.pretty ? result.generateMap() : undefined; 14 | 15 | callback(null, result.toString(), sourceMap); 16 | } 17 | -------------------------------------------------------------------------------- /packages/repack/src/loaders/flowLoader/index.ts: -------------------------------------------------------------------------------- 1 | import flowLoader, { raw } from './flowLoader.js'; 2 | 3 | export { raw }; 4 | export default flowLoader; 5 | -------------------------------------------------------------------------------- /packages/repack/src/loaders/reactRefreshLoader/index.ts: -------------------------------------------------------------------------------- 1 | import reactRefreshLoader, { raw } from './reactRefreshLoader.js'; 2 | 3 | export { raw }; 4 | export default reactRefreshLoader; 5 | -------------------------------------------------------------------------------- /packages/repack/src/logging/compose.ts: -------------------------------------------------------------------------------- 1 | import type { Reporter } from './types.js'; 2 | 3 | export function composeReporters(reporters: Reporter[]): Reporter { 4 | return { 5 | process: (logEntry) => { 6 | reporters.forEach((reporter) => reporter.process(logEntry)); 7 | }, 8 | flush: () => { 9 | reporters.forEach((reporter) => reporter.flush()); 10 | }, 11 | stop: () => { 12 | reporters.forEach((reporter) => reporter.stop()); 13 | }, 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /packages/repack/src/logging/index.ts: -------------------------------------------------------------------------------- 1 | export * from './reporters/FileReporter.js'; 2 | export * from './reporters/ConsoleReporter.js'; 3 | export * from './compose.js'; 4 | export * from './types.js'; 5 | export * from './makeLogEntryFromFastifyLog.js'; 6 | -------------------------------------------------------------------------------- /packages/repack/src/logging/makeLogEntryFromFastifyLog.ts: -------------------------------------------------------------------------------- 1 | import type { LogEntry, LogType } from './types.js'; 2 | 3 | export function makeLogEntryFromFastifyLog(data: any): LogEntry { 4 | const { level, time, pid, hostname, ...rest } = data; 5 | 6 | const levelToTypeMapping: Record = { 7 | 10: 'debug', 8 | 20: 'debug', 9 | 30: 'info', 10 | 40: 'warn', 11 | 50: 'error', 12 | 60: 'error', 13 | }; 14 | 15 | return { 16 | type: levelToTypeMapping[level], 17 | timestamp: time, 18 | issuer: '', 19 | message: [rest], 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /packages/repack/src/logging/types.ts: -------------------------------------------------------------------------------- 1 | export interface Reporter { 2 | process(log: LogEntry): void; 3 | flush(): void; 4 | stop(): void; 5 | } 6 | 7 | /** Log message type. */ 8 | export type LogType = 9 | | 'debug' 10 | | 'info' 11 | | 'warn' 12 | | 'error' 13 | | 'success' 14 | | 'progress'; 15 | 16 | /** 17 | * Represent log message with all necessary data. 18 | * 19 | * @internal 20 | */ 21 | export interface LogEntry { 22 | timestamp: number; 23 | type: LogType; 24 | issuer: string; 25 | message: Array; 26 | } 27 | -------------------------------------------------------------------------------- /packages/repack/src/modules/EmptyModule.ts: -------------------------------------------------------------------------------- 1 | // Empty module as a target for NormalModuleReplacementPlugin. 2 | -------------------------------------------------------------------------------- /packages/repack/src/modules/IncludeModules.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * This module is added as an entry module to prevent stripping of these React Native deep imports from the bundle. 3 | * We use require.resolve from Rspack/Webpack to ensure these modules are included even if not directly used. 4 | * This allows us to include the modules into the bundle without evaluating them. 5 | * These modules are required by assetsLoader and should be shared as deep imports when using ModuleFederation. 6 | */ 7 | 8 | require.resolve('react-native/Libraries/Image/AssetRegistry'); 9 | require.resolve('react-native/Libraries/Image/AssetSourceResolver'); 10 | -------------------------------------------------------------------------------- /packages/repack/src/modules/InitializeScriptManager.ts: -------------------------------------------------------------------------------- 1 | import { ScriptManager } from './ScriptManager/ScriptManager.js'; 2 | 3 | ScriptManager.init(); 4 | -------------------------------------------------------------------------------- /packages/repack/src/modules/ScriptManager/getWebpackContext.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Get Webpack runtime context form current JavaScript scope. 3 | * 4 | * __You likely don't need to use it.__ 5 | */ 6 | export function getWebpackContext(): RepackRuntimeGlobals.WebpackRequire { 7 | return __webpack_require__; 8 | } 9 | -------------------------------------------------------------------------------- /packages/repack/src/modules/ScriptManager/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ScriptManager.js'; 2 | export * from './Script.js'; 3 | export * from './types.js'; 4 | export * from './getWebpackContext.js'; 5 | export { Federated } from './federated.js'; 6 | -------------------------------------------------------------------------------- /packages/repack/src/modules/configurePublicPath.ts: -------------------------------------------------------------------------------- 1 | import { getDevServerLocation } from './getDevServerLocation.js'; 2 | 3 | // We need to teak Webpack's public path, especially for Android, where `localhost` 4 | // is not a correct host but eg `10.0.2.2` is. 5 | // If the public path doesn't have `localhost` in it, it usually means a custom `host` was 6 | // provided, so the replace won't change that. 7 | const { hostname } = getDevServerLocation(); 8 | __webpack_public_path__ = __webpack_public_path__.replace( 9 | 'localhost', 10 | hostname 11 | ); 12 | -------------------------------------------------------------------------------- /packages/repack/src/modules/getDevServerLocation.ts: -------------------------------------------------------------------------------- 1 | let hostname = __PUBLIC_HOST__; 2 | 3 | if (__PLATFORM__ === 'android' && __PUBLIC_HOST__ === 'localhost') { 4 | hostname = '10.0.2.2'; 5 | } 6 | 7 | const location = { 8 | host: `${hostname}:${__PUBLIC_PORT__}`, 9 | hostname, 10 | href: `${__PUBLIC_PROTOCOL__}://${hostname}:${__PUBLIC_PORT__}/`, 11 | origin: `${__PUBLIC_PROTOCOL__}://${hostname}:${__PUBLIC_PORT__}`, 12 | pathname: '/', 13 | port: __PUBLIC_PORT__, 14 | protocol: __PUBLIC_PROTOCOL__, 15 | }; 16 | 17 | type DevServerLocation = typeof location; 18 | 19 | export function getDevServerLocation(): DevServerLocation { 20 | return location; 21 | } 22 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/BabelPlugin.ts: -------------------------------------------------------------------------------- 1 | import type { Compiler, RspackPluginInstance } from '@rspack/core'; 2 | 3 | /** 4 | * Plugin that adds babel-loader fallback to resolveLoader configuration. 5 | * This ensures babel-loader can be resolved regardless of the package manager used, 6 | * as some package managers (like pnpm) require loaders to be direct dependencies 7 | * rather than allowing them to be resolved through nested dependencies. 8 | * 9 | * @category Webpack Plugin 10 | */ 11 | export class BabelPlugin implements RspackPluginInstance { 12 | apply(compiler: Compiler) { 13 | compiler.options.resolveLoader = { 14 | ...compiler.options.resolveLoader, 15 | fallback: { 16 | ...compiler.options.resolveLoader?.fallback, 17 | 'babel-loader': require.resolve('babel-loader'), 18 | }, 19 | }; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/CodeSigningPlugin/index.ts: -------------------------------------------------------------------------------- 1 | export { CodeSigningPlugin } from './CodeSigningPlugin.js'; 2 | export type { CodeSigningPluginConfig } from './config.js'; 3 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/HermesBytecodePlugin/index.ts: -------------------------------------------------------------------------------- 1 | export * from './HermesBytecodePlugin.js'; 2 | export * from './ChunksToHermesBytecodePlugin.js'; 3 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/HermesBytecodePlugin/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { composeSourceMaps } from './composeSourceMaps.js'; 2 | export { getHermesCLIPath } from './getHermesCLIPath.js'; 3 | export { transformBundleToHermesBytecode } from './transformBundleToHermesBytecode.js'; 4 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/OutputPlugin/index.ts: -------------------------------------------------------------------------------- 1 | export { OutputPlugin } from './OutputPlugin.js'; 2 | export type * from './types.js'; 3 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/RepackTargetPlugin/implementation/init.ts: -------------------------------------------------------------------------------- 1 | var $globalObject$: Record; 2 | 3 | module.exports = function () { 4 | var repackRuntime: RepackRuntimeGlobals.RepackRuntimeObject = { 5 | shared: ($globalObject$.__repack__ && $globalObject$.__repack__.shared) || 6 | (__webpack_require__.repack && __webpack_require__.repack.shared) || { 7 | scriptManager: undefined, 8 | enqueuedResolvers: [], 9 | }, 10 | }; 11 | 12 | __webpack_require__.repack = $globalObject$.__repack__ = repackRuntime; 13 | }; 14 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/RepackTargetPlugin/index.ts: -------------------------------------------------------------------------------- 1 | export * from './RepackTargetPlugin.js'; 2 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/__tests__/__fixtures__/example.chunk.bundle: -------------------------------------------------------------------------------- 1 | var name = "example chunk bundle"; -------------------------------------------------------------------------------- /packages/repack/src/plugins/__tests__/__fixtures__/example.container.bundle: -------------------------------------------------------------------------------- 1 | var name = "example container bundle"; -------------------------------------------------------------------------------- /packages/repack/src/plugins/__tests__/__fixtures__/local.chunk.bundle: -------------------------------------------------------------------------------- 1 | var name = "local chunk bundle"; -------------------------------------------------------------------------------- /packages/repack/src/plugins/__tests__/__fixtures__/main.bundle: -------------------------------------------------------------------------------- 1 | var name = "index bundle"; -------------------------------------------------------------------------------- /packages/repack/src/plugins/__tests__/__fixtures__/testRS256.pem.pub: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAz2p216DTSTUaf2BHelC1 3 | tHs+1cBMhJ1WOOhYbchfPajbfxDq6c7tVrq+wDeIX9RZ4OQ1/0t3q7UnYc1eKJEL 4 | 2wJHurY0dYU/een9myLeyePofe1ZMwNglRbe0JV2R9jpPmI9+Hgi3O+7BFqqbsJM 5 | A2dT1bUVUOPjKSQkTvPrizvNFjwW5fytSqrRt6VPKxVVlt+eSOaKEWXf86amWoEp 6 | IwlBoHisIbEOC++NyRjSZlSTikAR17sW/rsUCBiZp9bwleBSxV3KHp08MAX5fbuX 7 | rULWMCTC5OMT5k+JIPX0PVwjw1BTiSmSwNOELD22g1Q/3vNo5ZSmBEazcSf8ljNr 8 | 3MT0YWFoOZqtbDzvGKt1v1bPyXGrrMy7EYItwJhxs+u6HEU0IODxtpth9LiDQUSD 9 | hOBXKDije5sCXJSMAp7UZkE3gv9mXDmWeXxgSplfwl3XXk9pOa9SmkJzi+Iw1OVW 10 | PtAhKOk73P/m5CzTlokHVBhJQm5Qn8vO74gOeOiMNY7lgJ+tRxx/1hGiG3laMbkm 11 | VOz6ZhKTqQSbZ7I9KhfCFl/RYLK++SOfriEga7BgEbt9+hmbgEqlDeVPnXfqvita 12 | Fmfz0bz4y8byZkgv0AOq1VSND9SYU9V2mAEvvpMRXRAdjFlGVQXRp/ipcGYuf7ay 13 | excgB7YrPzSyBPmTK9g2ZuUCAwEAAQ== 14 | -----END PUBLIC KEY----- 15 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/index.ts: -------------------------------------------------------------------------------- 1 | export * from './DevelopmentPlugin.js'; 2 | export * from './LoggerPlugin.js'; 3 | export * from './ManifestPlugin.js'; 4 | export * from './BabelPlugin.js'; 5 | export * from './OutputPlugin/index.js'; 6 | export * from './RepackTargetPlugin/index.js'; 7 | export * from './ModuleFederationPlugin.js'; 8 | export * from './ModuleFederationPluginV1.js'; 9 | export * from './ModuleFederationPluginV2.js'; 10 | export * from './CodeSigningPlugin/index.js'; 11 | export * from './HermesBytecodePlugin/index.js'; 12 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/utils/ConfigurationError.ts: -------------------------------------------------------------------------------- 1 | import { VERBOSE_ENV_KEY } from '../../env.js'; 2 | 3 | export class ConfigurationError extends Error { 4 | constructor(message: string) { 5 | super(message); 6 | this.name = 'ConfigurationError'; 7 | 8 | // hide stack trace in non-verbose mode 9 | if (!process.env[VERBOSE_ENV_KEY]) { 10 | this.stack = undefined; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/repack/src/plugins/utils/isRspackCompiler.ts: -------------------------------------------------------------------------------- 1 | import type { Compiler as RspackCompiler } from '@rspack/core'; 2 | import type { Compiler as WebpackCompiler } from 'webpack'; 3 | 4 | /** 5 | * Check if the compiler is Rspack. 6 | * Reference: https://github.com/web-infra-dev/rspack/discussions/2640 7 | * 8 | * @param compiler Compiler instance to check. 9 | * @returns `true` if the compiler is Rspack, `false` otherwise. 10 | */ 11 | export function isRspackCompiler(compiler: RspackCompiler | WebpackCompiler) { 12 | return 'rspackVersion' in compiler.webpack; 13 | } 14 | -------------------------------------------------------------------------------- /packages/repack/src/types/dev-server-options.d.ts: -------------------------------------------------------------------------------- 1 | import type { DevServerOptions } from '@callstack/repack-dev-server'; 2 | 3 | // extend webpack Configuration with devServer field 4 | declare module 'webpack' { 5 | export interface Configuration { 6 | devServer?: DevServerOptions; 7 | } 8 | } 9 | 10 | // override rspack DevServer type 11 | declare module '@rspack/core' { 12 | export interface DevServer extends DevServerOptions {} 13 | } 14 | -------------------------------------------------------------------------------- /packages/repack/src/types/flow-remove-types.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'flow-remove-types' { 2 | declare const removeTypes: ( 3 | code: string, 4 | options: { 5 | all?: boolean; 6 | ignoreUninitializedFields?: boolean; 7 | pretty?: boolean; 8 | removeEmptyImports?: boolean; 9 | } 10 | ) => { 11 | toString(): string; 12 | generateMap(): { 13 | version: number; 14 | sources: string[]; 15 | names: string[]; 16 | mappings: string; 17 | }; 18 | }; 19 | export = removeTypes; 20 | } 21 | -------------------------------------------------------------------------------- /packages/repack/src/utils/getDirname.ts: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | import { fileURLToPath } from 'node:url'; 3 | 4 | /** 5 | * Converts a `file:///` URL to an absolute directory path. 6 | * Useful in ESM Webpack configs where `__dirname` is unavailable. 7 | * 8 | * @param fileUrl The `file:///` URL of a module. 9 | * @returns The directory path without the `file:///` prefix. 10 | * 11 | * @category Webpack util 12 | * 13 | * @example Usage in a Webpack ESM config: 14 | * ```ts 15 | * import * as Repack from '@callstack/repack'; 16 | * 17 | * export default (env) => { 18 | * const { 19 | * context = Repack.getDirname(import.meta.url) 20 | * } = env; 21 | * }; 22 | * ``` 23 | */ 24 | export function getDirname(fileUrl: string) { 25 | return path.dirname(fileURLToPath(fileUrl)); 26 | } 27 | -------------------------------------------------------------------------------- /packages/repack/src/utils/getPublicPath.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated Since Re.Pack v5.0.0. 3 | * 4 | * You can safely remove this function call - 5 | * the public path configuration is now automatically handled by Re.Pack with the same behavior. 6 | */ 7 | export function getPublicPath() { 8 | console.warn( 9 | '[NOTICE] `getPublicPath` is deprecated since Re.Pack v5.0.0.\n' + 10 | 'You can safely remove this function call - the public path configuration is now automatically handled by Re.Pack with the same behavior.' 11 | ); 12 | return 'DEPRECATED_GET_PUBLIC_PATH'; 13 | } 14 | -------------------------------------------------------------------------------- /packages/repack/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './assetExtensions.js'; 2 | export * from './federated.js'; 3 | export * from './getDirname.js'; 4 | export * from './getPublicPath.js'; 5 | export * from './getResolveOptions.js'; 6 | export * from './getModulePaths.js'; 7 | export * from './getJsTransformRules.js'; 8 | export * from './getSwcLoaderOptions.js'; 9 | export * from './getFlowTransformRules.js'; 10 | export * from './getCodegenTransformRules.js'; 11 | export * from './getAssetTransformRules.js'; 12 | -------------------------------------------------------------------------------- /packages/repack/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["src/**/*"], 4 | "exclude": ["**/__tests__/**"], 5 | "compilerOptions": { 6 | "outDir": "dist", 7 | "rootDir": "src", 8 | "paths": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/repack/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDirs": ["src", "../dev-server/src"], 5 | "paths": { 6 | "@callstack/repack-dev-server": ["../dev-server/src/index.ts"], 7 | "@callstack/repack-dev-server/*": ["../dev-server/src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "packages/*" 3 | - "apps/*" 4 | - "tests/*" 5 | - "website" 6 | 7 | catalog: 8 | "@rspack/core": ^1.3.5 9 | "@rslib/core": ^0.6.3 10 | "@swc/helpers": ~0.5.17 11 | "@types/node": ^18 12 | "terser-webpack-plugin": ^5.3.14 13 | "typescript": ^5.8.3 14 | "webpack": ^5.99.5 15 | "react": "19.0.0" 16 | "react-native": "0.79.1" 17 | 18 | catalogs: 19 | testers: 20 | "react-native-test-app": 4.3.3 21 | -------------------------------------------------------------------------------- /templates/rspack.config.cjs: -------------------------------------------------------------------------------- 1 | const Repack = require('@callstack/repack'); 2 | 3 | /** 4 | * Rspack configuration enhanced with Re.Pack defaults for React Native. 5 | * 6 | * Learn about Rspack configuration: https://rspack.dev/config/ 7 | * Learn about Re.Pack configuration: https://re-pack.dev/docs/guides/configuration 8 | */ 9 | 10 | module.exports = { 11 | context: __dirname, 12 | entry: './index.js', 13 | resolve: { 14 | ...Repack.getResolveOptions(), 15 | }, 16 | module: { 17 | rules: [ 18 | ...Repack.getJsTransformRules(), 19 | ...Repack.getAssetTransformRules(), 20 | ], 21 | }, 22 | plugins: [new Repack.RepackPlugin()], 23 | }; 24 | -------------------------------------------------------------------------------- /templates/rspack.config.mjs: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | import { fileURLToPath } from 'node:url'; 3 | import * as Repack from '@callstack/repack'; 4 | 5 | const __filename = fileURLToPath(import.meta.url); 6 | const __dirname = path.dirname(__filename); 7 | 8 | /** 9 | * Rspack configuration enhanced with Re.Pack defaults for React Native. 10 | * 11 | * Learn about Rspack configuration: https://rspack.dev/config/ 12 | * Learn about Re.Pack configuration: https://re-pack.dev/docs/guides/configuration 13 | */ 14 | 15 | export default { 16 | context: __dirname, 17 | entry: './index.js', 18 | resolve: { 19 | ...Repack.getResolveOptions(), 20 | }, 21 | module: { 22 | rules: [ 23 | ...Repack.getJsTransformRules(), 24 | ...Repack.getAssetTransformRules(), 25 | ], 26 | }, 27 | plugins: [new Repack.RepackPlugin()], 28 | }; 29 | -------------------------------------------------------------------------------- /tests/metro-compat/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rootDir: __dirname, 3 | testEnvironment: 'node', 4 | testRegex: '__tests__/.*-test\\.js$', 5 | testPathIgnorePatterns: [ 6 | '/node_modules/', 7 | // assets-test are not compatible with webpack's enhanced-resolve 8 | '/resolver/__tests__/assets-test.js', 9 | // index-test are almost entirely for legacy metro features which are not supported 10 | '/resolver/__tests__/index-test.js', 11 | ], 12 | transform: { '\\.[jt]s$': 'babel-jest' }, 13 | setupFilesAfterEnv: ['/jest.setup.js'], 14 | }; 15 | -------------------------------------------------------------------------------- /tests/metro-compat/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "metro-compat-test", 3 | "version": "0.0.1", 4 | "description": "Metro compatibility tests", 5 | "author": "Jakub Romańczyk ", 6 | "license": "MIT", 7 | "private": true, 8 | "engineStrict": true, 9 | "engines": { 10 | "node": ">=18" 11 | }, 12 | "scripts": { 13 | "test": "jest --noStackTrace", 14 | "typecheck": "tsc", 15 | "update-tests": "node update-tests.js" 16 | }, 17 | "devDependencies": { 18 | "@callstack/repack": "workspace:*", 19 | "@types/jest": "^29.5.12", 20 | "@types/node": "^18", 21 | "babel-jest": "^29.7.0", 22 | "babel-plugin-module-resolver": "^5.0.0", 23 | "babel-plugin-syntax-hermes-parser": "^0.20.1", 24 | "enhanced-resolve": "^5.18.1", 25 | "jest": "^29.7.0", 26 | "memfs": "^4.11.1", 27 | "type-fest": "^4.12.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/metro-compat/resolver/__tests__/__snapshots__/index-test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`throws on invalid package name 1`] = ` 4 | "The package \`/root/node_modules/invalid/package.json\` is invalid because it specifies a \`main\` module field that could not be resolved (\`/root/node_modules/invalid/main\`. None of these files exist: 5 | 6 | * /root/node_modules/invalid/main(.js|.jsx|.json|.ts|.tsx) 7 | * /root/node_modules/invalid/main/index(.js|.jsx|.json|.ts|.tsx)" 8 | `; 9 | -------------------------------------------------------------------------------- /tests/metro-compat/resolver/resolve-error.ts: -------------------------------------------------------------------------------- 1 | // enhanced-resolve uses plain Error 2 | module.exports = Error; 3 | -------------------------------------------------------------------------------- /tests/metro-compat/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node", 5 | "strict": true, 6 | "allowSyntheticDefaultImports": true, 7 | "esModuleInterop": true, 8 | "skipLibCheck": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "noEmit": true 11 | }, 12 | "exclude": ["**/__tests__/**"] 13 | } 14 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2021", 4 | "module": "nodenext", 5 | "moduleResolution": "nodenext", 6 | "strict": true, 7 | "declaration": true, 8 | "declarationMap": false, 9 | "sourceMap": false, 10 | "esModuleInterop": true, 11 | "allowSyntheticDefaultImports": true, 12 | "skipLibCheck": true, 13 | "forceConsistentCasingInFileNames": true, 14 | "resolveJsonModule": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /website/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | doc_build 26 | -------------------------------------------------------------------------------- /website/global.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace NodeJS { 2 | export interface Global { 3 | __REPACK_DOC_VERSION__: string; 4 | __REPACK_DOC_LATEST_VERSION__: string; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /website/src/latest/404.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | pageType: custom 3 | --- 4 | 5 | import { NotFoundLayout } from '@theme'; 6 | 7 | 8 | -------------------------------------------------------------------------------- /website/src/latest/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "text": "Docs", 4 | "link": "/docs/getting-started/quick-start", 5 | "activeMatch": "^/docs/" 6 | }, 7 | { 8 | "text": "API", 9 | "link": "/api/index", 10 | "activeMatch": "^/api/" 11 | }, 12 | { 13 | "text": "Blog", 14 | "link": "https://www.callstack.com/insights/super-apps-with-react-native", 15 | "activeMatch": "^/blog/" 16 | }, 17 | { 18 | "text": "Version", 19 | "items": [ 20 | { 21 | "text": "5.x (latest)", 22 | "link": "https://re-pack.dev/" 23 | }, 24 | { 25 | "text": "4.x", 26 | "link": "https://v4.re-pack.dev/" 27 | }, 28 | { 29 | "text": "3.x", 30 | "link": "https://v3.re-pack.dev/" 31 | }, 32 | { 33 | "text": "2.x", 34 | "link": "https://v2.re-pack.dev/" 35 | } 36 | ] 37 | } 38 | ] 39 | -------------------------------------------------------------------------------- /website/src/latest/api/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "index", 5 | "label": "Overview" 6 | }, 7 | { 8 | "type": "dir", 9 | "name": "cli", 10 | "label": "Command Line Interface (CLI)", 11 | "collapsed": false 12 | }, 13 | { 14 | "type": "dir", 15 | "name": "runtime", 16 | "label": "Runtime client", 17 | "collapsed": false 18 | }, 19 | { 20 | "type": "dir", 21 | "name": "loaders", 22 | "label": "Loaders", 23 | "collapsed": false 24 | }, 25 | { 26 | "type": "dir", 27 | "name": "plugins", 28 | "label": "Plugins", 29 | "collapsed": false 30 | }, 31 | { 32 | "type": "dir", 33 | "name": "utils", 34 | "label": "Configuration utilities", 35 | "collapsed": false 36 | } 37 | ] 38 | -------------------------------------------------------------------------------- /website/src/latest/api/cli/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "start", 5 | "label": "Start" 6 | }, 7 | { 8 | "type": "file", 9 | "name": "bundle", 10 | "label": "Bundle" 11 | }, 12 | { 13 | "type": "file", 14 | "name": "init", 15 | "label": "Init" 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /website/src/latest/api/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | overview: true 3 | title: "Overview" 4 | --- 5 | -------------------------------------------------------------------------------- /website/src/latest/api/loaders/_meta.json: -------------------------------------------------------------------------------- 1 | ["assets-loader", "flow-loader", "react-refresh-loader"] 2 | -------------------------------------------------------------------------------- /website/src/latest/api/plugins/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "repack", 5 | "label": "RepackPlugin" 6 | }, 7 | { 8 | "type": "file", 9 | "name": "module-federation-v1", 10 | "label": "ModuleFederationV1Plugin" 11 | }, 12 | { 13 | "type": "file", 14 | "name": "module-federation-v2", 15 | "label": "ModuleFederationV2Plugin" 16 | }, 17 | { 18 | "type": "file", 19 | "name": "code-signing", 20 | "label": "CodeSigningPlugin" 21 | }, 22 | { 23 | "type": "file", 24 | "name": "hermes-bytecode", 25 | "label": "HermesBytecodePlugin" 26 | }, 27 | { 28 | "type": "file", 29 | "name": "internal", 30 | "label": "Internal plugins" 31 | } 32 | ] 33 | -------------------------------------------------------------------------------- /website/src/latest/api/plugins/internal.md: -------------------------------------------------------------------------------- 1 | # Internal plugins 2 | 3 | ## OutputPlugin 4 | 5 | ## LoggerPlugin 6 | 7 | ## NativeEntryPlugin 8 | 9 | ## DevelopmentPlugin 10 | 11 | ## RepackTargetPlugin 12 | 13 | ## BabelPlugin 14 | 15 | Plugin that adds `babel-loader` fallback to resolveLoader configuration. This ensures babel-loader can be resolved regardless of the package manager used, as some package managers (like `pnpm`) require loaders to be direct dependencies rather than allowing them to be resolved through nested dependencies. 16 | 17 | ## CodegenPlugin 18 | 19 | Plugin that handles React Native Codegen transforms required by the new architecture. It adds a `babel-loader` rule for processing Native components and modules, similar to how it's done in `@react-native/babel-preset`. 20 | -------------------------------------------------------------------------------- /website/src/latest/api/runtime/_meta.json: -------------------------------------------------------------------------------- 1 | ["script", "script-manager"] 2 | -------------------------------------------------------------------------------- /website/src/latest/api/runtime/script.md: -------------------------------------------------------------------------------- 1 | # Script 2 | -------------------------------------------------------------------------------- /website/src/latest/api/utils/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | "constants", 3 | "get-asset-extension-regexp", 4 | "get-asset-transform-rules", 5 | "get-codegen-transform-rules", 6 | "get-dirname", 7 | "get-flow-transform-rules", 8 | "get-js-transform-rules", 9 | "get-module-paths", 10 | "get-resolve-options", 11 | "get-swc-loader-options" 12 | ] 13 | -------------------------------------------------------------------------------- /website/src/latest/api/utils/get-asset-extension-regexp.md: -------------------------------------------------------------------------------- 1 | # getAssetExtensionsRegExp 2 | 3 | Creates a RegExp from an array of asset extensions. 4 | 5 | ## Parameters 6 | 7 | ```ts 8 | type GetAssetExtensionsRegExp = (extensions?: string[]) => RegExp; 9 | ``` 10 | 11 | ### extensions 12 | 13 | - Type: `string[]` 14 | - Default: `ASSET_EXTENSIONS` 15 | 16 | Array of extensions to include in the RegExp pattern. 17 | 18 | ## Example 19 | 20 | ```js title=rspack.config.cjs 21 | const Repack = require("@callstack/repack"); 22 | 23 | module.exports = { 24 | module: { 25 | rules: [ 26 | { 27 | test: Repack.getAssetExtensionsRegExp(Repack.ASSET_EXTENSIONS), 28 | use: { 29 | loader: "@callstack/repack/assets-loader", 30 | options: { platform }, 31 | }, 32 | }, 33 | ], 34 | }, 35 | }; 36 | ``` 37 | -------------------------------------------------------------------------------- /website/src/latest/api/utils/get-dirname.md: -------------------------------------------------------------------------------- 1 | # getDirname 2 | 3 | Convert a `file:///` URL to an absolute directory path. This utility is particularly useful in ESM Rspack/webpack configs where `__dirname` is not available. 4 | 5 | ## Parameters 6 | 7 | ```ts 8 | type GetDirname = (fileUrl: string) => string; 9 | ``` 10 | 11 | ### fileUrl 12 | 13 | - Type: `string` 14 | - Required: `true` 15 | 16 | The `file:///` URL of a module, typically obtained from `import.meta.url`. 17 | 18 | ## Example 19 | 20 | ```js title=rspack.config.mjs 21 | import * as Repack from "@callstack/repack"; 22 | 23 | export default (env) => { 24 | const { context = Repack.getDirname(import.meta.url) } = env; 25 | 26 | return { 27 | // ... config 28 | }; 29 | }; 30 | ``` 31 | -------------------------------------------------------------------------------- /website/src/latest/docs/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "dir", 4 | "name": "getting-started", 5 | "label": "Getting Started" 6 | }, 7 | { 8 | "type": "dir", 9 | "name": "features", 10 | "label": "Features" 11 | }, 12 | { 13 | "type": "dir", 14 | "name": "guides", 15 | "label": "Guides" 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "migration-guides", 20 | "label": "Migration" 21 | }, 22 | { 23 | "type": "dir", 24 | "name": "resources", 25 | "label": "Additional resources" 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /website/src/latest/docs/features/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | "code-splitting", 3 | "module-federation", 4 | "module-resolution", 5 | "dev-server", 6 | "flow-support", 7 | "devtools", 8 | "reanimated" 9 | ] 10 | -------------------------------------------------------------------------------- /website/src/latest/docs/features/module-federation.md: -------------------------------------------------------------------------------- 1 | # Module Federation 2 | 3 | :::warning Notice: 4 | The documentation for Re.Pack 5 is currently under development and some of the pages aren't ready yet. 5 | 6 | Please use [latest stable version of Re.Pack 4.x documentation](https://re-pack.dev/docs/getting-started) for now. 7 | ::: 8 | -------------------------------------------------------------------------------- /website/src/latest/docs/features/module-resolution.md: -------------------------------------------------------------------------------- 1 | # Module resolution 2 | 3 | :::warning Notice: 4 | The documentation for Re.Pack 5 is currently under development and some of the pages aren't ready yet. 5 | 6 | Please use [latest stable version of Re.Pack 4.x documentation](https://re-pack.dev/docs/getting-started) for now. 7 | ::: 8 | -------------------------------------------------------------------------------- /website/src/latest/docs/getting-started/_meta.json: -------------------------------------------------------------------------------- 1 | ["introduction", "quick-start", "microfrontends", "bundlers"] 2 | -------------------------------------------------------------------------------- /website/src/latest/docs/getting-started/bundlers.md: -------------------------------------------------------------------------------- 1 | # Rspack & webpack 2 | 3 | :::warning Notice: 4 | The documentation for Re.Pack 5 is currently under development and some of the pages aren't ready yet. 5 | 6 | Please use [latest stable version of Re.Pack 4.x documentation](https://re-pack.dev/docs/getting-started) for now. 7 | ::: 8 | -------------------------------------------------------------------------------- /website/src/latest/docs/guides/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | "configuration", 3 | "debugging", 4 | "bundle-analysis", 5 | "expo-modules", 6 | "inline-assets", 7 | "remote-assets", 8 | "svg", 9 | "deploy" 10 | ] 11 | -------------------------------------------------------------------------------- /website/src/latest/docs/migration-guides/_meta.json: -------------------------------------------------------------------------------- 1 | ["metro", "repack-v4", "rspack"] 2 | -------------------------------------------------------------------------------- /website/src/latest/public/img/asset-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/latest/public/img/asset-not-found.png -------------------------------------------------------------------------------- /website/src/latest/public/img/devtools-mf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/latest/public/img/devtools-mf.png -------------------------------------------------------------------------------- /website/src/latest/public/img/devtools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/latest/public/img/devtools.png -------------------------------------------------------------------------------- /website/src/latest/public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/latest/public/img/favicon.ico -------------------------------------------------------------------------------- /website/src/latest/public/img/init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/latest/public/img/init.png -------------------------------------------------------------------------------- /website/src/latest/public/img/og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/latest/public/img/og-image.png -------------------------------------------------------------------------------- /website/src/latest/public/img/repack-deploy-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/latest/public/img/repack-deploy-url.png -------------------------------------------------------------------------------- /website/src/latest/public/img/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/latest/public/img/start.png -------------------------------------------------------------------------------- /website/src/latest/public/img/webpack_icon.svg: -------------------------------------------------------------------------------- 1 | icon -------------------------------------------------------------------------------- /website/src/latest/styles/index.css: -------------------------------------------------------------------------------- 1 | .custom__rspress-home-feature-icon-img-container { 2 | display: flex; 3 | justify-content: center; 4 | height: 100%; 5 | } 6 | 7 | .custom__rspress-home-feature-icon-img-container > img { 8 | margin-left: 5px; 9 | margin-right: 5px; 10 | } 11 | 12 | .custom__home-hero-name-img { 13 | max-width: 600px; 14 | margin-left: auto; 15 | margin-right: auto; 16 | } 17 | -------------------------------------------------------------------------------- /website/src/v2/404.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | pageType: custom 3 | --- 4 | 5 | import { NotFoundLayout } from '@theme'; 6 | 7 | 8 | -------------------------------------------------------------------------------- /website/src/v2/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "text": "Docs", 4 | "link": "/docs/getting-started", 5 | "activeMatch": "^/docs/" 6 | }, 7 | { 8 | "text": "API", 9 | "link": "/api/about", 10 | "activeMatch": "^/api/" 11 | }, 12 | { 13 | "text": "Version", 14 | "items": [ 15 | { 16 | "text": "5.x (latest)", 17 | "link": "https://re-pack.dev/" 18 | }, 19 | { 20 | "text": "4.x", 21 | "link": "https://v4.re-pack.dev/" 22 | }, 23 | { 24 | "text": "3.x", 25 | "link": "https://v3.re-pack.dev/" 26 | }, 27 | { 28 | "text": "2.x (selected)", 29 | "link": "https://v2.re-pack.dev/" 30 | } 31 | ] 32 | }, 33 | { 34 | "text": "Examples", 35 | "link": "https://github.com/callstack/repack-examples" 36 | } 37 | ] 38 | -------------------------------------------------------------------------------- /website/src/v2/api/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section-header", 4 | "label": "API" 5 | }, 6 | { 7 | "type": "file", 8 | "name": "about", 9 | "label": "About" 10 | }, 11 | { 12 | "type": "dir", 13 | "name": "node", 14 | "label": "Node", 15 | "collapsed": true 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "react-native", 20 | "label": "React Native", 21 | "collapsed": true 22 | } 23 | ] 24 | -------------------------------------------------------------------------------- /website/src/v2/api/about.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | API documentation for Re.Pack is split into few categories: 4 | 5 | - [`React Native API`](./react-native/index.md) - documentation for client-facing APIs, which you can use inside your application, for example `ChunkManager`. 6 | - [`Node API`](./node/index.md) - documentation for APIs used to configure bundling or development processes: Webpack plugins, utilities and commands. 7 | -------------------------------------------------------------------------------- /website/src/v2/api/node/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "index", 5 | "label": "Table of Contents" 6 | }, 7 | { 8 | "type": "dir", 9 | "name": "classes", 10 | "label": "Classes" 11 | }, 12 | { 13 | "type": "dir", 14 | "name": "functions", 15 | "label": "Functions" 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "interfaces", 20 | "label": "Interfaces" 21 | }, 22 | { 23 | "type": "dir", 24 | "name": "types", 25 | "label": "Types" 26 | }, 27 | { 28 | "type": "dir", 29 | "name": "variables", 30 | "label": "Variables" 31 | } 32 | ] 33 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/bundle.md: -------------------------------------------------------------------------------- 1 | # Function: bundle 2 | 3 | ▸ **bundle**(`_`, `config`, `args`): `void` 4 | 5 | Bundle command for React Native CLI. 6 | It runs Webpack, builds bundle and saves it alongside any other assets and Source Map 7 | to filesystem. 8 | 9 | **`internal`** 10 | 11 | #### Parameters 12 | 13 | | Name | Type | Description | 14 | | :------ | :------ | :------ | 15 | | `_` | `string`[] | Original, non-parsed arguments that were provided when running this command. | 16 | | `config` | `Config` | React Native CLI configuration object. | 17 | | `args` | [`BundleArguments`](../interfaces/BundleArguments.md) | Parsed command line arguments. | 18 | 19 | #### Returns 20 | 21 | `void` 22 | 23 | #### Defined in 24 | 25 | [packages/repack/src/commands/bundle.ts:19](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/commands/bundle.ts#L19) 26 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/getAssetExtensionsRegExp.md: -------------------------------------------------------------------------------- 1 | # Function: getAssetExtensionsRegExp 2 | 3 | ▸ **getAssetExtensionsRegExp**(`extensions`): `RegExp` 4 | 5 | Creates RegExp from array of asset extensions. 6 | 7 | #### Parameters 8 | 9 | | Name | Type | Description | 10 | | :------ | :------ | :------ | 11 | | `extensions` | `string`[] | Extensions array. | 12 | 13 | #### Returns 14 | 15 | `RegExp` 16 | 17 | RegExp with extensions. 18 | 19 | #### Defined in 20 | 21 | [packages/repack/src/webpack/utils/assetExtensions.ts:51](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/assetExtensions.ts#L51) 22 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/getContext.md: -------------------------------------------------------------------------------- 1 | # Function: getContext 2 | 3 | ▸ **getContext**(`options?`): `string` 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `options` | [`Fallback`](../interfaces/Fallback.md)<`string`\> | 10 | 11 | #### Returns 12 | 13 | `string` 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/env/getContext.ts:5](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/env/getContext.ts#L5) 18 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/getDevServerOptions.md: -------------------------------------------------------------------------------- 1 | # Function: getDevServerOptions 2 | 3 | ▸ **getDevServerOptions**(`options?`): [`DevServerOptions`](../interfaces/DevServerOptions.md) 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `options` | [`Fallback`](../interfaces/Fallback.md)<`DeepOptional`<[`DevServerOptions`](../interfaces/DevServerOptions.md)\>\> | 10 | 11 | #### Returns 12 | 13 | [`DevServerOptions`](../interfaces/DevServerOptions.md) 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/env/getDevServerOptions.ts:14](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/env/getDevServerOptions.ts#L14) 18 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/getEntry.md: -------------------------------------------------------------------------------- 1 | # Function: getEntry 2 | 3 | ▸ **getEntry**(`options?`): `string` 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `options` | [`Fallback`](../interfaces/Fallback.md)<`string`\> | 10 | 11 | #### Returns 12 | 13 | `string` 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/env/getEntry.ts:6](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/env/getEntry.ts#L6) 18 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/getMode.md: -------------------------------------------------------------------------------- 1 | # Function: getMode 2 | 3 | ▸ **getMode**(`options?`): [`Mode`](../types/Mode.md) 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `options` | [`Fallback`](../interfaces/Fallback.md)<[`Mode`](../types/Mode.md)\> | 10 | 11 | #### Returns 12 | 13 | [`Mode`](../types/Mode.md) 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/env/getMode.ts:7](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/env/getMode.ts#L7) 18 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/getPlatform.md: -------------------------------------------------------------------------------- 1 | # Function: getPlatform 2 | 3 | ▸ **getPlatform**(`options`): `string` 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `options` | [`Fallback`](../interfaces/Fallback.md)<`string`\> | 10 | 11 | #### Returns 12 | 13 | `string` 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/env/getPlatform.ts:5](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/env/getPlatform.ts#L5) 18 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/getPublicPath.md: -------------------------------------------------------------------------------- 1 | # Function: getPublicPath 2 | 3 | ▸ **getPublicPath**(`options`): `string` 4 | 5 | Get Webpack's public path. 6 | 7 | #### Parameters 8 | 9 | | Name | Type | Description | 10 | | :------ | :------ | :------ | 11 | | `options` | [`GetPublicPathOptions`](../interfaces/GetPublicPathOptions.md) | Options object. | 12 | 13 | #### Returns 14 | 15 | `string` 16 | 17 | Value for Webpack's `output.publicPath` option. 18 | 19 | #### Defined in 20 | 21 | [packages/repack/src/webpack/utils/getPublicPath.ts:18](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/getPublicPath.ts#L18) 22 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/getReactNativePath.md: -------------------------------------------------------------------------------- 1 | # Function: getReactNativePath 2 | 3 | ▸ **getReactNativePath**(`options?`): `string` 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `options` | [`Fallback`](../interfaces/Fallback.md)<`string`\> | 10 | 11 | #### Returns 12 | 13 | `string` 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/env/getReactNativePath.ts:6](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/env/getReactNativePath.ts#L6) 18 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/isMinimizeEnabled.md: -------------------------------------------------------------------------------- 1 | # Function: isMinimizeEnabled 2 | 3 | ▸ **isMinimizeEnabled**(`options?`): `boolean` 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `options` | [`Fallback`](../interfaces/Fallback.md)<`boolean`\> | 10 | 11 | #### Returns 12 | 13 | `boolean` 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/env/isMinimizeEnabled.ts:5](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/env/isMinimizeEnabled.ts#L5) 18 | -------------------------------------------------------------------------------- /website/src/v2/api/node/functions/start.md: -------------------------------------------------------------------------------- 1 | # Function: start 2 | 3 | ▸ **start**(`_`, `config`, `args`): `void` 4 | 5 | Start command for React Native CLI. 6 | It runs [DevServerProxy](../classes/DevServerProxy.md) to provide Development Server functionality to React Native apps 7 | in development mode. 8 | 9 | **`internal`** 10 | 11 | #### Parameters 12 | 13 | | Name | Type | Description | 14 | | :------ | :------ | :------ | 15 | | `_` | `string`[] | Original, non-parsed arguments that were provided when running this command. | 16 | | `config` | `Config` | React Native CLI configuration object. | 17 | | `args` | [`StartArguments`](../interfaces/StartArguments.md) | Parsed command line arguments. | 18 | 19 | #### Returns 20 | 21 | `void` 22 | 23 | #### Defined in 24 | 25 | [packages/repack/src/commands/start.ts:21](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/commands/start.ts#L21) 26 | -------------------------------------------------------------------------------- /website/src/v2/api/node/interfaces/Fallback.md: -------------------------------------------------------------------------------- 1 | # Interface: Fallback 2 | 3 | ## Type parameters 4 | 5 | | Name | 6 | | :------ | 7 | | `T` | 8 | 9 | ## Table of contents 10 | 11 | ### Properties 12 | 13 | - [fallback](./Fallback.md#fallback) 14 | 15 | ## Properties 16 | 17 | ### fallback 18 | 19 | • **fallback**: `T` \| () => `T` 20 | 21 | #### Defined in 22 | 23 | [packages/repack/src/types.ts:6](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/types.ts#L6) 24 | -------------------------------------------------------------------------------- /website/src/v2/api/node/interfaces/HMRMessage.md: -------------------------------------------------------------------------------- 1 | # Interface: HMRMessage 2 | 3 | Represent Hot Module Replacement Update message. 4 | Used by [WebSocketHMRServer](../classes/WebSocketHMRServer.md) and `WebpackHMRClient`. 5 | 6 | **`internal`** 7 | 8 | ## Table of contents 9 | 10 | ### Properties 11 | 12 | - [action](./HMRMessage.md#action) 13 | - [body](./HMRMessage.md#body) 14 | 15 | ## Properties 16 | 17 | ### action 18 | 19 | • **action**: ``"building"`` \| ``"built"`` \| ``"sync"`` 20 | 21 | #### Defined in 22 | 23 | [packages/repack/src/types.ts:199](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/types.ts#L199) 24 | 25 | ___ 26 | 27 | ### body 28 | 29 | • **body**: ``null`` \| [`HMRMessageBody`](./HMRMessageBody.md) 30 | 31 | #### Defined in 32 | 33 | [packages/repack/src/types.ts:200](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/types.ts#L200) 34 | -------------------------------------------------------------------------------- /website/src/v2/api/node/interfaces/ReactNativeIdObject.md: -------------------------------------------------------------------------------- 1 | # Interface: ReactNativeIdObject 2 | 3 | Holds [ReactNativeMessage](./ReactNativeMessage.md) `id` data. 4 | 5 | ## Table of contents 6 | 7 | ### Properties 8 | 9 | - [clientId](./ReactNativeIdObject.md#clientid) 10 | - [requestId](./ReactNativeIdObject.md#requestid) 11 | 12 | ## Properties 13 | 14 | ### clientId 15 | 16 | • **clientId**: `string` 17 | 18 | #### Defined in 19 | 20 | [packages/repack/src/server/ws/WebSocketMessageServer.ts:12](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/server/ws/WebSocketMessageServer.ts#L12) 21 | 22 | ___ 23 | 24 | ### requestId 25 | 26 | • **requestId**: `string` 27 | 28 | #### Defined in 29 | 30 | [packages/repack/src/server/ws/WebSocketMessageServer.ts:11](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/server/ws/WebSocketMessageServer.ts#L11) 31 | -------------------------------------------------------------------------------- /website/src/v2/api/node/interfaces/WebSocketEventsServerConfig.md: -------------------------------------------------------------------------------- 1 | # Interface: WebSocketEventsServerConfig 2 | 3 | [WebSocketEventsServer](../classes/WebSocketEventsServer.md) configuration options. 4 | 5 | ## Table of contents 6 | 7 | ### Properties 8 | 9 | - [webSocketMessageServer](./WebSocketEventsServerConfig.md#websocketmessageserver) 10 | 11 | ## Properties 12 | 13 | ### webSocketMessageServer 14 | 15 | • **webSocketMessageServer**: [`WebSocketMessageServer`](../classes/WebSocketMessageServer.md) 16 | 17 | Instance of a [WebSocketMessageServer](../classes/WebSocketMessageServer.md) which can be used for broadcasting. 18 | 19 | #### Defined in 20 | 21 | [packages/repack/src/server/ws/WebSocketEventsServer.ts:12](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/server/ws/WebSocketEventsServer.ts#L12) 22 | -------------------------------------------------------------------------------- /website/src/v2/api/node/interfaces/WebSocketHMRServerConfig.md: -------------------------------------------------------------------------------- 1 | # Interface: WebSocketHMRServerConfig 2 | 3 | [WebSocketHMRServer](../classes/WebSocketHMRServer.md) configuration options. 4 | 5 | ## Table of contents 6 | 7 | ### Properties 8 | 9 | - [compiler](./WebSocketHMRServerConfig.md#compiler) 10 | 11 | ## Properties 12 | 13 | ### compiler 14 | 15 | • **compiler**: `Compiler` 16 | 17 | Instance of Webpack compiler 18 | 19 | #### Defined in 20 | 21 | [packages/repack/src/server/ws/WebSocketHMRServer.ts:12](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/server/ws/WebSocketHMRServer.ts#L12) 22 | -------------------------------------------------------------------------------- /website/src/v2/api/node/types/DevServerReply.md: -------------------------------------------------------------------------------- 1 | # Type alias: DevServerReply 2 | 3 | Ƭ **DevServerReply**: `FastifyReply`<`Server` \| `Http2SecureServer`, `Http2ServerRequest`, `Http2ServerResponse`, `RouteGenericInterface`, `unknown`\> 4 | 5 | #### Defined in 6 | 7 | [packages/repack/src/server/types.ts:29](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/server/types.ts#L29) 8 | -------------------------------------------------------------------------------- /website/src/v2/api/node/types/DevServerRequest.md: -------------------------------------------------------------------------------- 1 | # Type alias: DevServerRequest 2 | 3 | Ƭ **DevServerRequest**: `FastifyRequest`<`RouteGenericInterface`, `Server` \| `Http2SecureServer`, `Http2ServerRequest`\> 4 | 5 | #### Defined in 6 | 7 | [packages/repack/src/server/types.ts:23](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/server/types.ts#L23) 8 | -------------------------------------------------------------------------------- /website/src/v2/api/node/types/FastifyDevServer.md: -------------------------------------------------------------------------------- 1 | # Type alias: FastifyDevServer 2 | 3 | Ƭ **FastifyDevServer**: `FastifyInstance`<`Http2SecureServer` \| `Server`, `Http2ServerRequest`, `Http2ServerResponse`\> 4 | 5 | #### Defined in 6 | 7 | [packages/repack/src/server/types.ts:17](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/server/types.ts#L17) 8 | -------------------------------------------------------------------------------- /website/src/v2/api/node/types/GenericFilter.md: -------------------------------------------------------------------------------- 1 | # Type alias: GenericFilter 2 | 3 | Ƭ **GenericFilter**: (`string` \| `RegExp`)[] 4 | 5 | #### Defined in 6 | 7 | [packages/repack/src/webpack/plugins/LoggerPlugin.ts:5](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/plugins/LoggerPlugin.ts#L5) 8 | -------------------------------------------------------------------------------- /website/src/v2/api/node/types/LogType.md: -------------------------------------------------------------------------------- 1 | # Type alias: LogType 2 | 3 | Ƭ **LogType**: ``"debug"`` \| ``"info"`` \| ``"warn"`` \| ``"error"`` 4 | 5 | Log message type. 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/types.ts:163](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/types.ts#L163) 10 | -------------------------------------------------------------------------------- /website/src/v2/api/node/types/Mode.md: -------------------------------------------------------------------------------- 1 | # Type alias: Mode 2 | 3 | Ƭ **Mode**: ``"production"`` \| ``"development"`` 4 | 5 | #### Defined in 6 | 7 | [packages/repack/src/webpack/utils/env/getMode.ts:5](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/env/getMode.ts#L5) 8 | -------------------------------------------------------------------------------- /website/src/v2/api/node/types/OnSendHookHandler.md: -------------------------------------------------------------------------------- 1 | # Type alias: OnSendHookHandler 2 | 3 | Ƭ **OnSendHookHandler**<`T`\>: `onSendHookHandler`<`T`, `Http2SecureServer` \| `Server`, `Http2ServerRequest`, `Http2ServerResponse`\> 4 | 5 | #### Type parameters 6 | 7 | | Name | 8 | | :------ | 9 | | `T` | 10 | 11 | #### Defined in 12 | 13 | [packages/repack/src/server/types.ts:37](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/server/types.ts#L37) 14 | -------------------------------------------------------------------------------- /website/src/v2/api/node/types/Rule.md: -------------------------------------------------------------------------------- 1 | # Type alias: Rule 2 | 3 | Ƭ **Rule**: `string` \| `RegExp` 4 | 5 | #### Defined in 6 | 7 | [packages/repack/src/types.ts:3](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/types.ts#L3) 8 | -------------------------------------------------------------------------------- /website/src/v2/api/node/types/WebpackLogger.md: -------------------------------------------------------------------------------- 1 | # Type alias: WebpackLogger 2 | 3 | Ƭ **WebpackLogger**: `ReturnType`<`webpack.Compiler`[``"getInfrastructureLogger"``]\> 4 | 5 | Represent interface of Webpack logger. 6 | See: https://webpack.js.org/api/logging/ 7 | 8 | #### Defined in 9 | 10 | [packages/repack/src/types.ts:13](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/types.ts#L13) 11 | -------------------------------------------------------------------------------- /website/src/v2/api/node/variables/ASSET_EXTENSIONS.md: -------------------------------------------------------------------------------- 1 | # Variable: ASSET\_EXTENSIONS 2 | 3 | • `Const` **ASSET\_EXTENSIONS**: `string`[] 4 | 5 | Extensions array of all supported assets by Re.Pack's Assets loader. 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/webpack/utils/assetExtensions.ts:16](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/assetExtensions.ts#L16) 10 | -------------------------------------------------------------------------------- /website/src/v2/api/node/variables/DEFAULT_PORT.md: -------------------------------------------------------------------------------- 1 | # Variable: DEFAULT\_PORT 2 | 3 | • `Const` **DEFAULT\_PORT**: ``8081`` 4 | 5 | Default development server (proxy) port. 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/webpack/utils/env/getDevServerOptions.ts:6](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/env/getDevServerOptions.ts#L6) 10 | -------------------------------------------------------------------------------- /website/src/v2/api/node/variables/SCALABLE_ASSETS.md: -------------------------------------------------------------------------------- 1 | # Variable: SCALABLE\_ASSETS 2 | 3 | • `Const` **SCALABLE\_ASSETS**: `string`[] 4 | 5 | Extensions array of all scalable assets - images. 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/webpack/utils/assetExtensions.ts:2](https://github.com/callstack/repack/blob/a78f6b9/packages/repack/src/webpack/utils/assetExtensions.ts#L2) 10 | -------------------------------------------------------------------------------- /website/src/v2/api/react-native/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "index", 5 | "label": "Table of Contents" 6 | }, 7 | { 8 | "type": "dir", 9 | "name": "classes", 10 | "label": "Classes" 11 | }, 12 | { 13 | "type": "dir", 14 | "name": "interfaces", 15 | "label": "Interfaces" 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "types", 20 | "label": "Types" 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /website/src/v2/api/react-native/index.md: -------------------------------------------------------------------------------- 1 | # Re.Pack React Native APIs 2 | 3 | ## Table of contents 4 | 5 | ### Classes 6 | 7 | - [Chunk](./classes/Chunk.md) 8 | - [ChunkManager](./classes/ChunkManager.md) 9 | 10 | ### Interfaces 11 | 12 | - [ChunkConfig](./interfaces/ChunkConfig.md) 13 | - [ChunkManagerConfig](./interfaces/ChunkManagerConfig.md) 14 | - [RemoteChunkLocation](./interfaces/RemoteChunkLocation.md) 15 | - [StorageApi](./interfaces/StorageApi.md) 16 | 17 | ### Type aliases 18 | 19 | - [RemoteChunkResolver](./types/RemoteChunkResolver.md) 20 | -------------------------------------------------------------------------------- /website/src/v2/docs/code-splitting/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | "concepts", 3 | "usage", 4 | "glossary", 5 | "guide-async-chunks", 6 | "caching-versioning", 7 | "react-navigation", 8 | "code-push" 9 | ] 10 | -------------------------------------------------------------------------------- /website/src/v2/public/img/devtools-mf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v2/public/img/devtools-mf.png -------------------------------------------------------------------------------- /website/src/v2/public/img/devtools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v2/public/img/devtools.png -------------------------------------------------------------------------------- /website/src/v2/public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v2/public/img/favicon.ico -------------------------------------------------------------------------------- /website/src/v2/public/img/init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v2/public/img/init.png -------------------------------------------------------------------------------- /website/src/v2/public/img/og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v2/public/img/og-image.png -------------------------------------------------------------------------------- /website/src/v2/public/img/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v2/public/img/start.png -------------------------------------------------------------------------------- /website/src/v3/404.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | pageType: custom 3 | --- 4 | 5 | import { NotFoundLayout } from '@theme'; 6 | 7 | 8 | -------------------------------------------------------------------------------- /website/src/v3/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "text": "Docs", 4 | "link": "/docs/getting-started", 5 | "activeMatch": "^/docs/" 6 | }, 7 | { 8 | "text": "API", 9 | "link": "/api/about", 10 | "activeMatch": "^/api/" 11 | }, 12 | { 13 | "text": "Version", 14 | "items": [ 15 | { 16 | "text": "5.x (latest)", 17 | "link": "https://re-pack.dev/" 18 | }, 19 | { 20 | "text": "4.x", 21 | "link": "https://v4.re-pack.dev/" 22 | }, 23 | { 24 | "text": "3.x (selected)", 25 | "link": "https://v3.re-pack.dev/" 26 | }, 27 | { 28 | "text": "2.x", 29 | "link": "https://v2.re-pack.dev/" 30 | } 31 | ] 32 | }, 33 | { 34 | "text": "Examples", 35 | "link": "https://github.com/callstack/repack-examples" 36 | } 37 | ] 38 | -------------------------------------------------------------------------------- /website/src/v3/api/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section-header", 4 | "label": "API" 5 | }, 6 | { 7 | "type": "file", 8 | "name": "about", 9 | "label": "About" 10 | }, 11 | { 12 | "type": "dir", 13 | "name": "repack", 14 | "label": "@callstack/repack", 15 | "collapsed": true 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "repack/client", 20 | "label": "@callstack/repack/client", 21 | "collapsed": true 22 | }, 23 | { 24 | "type": "dir", 25 | "name": "dev-server", 26 | "label": "@callstack/repack-dev-server", 27 | "collapsed": true 28 | } 29 | ] 30 | -------------------------------------------------------------------------------- /website/src/v3/api/about.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | API documentation for Re.Pack is split into few categories: 4 | 5 | - [`@callstack/repack`](./repack/index.md) - documentation for APIs used to configure bundling or development processes: Webpack plugins, utilities and commands. 6 | - [`@callstack/repack/client`](./repack/client/index.md) - documentation for client-facing APIs, which you can use inside your application, for example `ScriptManager`. 7 | - [`@callstack/repack-dev-server`](./dev-server/index.md) - documentation for bundler-agnostic development server. Unless, you're trying to integrate a bundler other than Webpack, this API will not be useful to you. 8 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "index", 5 | "label": "Table of contents" 6 | }, 7 | { 8 | "type": "dir", 9 | "name": "enums", 10 | "label": "Enums" 11 | }, 12 | { 13 | "type": "dir", 14 | "name": "functions", 15 | "label": "Functions" 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "interfaces", 20 | "label": "Interfaces" 21 | }, 22 | { 23 | "type": "dir", 24 | "name": "modules", 25 | "label": "Modules" 26 | }, 27 | { 28 | "type": "dir", 29 | "name": "types", 30 | "label": "Types" 31 | } 32 | ] 33 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/index.md: -------------------------------------------------------------------------------- 1 | # @callstack/repack-dev-server 2 | 3 | ## Table of contents 4 | 5 | ### Namespaces 6 | 7 | - [Internal](./modules/Internal.md) 8 | - [Server](./modules/Server.md) 9 | 10 | ### Interfaces 11 | 12 | - [CodeFrame](./interfaces/CodeFrame.md) 13 | - [CompilerDelegate](./interfaces/CompilerDelegate.md) 14 | - [HmrDelegate](./interfaces/HmrDelegate.md) 15 | - [InputStackFrame](./interfaces/InputStackFrame.md) 16 | - [ProgressData](./interfaces/ProgressData.md) 17 | - [ReactNativeStackFrame](./interfaces/ReactNativeStackFrame.md) 18 | - [StackFrame](./interfaces/StackFrame.md) 19 | - [SymbolicatorDelegate](./interfaces/SymbolicatorDelegate.md) 20 | - [SymbolicatorResults](./interfaces/SymbolicatorResults.md) 21 | 22 | ### Type Aliases 23 | 24 | - [SendProgress](./types/SendProgress.md) 25 | 26 | ### Functions 27 | 28 | - [createServer](./functions/createServer.md) 29 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/interfaces/ProgressData.md: -------------------------------------------------------------------------------- 1 | # Interface: ProgressData 2 | 3 | Representation of the compilation progress. 4 | 5 | ## Table of contents 6 | 7 | ### Properties 8 | 9 | - [completed](./ProgressData.md#completed) 10 | - [total](./ProgressData.md#total) 11 | 12 | ## Properties 13 | 14 | ### completed 15 | 16 | • **completed**: `number` 17 | 18 | Number of modules built. 19 | 20 | #### Defined in 21 | 22 | [types.ts:178](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L178) 23 | 24 | ___ 25 | 26 | ### total 27 | 28 | • **total**: `number` 29 | 30 | Total number of modules detect as part of compilation. 31 | 32 | #### Defined in 33 | 34 | [types.ts:181](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L181) 35 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/interfaces/Server.Api.Asset.md: -------------------------------------------------------------------------------- 1 | # Interface: Asset 2 | 3 | [Server](../modules/Server.md).[Api](../modules/Server.Api.md).Asset 4 | 5 | A compilation asset representation for API clients. 6 | 7 | ## Indexable 8 | 9 | ▪ [key: `string`]: `any` 10 | 11 | ## Table of contents 12 | 13 | ### Properties 14 | 15 | - [name](./Server.Api.Asset.md#name) 16 | - [size](./Server.Api.Asset.md#size) 17 | 18 | ## Properties 19 | 20 | ### name 21 | 22 | • **name**: `string` 23 | 24 | #### Defined in 25 | 26 | [types.ts:141](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L141) 27 | 28 | ___ 29 | 30 | ### size 31 | 32 | • **size**: `number` 33 | 34 | #### Defined in 35 | 36 | [types.ts:142](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L142) 37 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/interfaces/Server.Api.CompilationStats.md: -------------------------------------------------------------------------------- 1 | # Interface: CompilationStats 2 | 3 | [Server](../modules/Server.md).[Api](../modules/Server.Api.md).CompilationStats 4 | 5 | A compilation stats representation for API clients. 6 | 7 | ## Indexable 8 | 9 | ▪ [key: `string`]: `any` 10 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/interfaces/Server.LoggerDelegate.md: -------------------------------------------------------------------------------- 1 | # Interface: LoggerDelegate 2 | 3 | [Server](../modules/Server.md).LoggerDelegate 4 | 5 | Delegate with implementation for logging functions. 6 | 7 | ## Table of contents 8 | 9 | ### Methods 10 | 11 | - [onMessage](./Server.LoggerDelegate.md#onmessage) 12 | 13 | ## Methods 14 | 15 | ### onMessage 16 | 17 | ▸ **onMessage**(`log`): `void` 18 | 19 | Callback for when a new log is emitted. 20 | 21 | #### Parameters 22 | 23 | | Name | Type | Description | 24 | | :------ | :------ | :------ | 25 | | `log` | `any` | An object with log data. | 26 | 27 | #### Returns 28 | 29 | `void` 30 | 31 | #### Defined in 32 | 33 | [types.ts:124](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L124) 34 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/interfaces/SymbolicatorResults.md: -------------------------------------------------------------------------------- 1 | # Interface: SymbolicatorResults 2 | 3 | Represents results of running {@link process} method on {@link Symbolicator} instance. 4 | 5 | ## Table of contents 6 | 7 | ### Properties 8 | 9 | - [codeFrame](./SymbolicatorResults.md#codeframe) 10 | - [stack](./SymbolicatorResults.md#stack) 11 | 12 | ## Properties 13 | 14 | ### codeFrame 15 | 16 | • **codeFrame**: ``null`` \| [`CodeFrame`](./CodeFrame.md) 17 | 18 | #### Defined in 19 | 20 | [plugins/symbolicate/types.ts:41](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/plugins/symbolicate/types.ts#L41) 21 | 22 | ___ 23 | 24 | ### stack 25 | 26 | • **stack**: [`StackFrame`](./StackFrame.md)[] 27 | 28 | #### Defined in 29 | 30 | [plugins/symbolicate/types.ts:42](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/plugins/symbolicate/types.ts#L42) 31 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/modules/Internal.md: -------------------------------------------------------------------------------- 1 | # Namespace: Internal 2 | 3 | Internal types. Do not use. 4 | 5 | **`internal`** 6 | 7 | ## Table of contents 8 | 9 | ### Enumerations 10 | 11 | - [EventTypes](../enums/Internal.EventTypes.md) 12 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/modules/Server.Api.md: -------------------------------------------------------------------------------- 1 | # Namespace: Api 2 | 3 | [Server](./Server.md).Api 4 | 5 | ## Table of contents 6 | 7 | ### Interfaces 8 | 9 | - [Asset](../interfaces/Server.Api.Asset.md) 10 | - [CompilationStats](../interfaces/Server.Api.CompilationStats.md) 11 | - [Delegate](../interfaces/Server.Api.Delegate.md) 12 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/modules/Server.md: -------------------------------------------------------------------------------- 1 | # Namespace: Server 2 | 3 | ## Table of contents 4 | 5 | ### Namespaces 6 | 7 | - [Api](./Server.Api.md) 8 | 9 | ### Interfaces 10 | 11 | - [Config](../interfaces/Server.Config.md) 12 | - [Delegate](../interfaces/Server.Delegate.md) 13 | - [DelegateContext](../interfaces/Server.DelegateContext.md) 14 | - [LoggerDelegate](../interfaces/Server.LoggerDelegate.md) 15 | - [MessagesDelegate](../interfaces/Server.MessagesDelegate.md) 16 | - [Options](../interfaces/Server.Options.md) 17 | -------------------------------------------------------------------------------- /website/src/v3/api/dev-server/types/SendProgress.md: -------------------------------------------------------------------------------- 1 | # Type alias: SendProgress 2 | 3 | Ƭ **SendProgress**: (`data`: [`ProgressData`](../interfaces/ProgressData.md)) => `void` 4 | 5 | #### Type declaration 6 | 7 | ▸ (`data`): `void` 8 | 9 | Type representing a function to send the progress. 10 | 11 | Used by [CompilerDelegate](../interfaces/CompilerDelegate.md) in `getAsset` function to send the compilation 12 | progress to the client who requested the asset. 13 | 14 | ##### Parameters 15 | 16 | | Name | Type | 17 | | :------ | :------ | 18 | | `data` | [`ProgressData`](../interfaces/ProgressData.md) | 19 | 20 | ##### Returns 21 | 22 | `void` 23 | 24 | #### Defined in 25 | 26 | [types.ts:190](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L190) 27 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "index", 5 | "label": "Table of contents" 6 | }, 7 | { 8 | "type": "dir", 9 | "name": "classes", 10 | "label": "Classes" 11 | }, 12 | { 13 | "type": "dir", 14 | "name": "functions", 15 | "label": "Functions" 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "interfaces", 20 | "label": "Interfaces" 21 | }, 22 | { 23 | "type": "dir", 24 | "name": "modules", 25 | "label": "Modules" 26 | }, 27 | { 28 | "type": "dir", 29 | "name": "types", 30 | "label": "Types" 31 | }, 32 | { 33 | "type": "dir", 34 | "name": "variables", 35 | "label": "Variables" 36 | } 37 | ] 38 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/client/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "index", 5 | "label": "Table of contents" 6 | }, 7 | { 8 | "type": "dir", 9 | "name": "classes", 10 | "label": "Classes" 11 | }, 12 | { 13 | "type": "dir", 14 | "name": "functions", 15 | "label": "Functions" 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "interfaces", 20 | "label": "Interfaces" 21 | }, 22 | { 23 | "type": "dir", 24 | "name": "modules", 25 | "label": "Modules" 26 | }, 27 | { 28 | "type": "dir", 29 | "name": "types", 30 | "label": "Types" 31 | } 32 | ] 33 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/client/functions/getWebpackContext.md: -------------------------------------------------------------------------------- 1 | # Function: getWebpackContext 2 | 3 | ▸ **getWebpackContext**(): [`WebpackContext`](../interfaces/WebpackContext.md) 4 | 5 | Get Webpack runtime context form current JavaScript scope. 6 | 7 | __You likely don't need to use it.__ 8 | 9 | #### Returns 10 | 11 | [`WebpackContext`](../interfaces/WebpackContext.md) 12 | 13 | #### Defined in 14 | 15 | [packages/repack/src/modules/ScriptManager/getWebpackContext.ts:10](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/modules/ScriptManager/getWebpackContext.ts#L10) 16 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/client/index.md: -------------------------------------------------------------------------------- 1 | # @callstack/repack/client 2 | 3 | ## Table of contents 4 | 5 | ### Namespaces 6 | 7 | - [Federated](./modules/Federated.md) 8 | 9 | ### Classes 10 | 11 | - [Script](./classes/Script.md) 12 | - [ScriptManager](./classes/ScriptManager.md) 13 | 14 | ### Interfaces 15 | 16 | - [NormalizedScriptLocator](./interfaces/NormalizedScriptLocator.md) 17 | - [ResolverOptions](./interfaces/ResolverOptions.md) 18 | - [ScriptLocator](./interfaces/ScriptLocator.md) 19 | - [StorageApi](./interfaces/StorageApi.md) 20 | - [WebpackContext](./interfaces/WebpackContext.md) 21 | 22 | ### Type Aliases 23 | 24 | - [ScriptLocatorResolver](./types/ScriptLocatorResolver.md) 25 | 26 | ### Functions 27 | 28 | - [getWebpackContext](./functions/getWebpackContext.md) 29 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/client/interfaces/ResolverOptions.md: -------------------------------------------------------------------------------- 1 | # Interface: ResolverOptions 2 | 3 | ## Table of contents 4 | 5 | ### Properties 6 | 7 | - [priority](./ResolverOptions.md#priority) 8 | 9 | ## Properties 10 | 11 | ### priority 12 | 13 | • `Optional` **priority**: `number` 14 | 15 | Priority of the resolver. Defaults to `2`. 16 | Resolvers are called based on the highest priority, 17 | so higher the number, the higher priority the resolver gets. 18 | 19 | #### Defined in 20 | 21 | [packages/repack/src/modules/ScriptManager/ScriptManager.ts:28](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/modules/ScriptManager/ScriptManager.ts#L28) 22 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/client/modules/Federated.md: -------------------------------------------------------------------------------- 1 | # Namespace: Federated 2 | 3 | Namespace for runtime utilities for Module Federation. 4 | 5 | ## Table of contents 6 | 7 | ### Interfaces 8 | 9 | - [URLResolverConfig](../interfaces/Federated.URLResolverConfig.md) 10 | 11 | ### Type Aliases 12 | 13 | - [URLResolver](../types/Federated.URLResolver.md) 14 | 15 | ### Functions 16 | 17 | - [createURLResolver](../functions/Federated.createURLResolver.md) 18 | - [importModule](../functions/Federated.importModule.md) 19 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/functions/adaptFilenameToPlatform.md: -------------------------------------------------------------------------------- 1 | # Function: adaptFilenameToPlatform 2 | 3 | ▸ **adaptFilenameToPlatform**(`filename`): `string` 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `filename` | `string` | 10 | 11 | #### Returns 12 | 13 | `string` 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/adaptFilenameToPlatform.ts:5](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/utils/adaptFilenameToPlatform.ts#L5) 18 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/functions/bundle.md: -------------------------------------------------------------------------------- 1 | # Function: bundle 2 | 3 | ▸ **bundle**(`_`, `config`, `args`): `Promise`<`void`\> 4 | 5 | Bundle command for React Native CLI. 6 | It runs Webpack, builds bundle and saves it alongside any other assets and Source Map 7 | to filesystem. 8 | 9 | **`internal`** 10 | 11 | #### Parameters 12 | 13 | | Name | Type | Description | 14 | | :------ | :------ | :------ | 15 | | `_` | `string`[] | Original, non-parsed arguments that were provided when running this command. | 16 | | `config` | `Config` | React Native CLI configuration object. | 17 | | `args` | [`BundleArguments`](../interfaces/BundleArguments.md) | Parsed command line arguments. | 18 | 19 | #### Returns 20 | 21 | `Promise`<`void`\> 22 | 23 | #### Defined in 24 | 25 | [packages/repack/src/commands/bundle.ts:23](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/commands/bundle.ts#L23) 26 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/functions/composeReporters.md: -------------------------------------------------------------------------------- 1 | # Function: composeReporters 2 | 3 | ▸ **composeReporters**(`reporters`): [`Reporter`](../interfaces/Reporter.md) 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `reporters` | [`Reporter`](../interfaces/Reporter.md)[] | 10 | 11 | #### Returns 12 | 13 | [`Reporter`](../interfaces/Reporter.md) 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/logging/compose.ts:3](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/logging/compose.ts#L3) 18 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/functions/getWebpackEnvOptions.md: -------------------------------------------------------------------------------- 1 | # Function: getWebpackEnvOptions 2 | 3 | ▸ **getWebpackEnvOptions**(`cliOptions`): [`WebpackEnvOptions`](../interfaces/WebpackEnvOptions.md) 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `cliOptions` | [`CliOptions`](../interfaces/CliOptions.md) | 10 | 11 | #### Returns 12 | 13 | [`WebpackEnvOptions`](../interfaces/WebpackEnvOptions.md) 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/getWebpackEnvOptions.ts:5](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/utils/getWebpackEnvOptions.ts#L5) 18 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/functions/makeLogEntryFromFastifyLog.md: -------------------------------------------------------------------------------- 1 | # Function: makeLogEntryFromFastifyLog 2 | 3 | ▸ **makeLogEntryFromFastifyLog**(`data`): [`LogEntry`](../interfaces/LogEntry.md) 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `data` | `any` | 10 | 11 | #### Returns 12 | 13 | [`LogEntry`](../interfaces/LogEntry.md) 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/logging/makeLogEntryFromFastifyLog.ts:3](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/logging/makeLogEntryFromFastifyLog.ts#L3) 18 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/interfaces/Fallback.md: -------------------------------------------------------------------------------- 1 | # Interface: Fallback 2 | 3 | ## Type parameters 4 | 5 | | Name | 6 | | :------ | 7 | | `T` | 8 | 9 | ## Table of contents 10 | 11 | ### Properties 12 | 13 | - [fallback](./Fallback.md#fallback) 14 | 15 | ## Properties 16 | 17 | ### fallback 18 | 19 | • **fallback**: `T` \| () => `T` 20 | 21 | #### Defined in 22 | 23 | [packages/repack/src/types.ts:6](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L6) 24 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/interfaces/FileReporterConfig.md: -------------------------------------------------------------------------------- 1 | # Interface: FileReporterConfig 2 | 3 | ## Table of contents 4 | 5 | ### Properties 6 | 7 | - [filename](./FileReporterConfig.md#filename) 8 | 9 | ## Properties 10 | 11 | ### filename 12 | 13 | • **filename**: `string` 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/logging/reporters/FileReporter.ts:7](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/logging/reporters/FileReporter.ts#L7) 18 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/interfaces/HMRMessage.md: -------------------------------------------------------------------------------- 1 | # Interface: HMRMessage 2 | 3 | Represent Hot Module Replacement Update message. 4 | 5 | **`internal`** 6 | 7 | ## Table of contents 8 | 9 | ### Properties 10 | 11 | - [action](./HMRMessage.md#action) 12 | - [body](./HMRMessage.md#body) 13 | 14 | ## Properties 15 | 16 | ### action 17 | 18 | • **action**: ``"building"`` \| ``"built"`` \| ``"sync"`` 19 | 20 | #### Defined in 21 | 22 | [packages/repack/src/types.ts:198](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L198) 23 | 24 | ___ 25 | 26 | ### body 27 | 28 | • **body**: ``null`` \| [`HMRMessageBody`](./HMRMessageBody.md) 29 | 30 | #### Defined in 31 | 32 | [packages/repack/src/types.ts:199](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L199) 33 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/interfaces/plugins.RepackTargetPluginConfig.md: -------------------------------------------------------------------------------- 1 | # Interface: RepackTargetPluginConfig 2 | 3 | [plugins](../modules/plugins.md).RepackTargetPluginConfig 4 | 5 | [RepackTargetPlugin](../classes/plugins.RepackTargetPlugin.md) configuration options. 6 | 7 | ## Hierarchy 8 | 9 | - `Pick`<[`DevServerOptions`](./DevServerOptions.md), ``"hmr"``\> 10 | 11 | ↳ **`RepackTargetPluginConfig`** 12 | 13 | ## Table of contents 14 | 15 | ### Properties 16 | 17 | - [hmr](./plugins.RepackTargetPluginConfig.md#hmr) 18 | 19 | ## Properties 20 | 21 | ### hmr 22 | 23 | • `Optional` **hmr**: `boolean` 24 | 25 | Whether to enable Hot Module Replacement. 26 | 27 | #### Inherited from 28 | 29 | Pick.hmr 30 | 31 | #### Defined in 32 | 33 | [packages/repack/src/types.ts:130](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L130) 34 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/modules/Federated.md: -------------------------------------------------------------------------------- 1 | # Namespace: Federated 2 | 3 | Namespace for utilities for Module Federation. 4 | 5 | ## Table of contents 6 | 7 | ### Variables 8 | 9 | - [SHARED\_REACT](../variables/Federated.SHARED_REACT.md) 10 | - [SHARED\_REACT\_NATIVE](../variables/Federated.SHARED_REACT_NATIVE.md) 11 | 12 | ### Functions 13 | 14 | - [createRemote](../functions/Federated.createRemote.md) 15 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/types/LogType.md: -------------------------------------------------------------------------------- 1 | # Type alias: LogType 2 | 3 | Ƭ **LogType**: ``"debug"`` \| ``"info"`` \| ``"warn"`` \| ``"error"`` 4 | 5 | Log message type. 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/logging/types.ts:8](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/logging/types.ts#L8) 10 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/types/Rule.md: -------------------------------------------------------------------------------- 1 | # Type alias: Rule 2 | 3 | Ƭ **Rule**: `string` \| `RegExp` 4 | 5 | #### Defined in 6 | 7 | [packages/repack/src/types.ts:3](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L3) 8 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/types/WebpackLogger.md: -------------------------------------------------------------------------------- 1 | # Type alias: WebpackLogger 2 | 3 | Ƭ **WebpackLogger**: `ReturnType`<`webpack.Compiler`[``"getInfrastructureLogger"``]\> 4 | 5 | Represent interface of Webpack logger. 6 | See: https://webpack.js.org/api/logging/ 7 | 8 | #### Defined in 9 | 10 | [packages/repack/src/types.ts:13](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L13) 11 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/types/plugins.DestinationConfig.md: -------------------------------------------------------------------------------- 1 | # Type alias: DestinationConfig 2 | 3 | [plugins](../modules/plugins.md).DestinationConfig 4 | 5 | Ƭ **DestinationConfig**: [`LocalDestinationConfig`](./plugins.LocalDestinationConfig.md) \| [`RemoteDestinationConfig`](./plugins.RemoteDestinationConfig.md) 6 | 7 | Destination config for chunks. 8 | 9 | #### Defined in 10 | 11 | [packages/repack/src/webpack/plugins/OutputPlugin.ts:50](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/plugins/OutputPlugin.ts#L50) 12 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/types/plugins.DestinationSpec.md: -------------------------------------------------------------------------------- 1 | # Type alias: DestinationSpec 2 | 3 | [plugins](../modules/plugins.md).DestinationSpec 4 | 5 | Ƭ **DestinationSpec**: [`DestinationMatchRules`](./plugins.DestinationMatchRules.md) & [`DestinationConfig`](./plugins.DestinationConfig.md) 6 | 7 | Destination specification for chunks. 8 | 9 | #### Defined in 10 | 11 | [packages/repack/src/webpack/plugins/OutputPlugin.ts:57](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/plugins/OutputPlugin.ts#L57) 12 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/types/plugins.GenericFilter.md: -------------------------------------------------------------------------------- 1 | # Type alias: GenericFilter 2 | 3 | [plugins](../modules/plugins.md).GenericFilter 4 | 5 | Ƭ **GenericFilter**: (`string` \| `RegExp`)[] 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/webpack/plugins/LoggerPlugin.ts:13](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/plugins/LoggerPlugin.ts#L13) 10 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/types/plugins.LocalDestinationConfig.md: -------------------------------------------------------------------------------- 1 | # Type alias: LocalDestinationConfig 2 | 3 | [plugins](../modules/plugins.md).LocalDestinationConfig 4 | 5 | Ƭ **LocalDestinationConfig**: `Object` 6 | 7 | Destination config for local chunks. 8 | 9 | #### Type declaration 10 | 11 | | Name | Type | 12 | | :------ | :------ | 13 | | `type` | ``"local"`` | 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/plugins/OutputPlugin.ts:33](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/plugins/OutputPlugin.ts#L33) 18 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/types/plugins.RemoteDestinationConfig.md: -------------------------------------------------------------------------------- 1 | # Type alias: RemoteDestinationConfig 2 | 3 | [plugins](../modules/plugins.md).RemoteDestinationConfig 4 | 5 | Ƭ **RemoteDestinationConfig**: `Object` 6 | 7 | Destination config for remote chunks. 8 | 9 | #### Type declaration 10 | 11 | | Name | Type | Description | 12 | | :------ | :------ | :------ | 13 | | `outputPath` | `string` | Output path to a directory, where remote chunks should be saved. | 14 | | `type` | ``"remote"`` | - | 15 | 16 | #### Defined in 17 | 18 | [packages/repack/src/webpack/plugins/OutputPlugin.ts:40](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/plugins/OutputPlugin.ts#L40) 19 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/variables/ASSET_EXTENSIONS.md: -------------------------------------------------------------------------------- 1 | # Variable: ASSET\_EXTENSIONS 2 | 3 | • `Const` **ASSET\_EXTENSIONS**: `string`[] 4 | 5 | Extensions array of all supported assets by Re.Pack's Assets loader. 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/webpack/utils/assetExtensions.ts:16](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/utils/assetExtensions.ts#L16) 10 | -------------------------------------------------------------------------------- /website/src/v3/api/repack/variables/SCALABLE_ASSETS.md: -------------------------------------------------------------------------------- 1 | # Variable: SCALABLE\_ASSETS 2 | 3 | • `Const` **SCALABLE\_ASSETS**: `string`[] 4 | 5 | Extensions array of all scalable assets - images. 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/webpack/utils/assetExtensions.ts:2](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/utils/assetExtensions.ts#L2) 10 | -------------------------------------------------------------------------------- /website/src/v3/docs/code-splitting/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | "concept", 3 | "usage", 4 | "glossary", 5 | "guide-async-chunks", 6 | "local-vs-remote-chunks", 7 | "caching-versioning", 8 | "react-navigation", 9 | "code-push" 10 | ] 11 | -------------------------------------------------------------------------------- /website/src/v3/docs/configuration/templates.mdx: -------------------------------------------------------------------------------- 1 | import { CodeBlock } from '@theme'; 2 | import CJSTemplate from '../../../../../templates/webpack.config.cjs?raw'; 3 | import ESMTemplate from '../../../../../templates/webpack.config.mjs?raw'; 4 | 5 | # Templates 6 | 7 | :::info 8 | 9 | Webpack config templates are also available on GitHub repo under [`templates/` directory](https://github.com/callstack/repack/tree/main/templates). 10 | 11 | ::: 12 | 13 | ## ESM template (recommended) 14 | 15 | Recommended extensions for the config: `.mjs` or `.js`, for example: `webpack.config.mjs`. 16 | 17 | 18 | {ESMTemplate} 19 | 20 | 21 | ## CJS templates 22 | 23 | Recommended extensions for the config: `.cjs` or `.js`, for example: `webpack.config.cjs`. 24 | 25 | 26 | {CJSTemplate} 27 | 28 | -------------------------------------------------------------------------------- /website/src/v3/public/img/devtools-mf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v3/public/img/devtools-mf.png -------------------------------------------------------------------------------- /website/src/v3/public/img/devtools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v3/public/img/devtools.png -------------------------------------------------------------------------------- /website/src/v3/public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v3/public/img/favicon.ico -------------------------------------------------------------------------------- /website/src/v3/public/img/init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v3/public/img/init.png -------------------------------------------------------------------------------- /website/src/v3/public/img/og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v3/public/img/og-image.png -------------------------------------------------------------------------------- /website/src/v3/public/img/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v3/public/img/start.png -------------------------------------------------------------------------------- /website/src/v4/404.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | pageType: custom 3 | --- 4 | 5 | import { NotFoundLayout } from '@theme'; 6 | 7 | 8 | -------------------------------------------------------------------------------- /website/src/v4/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "text": "Docs", 4 | "link": "/docs/getting-started", 5 | "activeMatch": "^/docs/" 6 | }, 7 | { 8 | "text": "API", 9 | "link": "/api/about", 10 | "activeMatch": "^/api/" 11 | }, 12 | { 13 | "text": "Version", 14 | "items": [ 15 | { 16 | "text": "5.x (latest)", 17 | "link": "https://re-pack.dev/" 18 | }, 19 | { 20 | "text": "4.x (selected)", 21 | "link": "https://v4.re-pack.dev/" 22 | }, 23 | { 24 | "text": "3.x", 25 | "link": "https://v3.re-pack.dev/" 26 | }, 27 | { 28 | "text": "2.x", 29 | "link": "https://v2.re-pack.dev/" 30 | } 31 | ] 32 | }, 33 | { 34 | "text": "Examples", 35 | "link": "https://github.com/callstack/repack-examples" 36 | } 37 | ] 38 | -------------------------------------------------------------------------------- /website/src/v4/api/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section-header", 4 | "label": "API" 5 | }, 6 | { 7 | "type": "file", 8 | "name": "about", 9 | "label": "About" 10 | }, 11 | { 12 | "type": "dir", 13 | "name": "repack", 14 | "label": "@callstack/repack", 15 | "collapsed": true 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "repack/client", 20 | "label": "@callstack/repack/client", 21 | "collapsed": true 22 | }, 23 | { 24 | "type": "dir", 25 | "name": "dev-server", 26 | "label": "@callstack/repack-dev-server", 27 | "collapsed": true 28 | } 29 | ] 30 | -------------------------------------------------------------------------------- /website/src/v4/api/about.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | :::warning 4 | This API documentation is outdated and is scheduled for removal in the future. 5 | Please refer to the source code directly for the most up-to-date information. 6 | ::: 7 | 8 | API documentation for Re.Pack is split into few categories: 9 | 10 | - [`@callstack/repack`](./repack/index.md) - documentation for APIs used to configure bundling or development processes: Webpack plugins, utilities and commands. 11 | - [`@callstack/repack/client`](./repack/client/index.md) - documentation for client-facing APIs, which you can use inside your application, for example `ScriptManager`. 12 | - [`@callstack/repack-dev-server`](./dev-server/index.md) - documentation for bundler-agnostic development server. Unless, you're trying to integrate a bundler other than Webpack, this API will not be useful to you. 13 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "index", 5 | "label": "Table of contents" 6 | }, 7 | { 8 | "type": "dir", 9 | "name": "enums", 10 | "label": "Enums" 11 | }, 12 | { 13 | "type": "dir", 14 | "name": "functions", 15 | "label": "Functions" 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "interfaces", 20 | "label": "Interfaces" 21 | }, 22 | { 23 | "type": "dir", 24 | "name": "modules", 25 | "label": "Modules" 26 | }, 27 | { 28 | "type": "dir", 29 | "name": "types", 30 | "label": "Types" 31 | } 32 | ] 33 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/index.md: -------------------------------------------------------------------------------- 1 | # @callstack/repack-dev-server 2 | 3 | ## Table of contents 4 | 5 | ### Namespaces 6 | 7 | - [Internal](./modules/Internal.md) 8 | - [Server](./modules/Server.md) 9 | 10 | ### Interfaces 11 | 12 | - [CodeFrame](./interfaces/CodeFrame.md) 13 | - [CompilerDelegate](./interfaces/CompilerDelegate.md) 14 | - [HmrDelegate](./interfaces/HmrDelegate.md) 15 | - [InputStackFrame](./interfaces/InputStackFrame.md) 16 | - [ProgressData](./interfaces/ProgressData.md) 17 | - [ReactNativeStackFrame](./interfaces/ReactNativeStackFrame.md) 18 | - [StackFrame](./interfaces/StackFrame.md) 19 | - [SymbolicatorDelegate](./interfaces/SymbolicatorDelegate.md) 20 | - [SymbolicatorResults](./interfaces/SymbolicatorResults.md) 21 | 22 | ### Type Aliases 23 | 24 | - [SendProgress](./types/SendProgress.md) 25 | 26 | ### Functions 27 | 28 | - [createServer](./functions/createServer.md) 29 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/interfaces/ProgressData.md: -------------------------------------------------------------------------------- 1 | # Interface: ProgressData 2 | 3 | Representation of the compilation progress. 4 | 5 | ## Table of contents 6 | 7 | ### Properties 8 | 9 | - [completed](./ProgressData.md#completed) 10 | - [total](./ProgressData.md#total) 11 | 12 | ## Properties 13 | 14 | ### completed 15 | 16 | • **completed**: `number` 17 | 18 | Number of modules built. 19 | 20 | #### Defined in 21 | 22 | [types.ts:178](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L178) 23 | 24 | ___ 25 | 26 | ### total 27 | 28 | • **total**: `number` 29 | 30 | Total number of modules detect as part of compilation. 31 | 32 | #### Defined in 33 | 34 | [types.ts:181](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L181) 35 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/interfaces/Server.Api.Asset.md: -------------------------------------------------------------------------------- 1 | # Interface: Asset 2 | 3 | [Server](../modules/Server.md).[Api](../modules/Server.Api.md).Asset 4 | 5 | A compilation asset representation for API clients. 6 | 7 | ## Indexable 8 | 9 | ▪ [key: `string`]: `any` 10 | 11 | ## Table of contents 12 | 13 | ### Properties 14 | 15 | - [name](./Server.Api.Asset.md#name) 16 | - [size](./Server.Api.Asset.md#size) 17 | 18 | ## Properties 19 | 20 | ### name 21 | 22 | • **name**: `string` 23 | 24 | #### Defined in 25 | 26 | [types.ts:141](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L141) 27 | 28 | ___ 29 | 30 | ### size 31 | 32 | • **size**: `number` 33 | 34 | #### Defined in 35 | 36 | [types.ts:142](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L142) 37 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/interfaces/Server.Api.CompilationStats.md: -------------------------------------------------------------------------------- 1 | # Interface: CompilationStats 2 | 3 | [Server](../modules/Server.md).[Api](../modules/Server.Api.md).CompilationStats 4 | 5 | A compilation stats representation for API clients. 6 | 7 | ## Indexable 8 | 9 | ▪ [key: `string`]: `any` 10 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/interfaces/Server.LoggerDelegate.md: -------------------------------------------------------------------------------- 1 | # Interface: LoggerDelegate 2 | 3 | [Server](../modules/Server.md).LoggerDelegate 4 | 5 | Delegate with implementation for logging functions. 6 | 7 | ## Table of contents 8 | 9 | ### Methods 10 | 11 | - [onMessage](./Server.LoggerDelegate.md#onmessage) 12 | 13 | ## Methods 14 | 15 | ### onMessage 16 | 17 | ▸ **onMessage**(`log`): `void` 18 | 19 | Callback for when a new log is emitted. 20 | 21 | #### Parameters 22 | 23 | | Name | Type | Description | 24 | | :------ | :------ | :------ | 25 | | `log` | `any` | An object with log data. | 26 | 27 | #### Returns 28 | 29 | `void` 30 | 31 | #### Defined in 32 | 33 | [types.ts:124](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L124) 34 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/interfaces/SymbolicatorResults.md: -------------------------------------------------------------------------------- 1 | # Interface: SymbolicatorResults 2 | 3 | Represents results of running {@link process} method on {@link Symbolicator} instance. 4 | 5 | ## Table of contents 6 | 7 | ### Properties 8 | 9 | - [codeFrame](./SymbolicatorResults.md#codeframe) 10 | - [stack](./SymbolicatorResults.md#stack) 11 | 12 | ## Properties 13 | 14 | ### codeFrame 15 | 16 | • **codeFrame**: ``null`` \| [`CodeFrame`](./CodeFrame.md) 17 | 18 | #### Defined in 19 | 20 | [plugins/symbolicate/types.ts:41](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/plugins/symbolicate/types.ts#L41) 21 | 22 | ___ 23 | 24 | ### stack 25 | 26 | • **stack**: [`StackFrame`](./StackFrame.md)[] 27 | 28 | #### Defined in 29 | 30 | [plugins/symbolicate/types.ts:42](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/plugins/symbolicate/types.ts#L42) 31 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/modules/Internal.md: -------------------------------------------------------------------------------- 1 | # Namespace: Internal 2 | 3 | Internal types. Do not use. 4 | 5 | **`internal`** 6 | 7 | ## Table of contents 8 | 9 | ### Enumerations 10 | 11 | - [EventTypes](../enums/Internal.EventTypes.md) 12 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/modules/Server.Api.md: -------------------------------------------------------------------------------- 1 | # Namespace: Api 2 | 3 | [Server](./Server.md).Api 4 | 5 | ## Table of contents 6 | 7 | ### Interfaces 8 | 9 | - [Asset](../interfaces/Server.Api.Asset.md) 10 | - [CompilationStats](../interfaces/Server.Api.CompilationStats.md) 11 | - [Delegate](../interfaces/Server.Api.Delegate.md) 12 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/modules/Server.md: -------------------------------------------------------------------------------- 1 | # Namespace: Server 2 | 3 | ## Table of contents 4 | 5 | ### Namespaces 6 | 7 | - [Api](./Server.Api.md) 8 | 9 | ### Interfaces 10 | 11 | - [Config](../interfaces/Server.Config.md) 12 | - [Delegate](../interfaces/Server.Delegate.md) 13 | - [DelegateContext](../interfaces/Server.DelegateContext.md) 14 | - [LoggerDelegate](../interfaces/Server.LoggerDelegate.md) 15 | - [MessagesDelegate](../interfaces/Server.MessagesDelegate.md) 16 | - [Options](../interfaces/Server.Options.md) 17 | -------------------------------------------------------------------------------- /website/src/v4/api/dev-server/types/SendProgress.md: -------------------------------------------------------------------------------- 1 | # Type alias: SendProgress 2 | 3 | Ƭ **SendProgress**: (`data`: [`ProgressData`](../interfaces/ProgressData.md)) => `void` 4 | 5 | #### Type declaration 6 | 7 | ▸ (`data`): `void` 8 | 9 | Type representing a function to send the progress. 10 | 11 | Used by [CompilerDelegate](../interfaces/CompilerDelegate.md) in `getAsset` function to send the compilation 12 | progress to the client who requested the asset. 13 | 14 | ##### Parameters 15 | 16 | | Name | Type | 17 | | :------ | :------ | 18 | | `data` | [`ProgressData`](../interfaces/ProgressData.md) | 19 | 20 | ##### Returns 21 | 22 | `void` 23 | 24 | #### Defined in 25 | 26 | [types.ts:190](https://github.com/callstack/repack/blob/1d9a1bb/packages/dev-server/src/types.ts#L190) 27 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "index", 5 | "label": "Table of contents" 6 | }, 7 | { 8 | "type": "dir", 9 | "name": "classes", 10 | "label": "Classes" 11 | }, 12 | { 13 | "type": "dir", 14 | "name": "functions", 15 | "label": "Functions" 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "interfaces", 20 | "label": "Interfaces" 21 | }, 22 | { 23 | "type": "dir", 24 | "name": "modules", 25 | "label": "Modules" 26 | }, 27 | { 28 | "type": "dir", 29 | "name": "types", 30 | "label": "Types" 31 | }, 32 | { 33 | "type": "dir", 34 | "name": "variables", 35 | "label": "Variables" 36 | } 37 | ] 38 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/client/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "index", 5 | "label": "Table of contents" 6 | }, 7 | { 8 | "type": "dir", 9 | "name": "classes", 10 | "label": "Classes" 11 | }, 12 | { 13 | "type": "dir", 14 | "name": "functions", 15 | "label": "Functions" 16 | }, 17 | { 18 | "type": "dir", 19 | "name": "interfaces", 20 | "label": "Interfaces" 21 | }, 22 | { 23 | "type": "dir", 24 | "name": "modules", 25 | "label": "Modules" 26 | }, 27 | { 28 | "type": "dir", 29 | "name": "types", 30 | "label": "Types" 31 | } 32 | ] 33 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/client/functions/getWebpackContext.md: -------------------------------------------------------------------------------- 1 | # Function: getWebpackContext 2 | 3 | ▸ **getWebpackContext**(): [`WebpackContext`](../interfaces/WebpackContext.md) 4 | 5 | Get Webpack runtime context form current JavaScript scope. 6 | 7 | __You likely don't need to use it.__ 8 | 9 | #### Returns 10 | 11 | [`WebpackContext`](../interfaces/WebpackContext.md) 12 | 13 | #### Defined in 14 | 15 | [packages/repack/src/modules/ScriptManager/getWebpackContext.ts:10](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/modules/ScriptManager/getWebpackContext.ts#L10) 16 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/client/index.md: -------------------------------------------------------------------------------- 1 | # @callstack/repack/client 2 | 3 | ## Table of contents 4 | 5 | ### Namespaces 6 | 7 | - [Federated](./modules/Federated.md) 8 | 9 | ### Classes 10 | 11 | - [Script](./classes/Script.md) 12 | - [ScriptManager](./classes/ScriptManager.md) 13 | 14 | ### Interfaces 15 | 16 | - [NormalizedScriptLocator](./interfaces/NormalizedScriptLocator.md) 17 | - [ResolverOptions](./interfaces/ResolverOptions.md) 18 | - [ScriptLocator](./interfaces/ScriptLocator.md) 19 | - [StorageApi](./interfaces/StorageApi.md) 20 | - [WebpackContext](./interfaces/WebpackContext.md) 21 | 22 | ### Type Aliases 23 | 24 | - [ScriptLocatorResolver](./types/ScriptLocatorResolver.md) 25 | 26 | ### Functions 27 | 28 | - [getWebpackContext](./functions/getWebpackContext.md) 29 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/client/interfaces/ResolverOptions.md: -------------------------------------------------------------------------------- 1 | # Interface: ResolverOptions 2 | 3 | ## Table of contents 4 | 5 | ### Properties 6 | 7 | - [priority](./ResolverOptions.md#priority) 8 | 9 | ## Properties 10 | 11 | ### priority 12 | 13 | • `Optional` **priority**: `number` 14 | 15 | Priority of the resolver. Defaults to `2`. 16 | Resolvers are called based on the highest priority, 17 | so higher the number, the higher priority the resolver gets. 18 | 19 | #### Defined in 20 | 21 | [packages/repack/src/modules/ScriptManager/ScriptManager.ts:28](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/modules/ScriptManager/ScriptManager.ts#L28) 22 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/client/modules/Federated.md: -------------------------------------------------------------------------------- 1 | # Namespace: Federated 2 | 3 | Namespace for runtime utilities for Module Federation. 4 | 5 | ## Table of contents 6 | 7 | ### Interfaces 8 | 9 | - [URLResolverConfig](../interfaces/Federated.URLResolverConfig.md) 10 | 11 | ### Type Aliases 12 | 13 | - [URLResolver](../types/Federated.URLResolver.md) 14 | 15 | ### Functions 16 | 17 | - [createURLResolver](../functions/Federated.createURLResolver.md) 18 | - [importModule](../functions/Federated.importModule.md) 19 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/functions/adaptFilenameToPlatform.md: -------------------------------------------------------------------------------- 1 | # Function: adaptFilenameToPlatform 2 | 3 | ▸ **adaptFilenameToPlatform**(`filename`): `string` 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `filename` | `string` | 10 | 11 | #### Returns 12 | 13 | `string` 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/adaptFilenameToPlatform.ts:5](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/utils/adaptFilenameToPlatform.ts#L5) 18 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/functions/bundle.md: -------------------------------------------------------------------------------- 1 | # Function: bundle 2 | 3 | ▸ **bundle**(`_`, `config`, `args`): `Promise`<`void`\> 4 | 5 | Bundle command for React Native CLI. 6 | It runs Webpack, builds bundle and saves it alongside any other assets and Source Map 7 | to filesystem. 8 | 9 | **`internal`** 10 | 11 | #### Parameters 12 | 13 | | Name | Type | Description | 14 | | :------ | :------ | :------ | 15 | | `_` | `string`[] | Original, non-parsed arguments that were provided when running this command. | 16 | | `config` | `Config` | React Native CLI configuration object. | 17 | | `args` | [`BundleArguments`](../interfaces/BundleArguments.md) | Parsed command line arguments. | 18 | 19 | #### Returns 20 | 21 | `Promise`<`void`\> 22 | 23 | #### Defined in 24 | 25 | [packages/repack/src/commands/bundle.ts:23](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/commands/bundle.ts#L23) 26 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/functions/composeReporters.md: -------------------------------------------------------------------------------- 1 | # Function: composeReporters 2 | 3 | ▸ **composeReporters**(`reporters`): [`Reporter`](../interfaces/Reporter.md) 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `reporters` | [`Reporter`](../interfaces/Reporter.md)[] | 10 | 11 | #### Returns 12 | 13 | [`Reporter`](../interfaces/Reporter.md) 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/logging/compose.ts:3](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/logging/compose.ts#L3) 18 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/functions/getWebpackEnvOptions.md: -------------------------------------------------------------------------------- 1 | # Function: getWebpackEnvOptions 2 | 3 | ▸ **getWebpackEnvOptions**(`cliOptions`): [`WebpackEnvOptions`](../interfaces/WebpackEnvOptions.md) 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `cliOptions` | [`CliOptions`](../interfaces/CliOptions.md) | 10 | 11 | #### Returns 12 | 13 | [`WebpackEnvOptions`](../interfaces/WebpackEnvOptions.md) 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/utils/getWebpackEnvOptions.ts:5](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/utils/getWebpackEnvOptions.ts#L5) 18 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/functions/makeLogEntryFromFastifyLog.md: -------------------------------------------------------------------------------- 1 | # Function: makeLogEntryFromFastifyLog 2 | 3 | ▸ **makeLogEntryFromFastifyLog**(`data`): [`LogEntry`](../interfaces/LogEntry.md) 4 | 5 | #### Parameters 6 | 7 | | Name | Type | 8 | | :------ | :------ | 9 | | `data` | `any` | 10 | 11 | #### Returns 12 | 13 | [`LogEntry`](../interfaces/LogEntry.md) 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/logging/makeLogEntryFromFastifyLog.ts:3](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/logging/makeLogEntryFromFastifyLog.ts#L3) 18 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/interfaces/Fallback.md: -------------------------------------------------------------------------------- 1 | # Interface: Fallback 2 | 3 | ## Type parameters 4 | 5 | | Name | 6 | | :------ | 7 | | `T` | 8 | 9 | ## Table of contents 10 | 11 | ### Properties 12 | 13 | - [fallback](./Fallback.md#fallback) 14 | 15 | ## Properties 16 | 17 | ### fallback 18 | 19 | • **fallback**: `T` \| () => `T` 20 | 21 | #### Defined in 22 | 23 | [packages/repack/src/types.ts:6](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L6) 24 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/interfaces/FileReporterConfig.md: -------------------------------------------------------------------------------- 1 | # Interface: FileReporterConfig 2 | 3 | ## Table of contents 4 | 5 | ### Properties 6 | 7 | - [filename](./FileReporterConfig.md#filename) 8 | 9 | ## Properties 10 | 11 | ### filename 12 | 13 | • **filename**: `string` 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/logging/reporters/FileReporter.ts:7](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/logging/reporters/FileReporter.ts#L7) 18 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/interfaces/HMRMessage.md: -------------------------------------------------------------------------------- 1 | # Interface: HMRMessage 2 | 3 | Represent Hot Module Replacement Update message. 4 | 5 | **`internal`** 6 | 7 | ## Table of contents 8 | 9 | ### Properties 10 | 11 | - [action](./HMRMessage.md#action) 12 | - [body](./HMRMessage.md#body) 13 | 14 | ## Properties 15 | 16 | ### action 17 | 18 | • **action**: ``"building"`` \| ``"built"`` \| ``"sync"`` 19 | 20 | #### Defined in 21 | 22 | [packages/repack/src/types.ts:198](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L198) 23 | 24 | ___ 25 | 26 | ### body 27 | 28 | • **body**: ``null`` \| [`HMRMessageBody`](./HMRMessageBody.md) 29 | 30 | #### Defined in 31 | 32 | [packages/repack/src/types.ts:199](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L199) 33 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/interfaces/plugins.RepackTargetPluginConfig.md: -------------------------------------------------------------------------------- 1 | # Interface: RepackTargetPluginConfig 2 | 3 | [plugins](../modules/plugins.md).RepackTargetPluginConfig 4 | 5 | [RepackTargetPlugin](../classes/plugins.RepackTargetPlugin.md) configuration options. 6 | 7 | ## Hierarchy 8 | 9 | - `Pick`<[`DevServerOptions`](./DevServerOptions.md), ``"hmr"``\> 10 | 11 | ↳ **`RepackTargetPluginConfig`** 12 | 13 | ## Table of contents 14 | 15 | ### Properties 16 | 17 | - [hmr](./plugins.RepackTargetPluginConfig.md#hmr) 18 | 19 | ## Properties 20 | 21 | ### hmr 22 | 23 | • `Optional` **hmr**: `boolean` 24 | 25 | Whether to enable Hot Module Replacement. 26 | 27 | #### Inherited from 28 | 29 | Pick.hmr 30 | 31 | #### Defined in 32 | 33 | [packages/repack/src/types.ts:130](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L130) 34 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/modules/Federated.md: -------------------------------------------------------------------------------- 1 | # Namespace: Federated 2 | 3 | Namespace for utilities for Module Federation. 4 | 5 | ## Table of contents 6 | 7 | ### Variables 8 | 9 | - [SHARED\_REACT](../variables/Federated.SHARED_REACT.md) 10 | - [SHARED\_REACT\_NATIVE](../variables/Federated.SHARED_REACT_NATIVE.md) 11 | 12 | ### Functions 13 | 14 | - [createRemote](../functions/Federated.createRemote.md) 15 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/types/LogType.md: -------------------------------------------------------------------------------- 1 | # Type alias: LogType 2 | 3 | Ƭ **LogType**: ``"debug"`` \| ``"info"`` \| ``"warn"`` \| ``"error"`` 4 | 5 | Log message type. 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/logging/types.ts:8](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/logging/types.ts#L8) 10 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/types/Rule.md: -------------------------------------------------------------------------------- 1 | # Type alias: Rule 2 | 3 | Ƭ **Rule**: `string` \| `RegExp` 4 | 5 | #### Defined in 6 | 7 | [packages/repack/src/types.ts:3](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L3) 8 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/types/WebpackLogger.md: -------------------------------------------------------------------------------- 1 | # Type alias: WebpackLogger 2 | 3 | Ƭ **WebpackLogger**: `ReturnType`<`webpack.Compiler`[``"getInfrastructureLogger"``]\> 4 | 5 | Represent interface of Webpack logger. 6 | See: https://webpack.js.org/api/logging/ 7 | 8 | #### Defined in 9 | 10 | [packages/repack/src/types.ts:13](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/types.ts#L13) 11 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/types/plugins.DestinationConfig.md: -------------------------------------------------------------------------------- 1 | # Type alias: DestinationConfig 2 | 3 | [plugins](../modules/plugins.md).DestinationConfig 4 | 5 | Ƭ **DestinationConfig**: [`LocalDestinationConfig`](./plugins.LocalDestinationConfig.md) \| [`RemoteDestinationConfig`](./plugins.RemoteDestinationConfig.md) 6 | 7 | Destination config for chunks. 8 | 9 | #### Defined in 10 | 11 | [packages/repack/src/webpack/plugins/OutputPlugin.ts:50](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/plugins/OutputPlugin.ts#L50) 12 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/types/plugins.DestinationSpec.md: -------------------------------------------------------------------------------- 1 | # Type alias: DestinationSpec 2 | 3 | [plugins](../modules/plugins.md).DestinationSpec 4 | 5 | Ƭ **DestinationSpec**: [`DestinationMatchRules`](./plugins.DestinationMatchRules.md) & [`DestinationConfig`](./plugins.DestinationConfig.md) 6 | 7 | Destination specification for chunks. 8 | 9 | #### Defined in 10 | 11 | [packages/repack/src/webpack/plugins/OutputPlugin.ts:57](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/plugins/OutputPlugin.ts#L57) 12 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/types/plugins.GenericFilter.md: -------------------------------------------------------------------------------- 1 | # Type alias: GenericFilter 2 | 3 | [plugins](../modules/plugins.md).GenericFilter 4 | 5 | Ƭ **GenericFilter**: (`string` \| `RegExp`)[] 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/webpack/plugins/LoggerPlugin.ts:13](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/plugins/LoggerPlugin.ts#L13) 10 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/types/plugins.LocalDestinationConfig.md: -------------------------------------------------------------------------------- 1 | # Type alias: LocalDestinationConfig 2 | 3 | [plugins](../modules/plugins.md).LocalDestinationConfig 4 | 5 | Ƭ **LocalDestinationConfig**: `Object` 6 | 7 | Destination config for local chunks. 8 | 9 | #### Type declaration 10 | 11 | | Name | Type | 12 | | :------ | :------ | 13 | | `type` | ``"local"`` | 14 | 15 | #### Defined in 16 | 17 | [packages/repack/src/webpack/plugins/OutputPlugin.ts:33](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/plugins/OutputPlugin.ts#L33) 18 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/types/plugins.RemoteDestinationConfig.md: -------------------------------------------------------------------------------- 1 | # Type alias: RemoteDestinationConfig 2 | 3 | [plugins](../modules/plugins.md).RemoteDestinationConfig 4 | 5 | Ƭ **RemoteDestinationConfig**: `Object` 6 | 7 | Destination config for remote chunks. 8 | 9 | #### Type declaration 10 | 11 | | Name | Type | Description | 12 | | :------ | :------ | :------ | 13 | | `outputPath` | `string` | Output path to a directory, where remote chunks should be saved. | 14 | | `type` | ``"remote"`` | - | 15 | 16 | #### Defined in 17 | 18 | [packages/repack/src/webpack/plugins/OutputPlugin.ts:40](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/plugins/OutputPlugin.ts#L40) 19 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/variables/ASSET_EXTENSIONS.md: -------------------------------------------------------------------------------- 1 | # Variable: ASSET\_EXTENSIONS 2 | 3 | • `Const` **ASSET\_EXTENSIONS**: `string`[] 4 | 5 | Extensions array of all supported assets by Re.Pack's Assets loader. 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/webpack/utils/assetExtensions.ts:16](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/utils/assetExtensions.ts#L16) 10 | -------------------------------------------------------------------------------- /website/src/v4/api/repack/variables/SCALABLE_ASSETS.md: -------------------------------------------------------------------------------- 1 | # Variable: SCALABLE\_ASSETS 2 | 3 | • `Const` **SCALABLE\_ASSETS**: `string`[] 4 | 5 | Extensions array of all scalable assets - images. 6 | 7 | #### Defined in 8 | 9 | [packages/repack/src/webpack/utils/assetExtensions.ts:2](https://github.com/callstack/repack/blob/1d9a1bb/packages/repack/src/webpack/utils/assetExtensions.ts#L2) 10 | -------------------------------------------------------------------------------- /website/src/v4/docs/cli-commands/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "repack-init", 5 | "label": "repack-init" 6 | }, 7 | { 8 | "type": "divider" 9 | }, 10 | { 11 | "type": "file", 12 | "name": "start", 13 | "label": "start" 14 | }, 15 | { 16 | "type": "file", 17 | "name": "bundle", 18 | "label": "bundle" 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /website/src/v4/docs/code-splitting/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | "concept", 3 | "usage", 4 | "glossary", 5 | "guide-async-chunks", 6 | "local-vs-remote-chunks", 7 | "caching-versioning", 8 | "react-navigation", 9 | "code-push" 10 | ] 11 | -------------------------------------------------------------------------------- /website/src/v4/docs/guides/_meta.json: -------------------------------------------------------------------------------- 1 | ["inline-assets", "remote-assets", "svg", "lazy-compilation"] 2 | -------------------------------------------------------------------------------- /website/src/v4/docs/plugins/_meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "file", 4 | "name": "index", 5 | "label": "Overview" 6 | }, 7 | { 8 | "type": "file", 9 | "name": "code-signing", 10 | "label": "CodeSigningPlugin" 11 | }, 12 | { 13 | "type": "file", 14 | "name": "chunks-to-hermes", 15 | "label": "ChunksToHermesBytecodePlugin" 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /website/src/v4/docs/plugins/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | overview: true 3 | --- 4 | 5 | This is a list of all of the plugins shipped with Re.Pack. 6 | -------------------------------------------------------------------------------- /website/src/v4/public/img/devtools-mf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v4/public/img/devtools-mf.png -------------------------------------------------------------------------------- /website/src/v4/public/img/devtools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v4/public/img/devtools.png -------------------------------------------------------------------------------- /website/src/v4/public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v4/public/img/favicon.ico -------------------------------------------------------------------------------- /website/src/v4/public/img/init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v4/public/img/init.png -------------------------------------------------------------------------------- /website/src/v4/public/img/og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v4/public/img/og-image.png -------------------------------------------------------------------------------- /website/src/v4/public/img/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/callstack/repack/71a989b82e97f5d5cdc12a8e6edfaad47636b13e/website/src/v4/public/img/start.png -------------------------------------------------------------------------------- /website/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "react-jsx", 4 | "esModuleInterop": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /website/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://openapi.vercel.sh/vercel.json", 3 | "buildCommand": "pnpm export", 4 | "cleanUrls": true, 5 | "framework": null, 6 | "installCommand": "pnpm install", 7 | "rewrites": [{ "source": "/(.*)", "destination": "/404.html" }], 8 | "redirects": [ 9 | { 10 | "source": "/blog/repack-5-release", 11 | "destination": "https://www.callstack.com/blog/announcing-re-pack-5-with-rspack-module-federation", 12 | "statusCode": 301 13 | }, 14 | { 15 | "source": "/blog", 16 | "destination": "https://www.callstack.com/insights/super-apps-with-react-native", 17 | "statusCode": 301 18 | } 19 | ], 20 | "outputDirectory": "build", 21 | "trailingSlash": false 22 | } 23 | --------------------------------------------------------------------------------