diff --git a/.changeset/rspack-2-support.md b/.changeset/rspack-2-support.md new file mode 100644 index 000000000..8c9014ca2 --- /dev/null +++ b/.changeset/rspack-2-support.md @@ -0,0 +1,15 @@ +--- +"@callstack/repack": minor +--- + +Add support for Rspack 2 while keeping Rspack 1 fully working. + +Re.Pack now detects the installed `@rspack/core` major version and adapts: + +- `experiments.parallelLoader` is only set under Rspack 1 (removed in Rspack 2) +- `module.parser.javascript.exportsPresence` defaults to `'auto'` under Rspack 2 to keep Metro-like tolerance for invalid imports inside node_modules (overridable in your project config) +- a one-time warning is shown when a legacy `experiments.cache` value is detected under Rspack 2 (where it is silently ignored, so persistent caching would be lost without any signal) - the config is left untouched, migrate it to the top-level `cache` option; `--reset-cache` reads both locations +- React Refresh: under Rspack 2 Re.Pack applies the official `@rspack/plugin-react-refresh` v2 plugin (now an optional peer dependency - install it alongside `@rspack/core@2`); under Rspack 1 and webpack the client runtime files are bundled with Re.Pack, so the `@rspack/plugin-react-refresh@1` dependency is gone +- `--trace-*` profiling defaults to the `logger` trace layer under Rspack 2 (published Rspack 2 binaries do not include the perfetto layer) +- a clear error is raised when running Rspack 2 on Node.js older than 20.19 (Rspack 2 requires Node `^20.19.0 || >=22.12.0`) +- `ModuleFederationPluginV1` verifies that `@module-federation/runtime-tools` is installed when running under Rspack 2 (it is no longer installed automatically by `@rspack/core`) diff --git a/AGENTS.md b/AGENTS.md index 93227d931..6876560c4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,3 +31,7 @@ Re.Pack is a toolkit for building and developing React Native applications with - `tests/integration/`: Integration-level automated coverage. - `tests/metro-compat/`: Metro compatibility behavior coverage. - `tests/resolver-cases/`: Resolver behavior and edge-case coverage. + +## Agent Context + +- `agent_context/` contains dated documentation of substantial agent-assisted work — research, decisions, plans, and verification results (one folder per effort, e.g. `rspackv2-jul2026`). Folders are living documents while the effort is in flight; once the work is completed and merged they are settled, and follow-up work gets a new dated folder. Consult it before revisiting a past decision. Conventions are in `agent_context/README.md`. diff --git a/agent_context/README.md b/agent_context/README.md new file mode 100644 index 000000000..4ddc00920 --- /dev/null +++ b/agent_context/README.md @@ -0,0 +1,27 @@ +# Agent Context + +Dated documentation of substantial work done with AI agents in this repository — +a durable memory of research, decisions, plans, and verification results that +would otherwise live only in chat transcripts. + +## Conventions + +- One folder per effort, named `-` (e.g. `rspackv2-jul2026`). +- Each folder has a `README.md` index with a status line (research → decided → + implemented) kept up to date as the effort progresses. +- While an effort is **in flight**, its folder is a living document — revise + freely as understanding improves. +- Record *decisions* inline where the open question was raised, with the date — + keep the analysis that led to them, so the "why" survives alongside the "what". +- Prefer verifiable claims: link upstream PRs/issues, note exact versions + tested against, and keep verification results (what was run, what it showed). +- Once the work is **completed and merged**, the folder is settled: future or + follow-up work gets a new dated folder (which can link back), rather than + editing the old one. Status-line updates and cross-links to successor + folders are the exception. + +## Index + +| Folder | Topic | Status | +| --- | --- | --- | +| [rspackv2-jul2026](./rspackv2-jul2026/README.md) | Rspack 2 support with dual Rspack 1/2 compatibility | Implemented on reference branch `feat/rspack-2-support`; being split into a PR stack (see doc 09) | diff --git a/agent_context/rspackv2-jul2026/01-breaking-changes-inventory.md b/agent_context/rspackv2-jul2026/01-breaking-changes-inventory.md new file mode 100644 index 000000000..9194e6463 --- /dev/null +++ b/agent_context/rspackv2-jul2026/01-breaking-changes-inventory.md @@ -0,0 +1,84 @@ +# Rspack 2.0 Breaking Changes — Full Inventory & Re.Pack Impact + +Compiled from: + +- [Planned breaking changes discussion (web-infra-dev/rspack#9270)](https://github.com/web-infra-dev/rspack/discussions/9270) +- [Official 1.x → 2.0 migration guide](https://rspack.rs/guide/migration/rspack_1.x) +- [Announcing Rspack 2.0](https://rspack.rs/blog/announcing-2-0) +- Published npm metadata for `@rspack/core@2.1.2`, `@rspack/cli@2.1.2`, + `@rspack/dev-server@2.1.0`, `@rspack/plugin-react-refresh@2.0.2` + +Impact levels are for **Re.Pack itself** (our packages), with a separate note when the +change affects **Re.Pack users' projects** instead. + +## Platform & packaging + +| # | Change | Upstream ref | Impact on Re.Pack | +| --- | --- | --- | --- | +| 1 | **Node.js 18 dropped** — requires `^20.19.0 \|\| >=22.12.0` | [PR #12739](https://github.com/web-infra-dev/rspack/pull/12739) | **HIGH.** Our packages declare `engines.node: ">=18"`; CI matrix tests Node 18. Rspack-2 users need ≥20.19. See [03](./03-dual-version-support-plan.md#node--engines). | +| 2 | **Pure ESM packages** — `@rspack/core`, `@rspack/cli`, `@rspack/dev-server` publish ESM only; CJS build removed. Works via `require(esm)` on Node ≥20.19 | [PR #12733](https://github.com/web-infra-dev/rspack/pull/12733) | **MEDIUM.** `@callstack/repack` is CJS; its compiled `require("@rspack/core")` still works on Node ≥20.19 via `require(esm)`. Needs interop verification (named + default imports). See [02 §1](./02-impact-analysis.md). | +| 3 | **`@rspack/dev-server` no longer bundled with `@rspack/cli`**; rewritten on `@rspack/dev-middleware` + `connect-next` (192 deps → 1) | [PR #12750](https://github.com/web-infra-dev/rspack/pull/12750) | **NONE.** Re.Pack ships its own Fastify-based dev server (`@callstack/repack-dev-server`); we don't use `@rspack/dev-server` or webpack-dev-middleware. | +| 4 | **`@module-federation/runtime-tools` moved to optional peerDependency** of `@rspack/core` (`^0.24.1 \|\| ^2.0.0`) | [PR #12663](https://github.com/web-infra-dev/rspack/pull/12663) | **MEDIUM (users).** Users of our `ModuleFederationPluginV1` (backed by Rspack's built-in MF plugin) must now install runtime-tools themselves. We should detect and give a friendly error. | +| 5 | **Built-in webpack-bundle-analyzer / `--analyze` removed** from CLI; use Rsdoctor | [PR #12699](https://github.com/web-infra-dev/rspack/pull/12699) | **NONE.** We don't use `@rspack/cli`. | + +## Configuration schema (validation is on by default in 2.0) + +> Note (verified against 2.1.2, [doc 07](./07-verification-results.md)): +> despite "validation on by default", unknown top-level and `experiments` +> keys are **silently accepted** — removed keys are TS-type and semantic +> issues (dead config), not reliable runtime validation failures. + +| # | Change | Upstream ref | Impact on Re.Pack | +| --- | --- | --- | --- | +| 6 | **`experiments.parallelLoader` removed** (stable; opt-in stays via `module.rules[].use[].parallel` — re-verified against the migration guide 2026-07-02, [doc 10 §6](./10-maintainer-feedback-evaluation.md)) | [PR #12658](https://github.com/web-infra-dev/rspack/pull/12658) | **MEDIUM — confirmed break (severity revised, [doc 07](./07-verification-results.md)).** `getRepackConfig` sets `experiments: { parallelLoader: true }` for rspack → **silently ignored** under v2 (validation is loose, not a schema error): dead config, rejected by v2 TS types, and the loader's parallel-mode warning probe goes permanently quiet. Still gated by major. | +| 7 | **`experiments.cache` → top-level `cache`** (persistent cache stable) | [PR #12705](https://github.com/web-infra-dev/rspack/pull/12705) | **HIGH — confirmed break.** `--reset-cache` reads `config.experiments?.cache`; `resetPersistentCache` types derive from `experiments.cache` (gone from v2 types). | +| 8 | `experiments.incremental` → top-level `incremental` | [PR #12793](https://github.com/web-infra-dev/rspack/pull/12793) | **NONE.** Not set by us. | +| 9 | `experiments.lazyCompilation` → top-level `lazyCompilation` | [PRs #12721, #12736](https://github.com/web-infra-dev/rspack/pull/12721) | **NONE.** Not set by us. Doc-only impact for users. | +| 10 | Removed stabilized experiments: `topLevelAwait`, `lazyBarrel`, `inlineConst`, `inlineEnum`, `typeReexportsPresence`, `layers`, `css`, `outputModule` (→ `output.module`), `rspackFuture` | [PRs #12722–#12744, #12654](https://github.com/web-infra-dev/rspack/pull/12722) | **NONE for us**; **LOW (users)** — user configs setting these keys get **dead config** under v2 (silently ignored — validation is loose, see note above; the keys are also rejected by v2 TS types for typed configs). Worth a migration-guide note on our docs site. | +| 11 | **`stats.toJson()` defaults** — `modules`, `assets`, `chunks`, `chunkGroups`, `entryPoints` now default to `false` | [PR #12701](https://github.com/web-infra-dev/rspack/pull/12701) | **LOW.** All our `toJson()` calls pass explicit options (`OutputPlugin`, `LoggerPlugin`, `Compiler`). User-facing: `bundle --json` output content depends on user `stats` config and may shrink. | +| 12 | **`profile` and `stats.profile` removed** (use tracing/Rsdoctor) | [PR #12662](https://github.com/web-infra-dev/rspack/pull/12662) | **LOW.** Our `--trace-*` profiling uses env-var tracing, already version-branched (`profile-1.4.ts` vs `profile-legacy.ts`); needs a compat check for the v2 tracing API. | +| 13 | `module.unsafeCache` removed | migration guide | **NONE.** Not used. (Refactor was deferred, removal landed in the guide.) | +| 14 | `optimization.removeAvailableModules` removed | migration guide | **NONE.** Not used. | + +## Output & runtime + +| # | Change | Upstream ref | Impact on Re.Pack | +| --- | --- | --- | --- | +| 15 | **`output.chunkLoadingGlobal` default: `webpackChunk${uniqueName}` → `rspackChunk${uniqueName}`** | [PR #12779](https://github.com/web-infra-dev/rspack/pull/12779) | **LOW.** We set `chunkLoading: 'jsonp'` + `chunkFormat: 'array-push'` + `globalObject: 'self'` but not the global name — however the name is only referenced by Rspack-generated code (runtime + chunks from the same build), so it's internally consistent. Risk only if users hand-patch bundles or mix chunks across bundler majors (OTA/code-push style). Documented in [04](./04-questions-and-blockers.md). | +| 16 | **`output.hotUpdateGlobal` default: `webpackHotUpdate*` → `rspackHotUpdate*`** | [PR #12774](https://github.com/web-infra-dev/rspack/pull/12774) | **LOW.** Our HMR path (`WebpackHMRClient` + `loadScript` runtime) fetches hot-update chunks and evaluates them; it never hardcodes the global name. Internally consistent per build. | +| 17 | Removed deprecated `output.libraryTarget` / `libraryExport` / `umdNamedDefine` / `auxiliaryComment` (→ `output.library.*`) | [PR #12745](https://github.com/web-infra-dev/rspack/pull/12745) | **NONE.** We use the `library: { name, type }` object form already (`ModuleFederationPluginV1` uses `type: 'self'`). | +| 18 | `output.charset` removed | [PR #12660](https://github.com/web-infra-dev/rspack/pull/12660) | **NONE.** Not used. | +| 19 | `output.trustedTypes.policyName` fallback `'webpack'` → `'rspack'` | [PR #12799](https://github.com/web-infra-dev/rspack/pull/12799) | **NONE.** Not relevant to RN. | +| 20 | `bundlerInfo.force` default `true` → `false` (moved to `output.bundlerInfo`) | migration guide | **NONE.** Not used. | +| 21 | **`devtool` defaults changed** — dev: `eval` → `cheap-module-source-map`; prod (CLI): `source-map` → `false` | [PR #12934](https://github.com/web-infra-dev/rspack/pull/12934) | **NONE.** `getRepackConfig` always sets `devtool: 'source-map'` explicitly and `SourceMapPlugin` manages the rest. | + +## Module parsing & resolution + +| # | Change | Upstream ref | Impact on Re.Pack | +| --- | --- | --- | --- | +| 22 | **`exportsPresence` default `'warn'` → `'error'`**; `strictExportPresence` removed | [PR #13002](https://github.com/web-infra-dev/rspack/pull/13002) | **HIGH (users).** Builds that only warned on bad imports now fail. The RN ecosystem is notorious for this (platform-specific/optional exports). Strong candidate for a Re.Pack lenient default. See [04](./04-questions-and-blockers.md). | +| 23 | **Aliased dynamic `require` skipped by default** (`requireAlias` default `true` → `false`), e.g. `var r = require; r('./x' + name)` no longer creates a context module | [PR #12697](https://github.com/web-infra-dev/rspack/pull/12697) | **MEDIUM (users).** Some RN/CommonJS packages rely on this. Needs a `tests/metro-compat` sweep. (Note: the related `requireAsExpression` disable was **reverted** in [PR #12998](https://github.com/web-infra-dev/rspack/pull/12998), so "critical dependency" warnings still appear — our `plugin-reanimated` warning filter stays relevant.) | +| 24 | **`builtin:swc-loader` no longer reads `.swcrc`** (unconditionally) | [PRs #12661, #12667, #12668](https://github.com/web-infra-dev/rspack/pull/12661) | **NONE for us** (no `.swcrc` anywhere; all SWC options passed inline via `getJsTransformRules`). **LOW (users)** with their own `.swcrc`. | +| 25 | **Top-level `target` now propagates** to `builtin:swc-loader`, `builtin:lightningcss-loader`, and minimizers | [PRs #12752, #12780](https://github.com/web-infra-dev/rspack/pull/12752) | **MEDIUM — needs verification.** We set our own SWC `env`/`jsc` options per rule; need to confirm explicit loader options still win over the propagated target, and check what our `RepackTargetPlugin` target (`false` + custom) propagates. | +| 26 | `resolve.roots` default `[context]` → `[]` | [PR #13273](https://github.com/web-infra-dev/rspack/pull/13273) | **NONE.** `getResolveOptions` doesn't use `roots`; RN projects don't use `/`-absolute imports idiomatically. | +| 27 | `.wasm` removed from default `resolve.byDependency` extensions; `experiments.asyncWebAssembly` enabled by default | [PR #13321](https://github.com/web-infra-dev/rspack/pull/13321), [PR #12764](https://github.com/web-infra-dev/rspack/pull/12764) | **NONE.** We fully override `extensions` and `byDependency` in `getResolveOptions`. | +| 28 | CSS `@import` conditions no longer include `webpack` by default | migration guide | **NONE.** Not relevant to our resolution setup. | +| 29 | `rspackExperiments.import` → top-level `transformImport`; `rspackExperiments.collectTypeScriptInfo` → top-level | migration guide | **NONE.** Not used. | + +## Plugin & JS API + +| # | Change | Upstream ref | Impact on Re.Pack | +| --- | --- | --- | --- | +| 30 | **`ProgressPlugin` handler 3rd arg**: `...args: string[]` → `info: { builtModules, moduleIdentifier? }` | [PR #13049](https://github.com/web-infra-dev/rspack/pull/13049) | **NONE.** Both our handlers (`commands/rspack/Compiler.ts`, `commands/webpack/CompilerWorker.ts`) only use `percentage`. | +| 31 | **`RuntimeModule.constructorName` / `.moduleIdentifier` removed** (use `constructor.name` / `identifier()`) | [PRs #12673, #12684](https://github.com/web-infra-dev/rspack/pull/12673) | **NONE.** Our 4 custom runtime modules use standard `name`/`generate()`; `RepackTargetPlugin` checks `module.name`, which stays. (The `moduleIdentifier` read in `plugin-reanimated` is on **warning objects** from `ignoreWarnings`, unrelated.) | +| 32 | `plugin.getHooks` removed (→ `getCompilationHooks`) on Html/Runtime/Rsdoctor plugins | [PR #12738](https://github.com/web-infra-dev/rspack/pull/12738) | **NONE.** We tap `compilation.hooks.runtimeModule` directly. | +| 33 | `WarnCaseSensitiveModulesPlugin` → `CaseSensitivePlugin`; `EsmLibraryPlugin` removed (→ `output.library.type: 'modern-module'`); `HtmlRspackPlugin.sri` removed; LightningCSS minimizer `draft`/`cssHeadDataCompression` removed; `SubresourceIntegrityPlugin` moved out of `experiments` | various PRs in discussion | **NONE.** None of these plugins are used by Re.Pack. | +| 34 | `readResourceForScheme` hook removed | [PR #13027](https://github.com/web-infra-dev/rspack/pull/13027) | **NONE.** Not used. | +| 35 | **`@rspack/plugin-react-refresh@2`**: pure ESM, `deprecated_runtimePaths` static **removed**, peer `@rspack/core@^2`, overlay client files removed | verified against published 2.0.2 tarball | **HIGH — confirmed break** if we upgrade the dependency. `DevelopmentPlugin.ts:12` destructures `deprecated_runtimePaths` at module load. The v1 plugin line (≤1.6.2) has **no `@rspack/core` peer dep**, so pinning v1 works under Rspack 2. See [03](./03-dual-version-support-plan.md#react-refresh). | + +## Not landing in 2.0 (tracked, no action) + +- `module.unsafeCache` redesign — deferred ("will not be included in v2.0"). +- `loaderContext._module` deprecation — **deferred** explicitly because plugins need it for + loader→plugin metadata until a persistent-cache-safe JS API exists. (We don't use it anyway.) +- `requireAsExpression` default flip — landed then **reverted** ([PR #12998](https://github.com/web-infra-dev/rspack/pull/12998)). diff --git a/agent_context/rspackv2-jul2026/02-impact-analysis.md b/agent_context/rspackv2-jul2026/02-impact-analysis.md new file mode 100644 index 000000000..e16f470f4 --- /dev/null +++ b/agent_context/rspackv2-jul2026/02-impact-analysis.md @@ -0,0 +1,207 @@ +# Re.Pack Codebase Impact Analysis for Rspack 2.0 + +Findings from a full audit of `packages/*` against the breaking-changes inventory +([01](./01-breaking-changes-inventory.md)). Organized by severity. + +External sources referenced throughout: + +- [Planned breaking changes discussion (web-infra-dev/rspack#9270)](https://github.com/web-infra-dev/rspack/discussions/9270) +- [Official 1.x → 2.0 migration guide](https://rspack.rs/guide/migration/rspack_1.x) +- [Announcing Rspack 2.0](https://rspack.rs/blog/announcing-2-0) +- npm metadata: [@rspack/core](https://www.npmjs.com/package/@rspack/core), [@rspack/plugin-react-refresh](https://www.npmjs.com/package/@rspack/plugin-react-refresh) + +## Confirmed breaks (Rspack 2 build fails or code throws) + +### 1. `experiments.parallelLoader` injection — dead config (silently ignored) + +`packages/repack/src/commands/common/config/getRepackConfig.ts:3-7` + +```ts +function getExperimentsConfig(bundler: 'rspack' | 'webpack') { + if (bundler === 'rspack') { + return { parallelLoader: true }; + } +} +``` + +Rspack 2 removed `experiments.parallelLoader` ([PR #12658](https://github.com/web-infra-dev/rspack/pull/12658)). +**Verified against 2.1.2 ([07](./07-verification-results.md)): the key is silently +ignored, not rejected** — v2's config validation turned out to be loose (unknown keys +pass). So this is dead config rather than a hard failure: no build error, but the option +does nothing, v2 TypeScript types reject it at compile time, and our loader's +parallel-mode warning probe goes permanently quiet. Still gated by major in the fix. +Parallel loading is still opt-in per rule via `module.rules[].use[].parallel` (which we +don't currently set — the experiment flag alone never parallelized our loaders; users had +to add `parallel: true` to rules themselves). + +Related soft spot: `packages/repack/src/loaders/babelSwcLoader/utils.ts:93-107` +(`checkParallelModeAvailable`) reads `loaderContext._compiler.options?.experiments?.parallelLoader` +to warn users. Under v2 the key never exists, so the warning silently never fires — benign, +but the message links to the v1 docs and should become version-aware. + +### 2. `ReactRefreshPlugin.deprecated_runtimePaths` — removed in plugin v2 + +`packages/repack/src/plugins/DevelopmentPlugin.ts:8-13` + +```ts +import ReactRefreshPlugin from '@rspack/plugin-react-refresh'; + +const [reactRefreshEntryPath, reactRefreshPath, refreshUtilsPath] = + ReactRefreshPlugin.deprecated_runtimePaths; +``` + +This runs at **module load time** (top level), so if the installed plugin is v2 it throws +immediately for every command, both bundlers. Verified against published tarballs: + +- `@rspack/plugin-react-refresh@1.0.0`: `ReactRefreshRspackPlugin.deprecated_runtimePaths = runtimePaths` ✅ +- `@rspack/plugin-react-refresh@2.0.2`: static removed; paths are computed internally via + `import.meta.dirname`; package is `"type": "module"`; client files still shipped + (`client/reactRefresh.js`, `client/reactRefreshEntry.js`, `client/refreshUtils.js`) but + **only `./react-refresh` and `./react-refresh-entry` are in the exports map** — + `client/refreshUtils.js` is not deep-importable in v2. + +Mitigating facts: + +- Re.Pack declares `"@rspack/plugin-react-refresh": "1.0.0"` as a **regular dependency** + (`packages/repack/package.json:85`), so today users always get v1 regardless of their + Rspack version. +- The v1 plugin line (`1.0.0`–`1.6.2`) has **no `@rspack/core` peer dependency** (only an + optional `react-refresh` peer), so v1 installs cleanly next to Rspack 2. +- We never `apply()` the plugin — we only harvest its 3 client runtime files and wire them + manually (`DevelopmentPlugin.ts:124-161`), so plugin-vs-core version coupling is minimal. + The client files interact with the standard `module.hot` API, not version-specific internals. + +### 3. Persistent cache config: `experiments.cache` → top-level `cache` + +Value reads (break `--reset-cache` cache-dir detection for v2 configs): + +- `packages/repack/src/commands/rspack/start.ts:61` — `configs.map((config) => config.experiments?.cache)` +- `packages/repack/src/commands/rspack/bundle.ts:54` — `cacheConfigs: [config.experiments?.cache]` + +Type break (fails compilation against v2 types): + +- `packages/repack/src/commands/common/resetPersistentCache.ts:7-9` + +```ts +type RspackCacheOptions = NonNullable< + RspackConfiguration['experiments'] +>['cache']; // 'cache' no longer exists on Experiments in v2 types +``` + +Under v2, users configure `cache: { type: 'persistent', storage: { directory } }` at the +top level ([PR #12705](https://github.com/web-infra-dev/rspack/pull/12705)). Fix is simple: +read `config.cache ?? config.experiments?.cache` and widen the type. + +**Verified against 2.1.2 ([07](./07-verification-results.md))**: `experiments.cache` is +**silently inert** under v2 — the build succeeds with no warning and no cache directory is +created, while top-level `cache` works. So beyond the `--reset-cache` fix, Re.Pack should +warn when it detects a v1-style cache config under v2, or users silently lose persistent +caching. *(Auto-migrating the value was considered and rejected — maintainer feedback #5, +warn-only; doc 10 §5.)* + +## Structural: ESM-only `@rspack/core` + Node floor + +`packages/repack` is `"type": "commonjs"`; Babel compiles `import { rspack } from '@rspack/core'` +to `require("@rspack/core")` in `dist/` (e.g. `dist/commands/rspack/Compiler.js:4`). + +With `@rspack/core@2` (`"type": "module"`, verified on npm): + +- On Node **≥20.19 / ≥22.12** — exactly what Rspack 2 requires anyway — `require(esm)` + loads it fine. Node marks the returned namespace for Babel's interop, so both named + (`_core.rspack`) and default-import patterns should work. **Needs a smoke test** (listed + in [04](./04-questions-and-blockers.md)). +- On Node 18, `require("@rspack/core")` throws `ERR_REQUIRE_ESM` — but Node 18 users can't + run Rspack 2 regardless. Rspack 1 users on Node 18 are unaffected (v1 ships CJS). + +Places that load `@rspack/core` at runtime (all fine on supported Node versions): + +- `packages/repack/src/commands/rspack/{Compiler,bundle,start}.ts` — static import → CJS require +- `packages/repack/src/commands/common/config/getMinimizerConfig.ts:43` — `await import('@rspack/core')` (already ESM-safe) +- `packages/repack/src/loaders/babelSwcLoader/utils.ts:139-142` — resolves user's + `@rspack/core` and loads via `importDefaultESM` helper (already ESM-safe), then reads + `rspack.experiments?.swc` — **verify `experiments.swc` still exists on the v2 JS API**. + +TypeScript is already `module: "nodenext"` (`tsconfig.base.json:4-5`), which resolves +ESM-only package types correctly. The open question is which major we *compile against* +(see [04 §types](./04-questions-and-blockers.md)). + +## Version-sensitive but currently compatible + +### Version detection precedent + +`packages/repack/src/commands/rspack/profile/index.ts:1-16` already branches on +`rspackVersion` from `@rspack/core` (`profile-1.4.ts` vs `profile-legacy.ts`). This is the +pattern to generalize for dual support. (**Verify `rspackVersion` is still exported by v2** +— expected yes, it exists for webpack-compat.) + +### Minimizer selection + +`getMinimizerConfig.ts` currently prefers Terser for all Rspack versions except exactly +`1.4.11` (`shouldUseTerserForRspack`). Under v2 this silently picks Terser — works, but +leaves the v2 SwcJsMinimizer improvements (~50% faster cached minify) on the table. +Revisit as an opportunity, not a break. + +### Module Federation + +- `ModuleFederationPluginV1.ts:122-125` resolves Rspack's built-in + `compiler.webpack.container.ModuleFederationPluginV1`. Still present in v2, **but** + `@module-federation/runtime-tools` became an optional peer of `@rspack/core@2` + ([PR #12663](https://github.com/web-infra-dev/rspack/pull/12663)) — users hitting MFv1 on + Rspack 2 without installing it get a raw resolution error. We should pre-check and throw + a friendly error (we already have this pattern in `ModuleFederationPluginV2.ensureModuleFederationPackageInstalled`). +- `ModuleFederationPluginV2.ts:169-173` requires `@module-federation/enhanced/rspack`. + Compatibility with Rspack 2 is governed by the user's `@module-federation/enhanced` + version (Rspack 2 peer allows `runtime-tools ^0.24.1 || ^2.0.0`; enhanced 2.x is current). + Needs a compatibility matrix check in [04](./04-questions-and-blockers.md). +- Federation runtime plugins (`packages/repack/src/modules/FederationRuntimePlugins/*`) + only use `@module-federation/enhanced/runtime` types + `ScriptManager` — unaffected. + +### Runtime globals & HMR — verified safe by construction + +- `RepackTargetPlugin.ts:51-53` pins `chunkLoading: 'jsonp'`, `chunkFormat: 'array-push'`, + `globalObject`. The renamed defaults (`webpackChunk*` → `rspackChunk*`, + `webpackHotUpdate*` → `rspackHotUpdate*`) only appear inside Rspack-generated code, which + is consistent within a build. No Re.Pack source hardcodes either name (audited). +- `WebpackHMRClient.ts:97` uses `__webpack_hash__`; runtime modules build on + `__webpack_require__` (init/loadScript/guardedRequire implementations, + `getWebpackContext.ts:7`). Rspack 2 keeps webpack-compatible runtime global names + (`__webpack_require__` etc.) — these are not part of the announced breaking changes. + Covered by integration testing rather than code changes. + +### Stats + +All `stats.toJson()` calls pass explicit option objects +(`LoggerPlugin.ts:157`, `OutputPlugin.ts:194`, `rspack/Compiler.ts:126`) — unaffected by +the new sparse defaults. `bundle --json` passes user-derived `statsOptions` +(`normalizeStatsOptions`), so the *content* of a user's `stats.json` may shrink under v2 +defaults — documentation note, not a bug. + +## Explicitly audited — no usage found + +- `output.libraryTarget` / `libraryExport` / `umdNamedDefine` / `auxiliaryComment` +- `output.charset`, `trustedTypes`, `bundlerInfo`, `optimization.removeAvailableModules` +- `module.unsafeCache`, `strictExportPresence`, `exportsPresence` (we don't set it — see + user-facing concern in [04](./04-questions-and-blockers.md)) +- `RuntimeModule.constructorName` / `.moduleIdentifier`, `plugin.getHooks`, + `readResourceForScheme`, `loaderContext._module` +- `HtmlRspackPlugin`, `SubresourceIntegrityPlugin`, `LightningCssMinimizerRspackPlugin`, + `WarnCaseSensitiveModulesPlugin`, `EsmLibraryPlugin` +- `.swcrc` files (none in repo; all SWC config is inline loader options) +- `resolve.roots`, `.wasm` extensions (we fully override `extensions`/`byDependency` in + `getResolveOptions.ts`) + +## Dependency & environment surface (from packaging audit) + +| Location | Current value | Rspack 2 consideration | +| --- | --- | --- | +| `packages/repack/package.json` peers | `@rspack/core: >=1` (optional), `webpack: >=5.90` (optional), `@module-federation/enhanced: >=0.6.10` (optional) | `>=1` already admits v2 — good; needs real support behind it | +| `packages/repack/package.json` deps | `@rspack/plugin-react-refresh: 1.0.0` (exact pin) | Keep on v1 line or replace with manual path resolution ([03](./03-dual-version-support-plan.md#react-refresh)) | +| `engines.node` (repack, dev-server, init, plugins) | `>=18` | Rspack 2 needs ≥20.19; policy decision in [04](./04-questions-and-blockers.md) | +| `pnpm-workspace.yaml` catalog | `@rspack/core: ^1.6.0` | Needs a second catalog entry or bump for v2 testing | +| `packages/init/src/versions.json` | `@rspack/core: ^1.7.8` | Decide default for newly-initialized projects | +| CI `test-main-matrix.yml` | Node `['18','20','22','24']` | Node 18 lane can't run Rspack 2 suites | +| tester apps / tests | `@rspack/core: catalog:` (v1) | Need v2 variants or a matrix dimension | + +`@callstack/repack-dev-server` and `@callstack/repack-init` are already pure ESM; +plugin packages (`plugin-nativewind`, `plugin-reanimated`, `plugin-expo-modules`) are CJS +but only use `@rspack/core` **types** — no runtime break. diff --git a/agent_context/rspackv2-jul2026/03-dual-version-support-plan.md b/agent_context/rspackv2-jul2026/03-dual-version-support-plan.md new file mode 100644 index 000000000..3a1f74732 --- /dev/null +++ b/agent_context/rspackv2-jul2026/03-dual-version-support-plan.md @@ -0,0 +1,225 @@ +# Plan: Supporting Rspack 1.x and 2.x Simultaneously + +Goal: one `@callstack/repack` release line that works with the user's installed +`@rspack/core`, whether that's 1.x or 2.x. Peer dependency already allows it +(`"@rspack/core": ">=1"`); this plan makes it true. + +Grounded in the [breaking-changes discussion (rspack#9270)](https://github.com/web-infra-dev/rspack/discussions/9270), +the [official migration guide](https://rspack.rs/guide/migration/rspack_1.x), and the +codebase findings in [02-impact-analysis.md](./02-impact-analysis.md). + +## Guiding decisions + +1. **Runtime version detection, not separate builds.** Branch on the user's installed + Rspack major, following the existing precedent in + `packages/repack/src/commands/rspack/profile/index.ts`. +2. **Compile against Rspack 2 types**, keep runtime code working on both. v2's + `Configuration` is close to a superset of what we use once the confirmed breaks are + fixed; the few v1-only reads (e.g. `experiments.cache`) get widened types. +3. **Don't raise `engines.node` beyond what Rspack 1 users need.** Enforce the Node + ≥20.19/≥22.12 floor *at runtime, only when Rspack 2 is detected*, with a clear error. + +## Phase 0 — Foundations + +### 0.1 Version helper + +Add a shared helper (e.g. `packages/repack/src/helpers/rspackVersion.ts`): + +```ts +import { rspackVersion } from '@rspack/core'; + +export function getRspackMajor(): number { + return Number(rspackVersion.split('.')[0]); +} + +export function isRspack2(): boolean { + return getRspackMajor() >= 2; +} +``` + +Refactor `commands/rspack/profile/index.ts` to use it. For code paths that can't import +`@rspack/core` directly (webpack-only flows), detect lazily from the resolved package. + +### 0.2 Workspace scaffolding for testing both majors + +- Add `@rspack/core` v2 to the pnpm catalog (e.g. `catalog:rspack2` named catalog or + explicit versions in the apps that test v2). +- Decide the default for `apps/tester-app` (suggest: v2, since that's the future) and keep + at least one app/test suite on v1. + +> ⚠️ **AMENDED (2026-07-03, decided & implemented — see doc 08 § Discovery and +> doc 09 PR 8):** `tester-app` **is** the Rspack 2 example (the workspace +> **default** catalog is Rspack 2 as of the same-day catalog flip — doc 08 +> § Catalog flip). But "keep at least one app on v1" cannot be a +> *workspace* app: in-workspace, repack's `@rspack/core@^2` devDependency +> shadows any app-level v1 pin, and shipped code deliberately carries no +> monorepo-aware resolution workaround. The v1 surface is the **standalone** +> `apps/tester-app-rspack1` (outside the workspace, own node_modules, repack +> installed from a packed tarball). + +## Phase 1 — Fix the confirmed breaks + +### 1.1 `experiments.parallelLoader` (config generation) + +`getRepackConfig.ts`: + +```ts +function getExperimentsConfig(bundler: 'rspack' | 'webpack') { + if (bundler === 'rspack' && !isRspack2()) { + return { parallelLoader: true }; + } + // Rspack 2: parallelLoader is stable & removed from experiments; + // per-rule `use[].parallel` remains the opt-in — nothing to set globally. +} +``` + +Also update `babelSwcLoader/utils.ts` `checkParallelModeAvailable` so the warning text and +`experiments.parallelLoader` probe are version-aware (under v2 just skip the probe — the +per-rule `parallel` flag is the only signal). + +### 1.2 Persistent cache (`--reset-cache`) + +`start.ts` / `bundle.ts`: + +```ts +cacheConfigs: [config.cache ?? config.experiments?.cache] +``` + +`resetPersistentCache.ts`: widen `RspackCacheOptions` so it doesn't derive from +`experiments` (define a minimal structural type: `boolean | { type?: string; storage?: { directory?: string } }`). +The path-extraction logic (`storage.directory`) is unchanged between majors. + +Verified nuance ([07 §revised findings](./07-verification-results.md)): under v2, +`experiments.cache` is **silently inert** — no error, persistent cache just turns off. +So additionally: when running v2 with `experiments.cache` set in the user config, emit a +clear warning pointing to top-level `cache` (and consider honoring it by copying the value +over) so users don't silently lose caching. + +> ⚠️ **AMENDED (2026-07-02, maintainer feedback — see [09](./09-pr-split-plan.md)):** +> do **not** auto-migrate the user's value — **warn only**; users who bump +> rspack should migrate their own config. Silently setting newer options is +> only acceptable when the project doesn't configure caching at all. + +### 1.3 React Refresh + +> ✅ **Decided 2026-07-02** — full background and rationale in +> [06-react-refresh-deep-dive.md](./06-react-refresh-deep-dive.md). No interim step; this +> lands directly in the dual-support release. + +Drop the `@rspack/plugin-react-refresh@1.0.0` dependency entirely; split by bundler/major: + +- **Rspack ≥ 2**: apply the official v2 plugin with `injectEntry: false` + + `reactRefreshLoader: '@callstack/repack/react-refresh-loader'`; inject the entry + ourselves from the supported `@rspack/plugin-react-refresh/react-refresh-entry` subpath. + The plugin becomes an **optional peerDependency (`^2`)** with a friendly install + pre-check; `repack-init` adds it by default (new projects default to Rspack 2, Q3). + Require it **lazily inside the rspack≥2 branch** — the package is ESM-only, so a + top-level import would crash Node 18 users even on webpack; inside the branch the §1.4 + Node guard guarantees `require(esm)` works. +- **Rspack 1 + webpack**: keep today's manual wiring, pointed at the three client files + **vendored into `packages/repack/src/modules`** (adapted from the v2 files, MIT, + overlay-free); swap the removed overlay defines for `__reload_on_runtime_errors__: false`. +- At the next major (Rspack 1 support ends, Q5) the vendored path becomes webpack-only. + +Also make all refresh wiring lazy (inside `apply()`), not at module top level — today a +resolution failure crashes even webpack-only commands. + +### 1.4 Runtime guard for Node version + +When `isRspack2()` and `process.version` < 20.19 (or 22.0–22.11), fail fast in the rspack +commands with an actionable message ("Rspack 2 requires Node ^20.19.0 || >=22.12.0 — found +X; upgrade Node or use @rspack/core@1"). This converts an obscure `ERR_REQUIRE_ESM` / +engine crash into a supported-configuration error. + +## Phase 2 — Compatibility hardening + +### 2.1 Types + +- Bump the repo devDependency/catalog used for compilation to `@rspack/core@^2`. +- Fix resulting type errors (known: `resetPersistentCache.ts`; likely: a few + `Configuration`-shaped helpers). Where v1-only shapes are read at runtime, use widened + local types instead of `@ts-expect-error`. +- Public API check: our exported types (`RspackConfig` etc.) will describe v2. Document + that v1 users may see minor type mismatches for removed experiment keys (values still + work at runtime under v1 — validation only rejects *unknown* keys per-major, and we only + emit keys valid for the detected major). + +### 2.2 Config-generation review under v2 semantics + +- `getRepackConfig`: `devtool: 'source-map'`, `output.*`, `optimization.chunkIds` — all + still valid in v2; add an integration assertion that generated config passes v2 schema + validation for both `mode`s. +- Target propagation ([PR #12752](https://github.com/web-infra-dev/rspack/pull/12752)): + confirm our per-rule SWC `env`/`jsc` options override the propagated top-level target, + and that `RepackTargetPlugin`'s target handling doesn't produce surprising SWC/browserslist + defaults. Add explicit loader targets if needed. +- `exportsPresence`: **decided (Q1)** — set + `module.parser.javascript.exportsPresence: 'auto'` in `getRepackConfig` for Rspack 2 to + preserve Metro-like tolerance; document as overridable. + +### 2.3 Module Federation + +- `ModuleFederationPluginV1`: pre-flight `require.resolve('@module-federation/runtime-tools', { paths: [context] })` + when running under Rspack 2 and throw a friendly install hint (mirror + `ModuleFederationPluginV2.ensureModuleFederationPackageInstalled`). +- Establish and document the supported `@module-federation/enhanced` version range per + Rspack major; run `tester-federation` and `tester-federation-v2` against both majors. + +> ⚠️ **AMENDED (2026-07-03):** the pre-check is implemented (reference +> branch; PR 5 in [doc 09](./09-pr-split-plan.md), maintainer-approved). The +> enhanced-range + federation-app runs move to the **workspace-adoption +> follow-up** (doc 09 § Follow-up) with an important caveat: in-workspace, +> the federation apps always run repack's `@rspack/core@^2` devDependency +> (doc 08 § Discovery), so those runs only cover **v2**. True-v1 federation +> validation needs a standalone lab (the `tester-app-rspack1` +> tarball-install pattern, plus `@module-federation/enhanced`) — scoped in +> the follow-up, not this stack. + +### 2.4 Minimizer + +Extend `shouldUseTerserForRspack` (rename to a positive `getRspackMinimizer` decision): +evaluate `SwcJsMinimizerRspackPlugin` on 2.x — upstream reports ~50% faster cached +minification. If output parity holds for RN bundles (hermes-safe output, comments +stripping), prefer it for v2 and keep Terser for 1.x. + +### 2.5 Tracing/profiling + +**Verified (V9, [07](./07-verification-results.md))**: the `globalTrace` API is +compatible, but published v2 binaries are built *without* the perfetto layer — +`traceLayer: 'perfetto'` (our current default) throws under v2 while `'logger'` works. +Add a `profile-2.ts` variant that defaults to `'logger'` under v2 and surfaces a clear +error if perfetto is explicitly requested; track whether upstream restores perfetto in +later binaries. + +## Phase 3 — Validation surfaces & CI + +- **Matrix:** run integration tests against `@rspack/core@^1` and `@rspack/core@^2` + (pnpm override or per-fixture installs). Node lanes: 18/20 stay v1-only; v2 suites run + on 20.19+/22/24. +- `tests/metro-compat`: full sweep under v2 — this is where `requireAlias` + (aliased dynamic require) and `exportsPresence` regressions will surface. +- `tests/resolver-cases`: run under v2 to confirm explicit resolve options fully mask the + resolver default changes. +- Manual validation: `tester-app` dev-server flow (HMR/React Refresh, chunk loading via + ScriptManager, remote debugging) on iOS + Android under v2. + +## Phase 4 — Docs, templates, release + +- `templates/rspack.config.{cjs,mjs}`: verify against v2 (they set no `experiments`, so + likely fine as-is). +- `packages/init/src/versions.json`: **decided (Q3)** — new projects default to + `@rspack/core@^2` once the validation pass is green (init could also accept + `--rspack-version` for opting into v1). +- Website: "Using Rspack 2 with Re.Pack" migration page — Node floor, removed experiment + keys, `experiments.cache` → `cache`, `stats.json` content changes, chunk-global rename + note for anyone post-processing bundles, MFv1 runtime-tools install requirement. +- Changeset: minor release of `@callstack/repack` (new capability, no breaking change for + v1 users). Plugins need no code change (types only) but should get a compatible release + if the type bump alters their builds. + +## Out of scope (this effort) + +- Making `@callstack/repack` itself ESM-only or dropping Node 18 — separate discussion for + the next major. +- Adopting v2-only features (RSC, `optimization.inlineExports`, `moduleIds: 'hashed'`, + rule-level `parallel` by default) — follow-ups listed in [05](./05-user-benefits.md). diff --git a/agent_context/rspackv2-jul2026/04-questions-and-blockers.md b/agent_context/rspackv2-jul2026/04-questions-and-blockers.md new file mode 100644 index 000000000..602763e42 --- /dev/null +++ b/agent_context/rspackv2-jul2026/04-questions-and-blockers.md @@ -0,0 +1,133 @@ +# Open Questions, Concerns & Potential Blockers + +Ordered roughly by how much they gate implementation. "Verify" items are cheap experiments +to run at the start of implementation; "Decide" items need a team call. + +External sources behind the questions: the +[breaking-changes discussion (rspack#9270)](https://github.com/web-infra-dev/rspack/discussions/9270) +and the [official migration guide](https://rspack.rs/guide/migration/rspack_1.x); +upstream PRs are linked inline where a specific change is at issue. + +> **Status 2026-07-02: Q1–Q5 are decided** (decisions recorded inline below), and the +> React Refresh approach is decided too — drop the v1 plugin dep; official v2 plugin for +> Rspack ≥ 2, vendored client files for Rspack 1 + webpack. Details in +> [06-react-refresh-deep-dive.md](./06-react-refresh-deep-dive.md). + +## Decide (product/policy calls) + +### Q1. `exportsPresence` default: do we shield RN users? + +Rspack 2 turns "importing a non-existent export" from a warning into a **hard build error** +([PR #13002](https://github.com/web-infra-dev/rspack/pull/13002)). The RN ecosystem relies +heavily on loose imports (platform-forked files, optional native modules, flow-typed +packages); Metro doesn't even do export validation. A user upgrading to Rspack 2 may see +their app fail on errors *inside node_modules they can't fix*. + +Options: + +- a) Set `module.parser.javascript.exportsPresence: 'auto'` (or `'warn'`) in + `getRepackConfig` for Rspack 2 → Metro-like tolerance, users can opt into strictness. +- b) Leave upstream default (`'error'`) → stricter correctness, more upgrade friction. + +**Recommendation: (a)**, matching Re.Pack's Metro-compatibility posture. Cheap to do, +documented as overridable. + +> ✅ **DECIDED (2026-07-02): option (a)** — set `exportsPresence: 'auto'` in +> `getRepackConfig` under Rspack 2. + +### Q2. Node support policy + +- Keep `engines.node: ">=18"` and enforce the Rspack-2 floor (≥20.19 / ≥22.12) at runtime + with a clear error (plan §1.4)? — **Recommended**; Rspack 1 + webpack users on Node 18 + keep working. +- Or bump engines to `>=20.19` for the next repack minor? Simpler story, but drops Node 18 + webpack/Rspack-1 users in a *minor* release — likely needs a major instead. +- Note: React Native 0.84 tooling generally assumes Node ≥20 already, so the practical + impact of keeping `>=18` is small either way. + +> ✅ **DECIDED (2026-07-02): keep `engines.node: ">=18"`** and enforce the Rspack-2 floor +> at runtime with a clear error (plan §1.4). + +### Q3. What do new projects get (`repack-init`, docs, templates)? + +`packages/init/src/versions.json` pins `@rspack/core: ^1.7.8`. Once dual support ships, do +new projects default to v2? Suggest yes (upstream recommends v2; v1 is critical-fixes-only) +— but only after the full tester-app validation pass. Interim option: ship dual support +first, flip the init default in a follow-up. + +> ✅ **DECIDED (2026-07-02): default new projects to Rspack v2** (`repack-init`, +> templates, docs) once the validation pass is green. + +### Q4. Minimizer default under v2 + +Terser (current, battle-tested for RN/Hermes output) vs `SwcJsMinimizerRspackPlugin` +(~50% faster cached, but we abandoned it before due to breakage — see +`shouldUseTerserForRspack` and its 1.4.11/1.5.0 history). Needs an output-parity +check on Hermes before switching. Safe default: keep Terser, offer SWC opt-in. + +> ✅ **DECIDED (2026-07-02): keep Terser as the default**, offer +> `SwcJsMinimizerRspackPlugin` as an opt-in; revisit after a Hermes output-parity check. + +### Q5. Do we still test/support Rspack 1 in CI indefinitely? + +Dual support doubles the integration matrix. Proposal: full matrix until repack's next +major, then v1 moves to a legacy lane (smoke tests only). Needs maintainer sign-off +because it affects CI minutes and release checklists. + +> ✅ **DECIDED (2026-07-02): keep supporting/testing Rspack 1 at least until Re.Pack's +> next major release.** + +## Verify (cheap experiments, do first during implementation) + +> ✅ **EXECUTED 2026-07-02** against `@rspack/core@2.1.2` — full details and lab setup in +> [07-verification-results.md](./07-verification-results.md). **No blockers**; both +> flagged potential blockers (V3, V10) cleared; one new work item (V9 perfetto). + +| # | Check | Result | +| --- | --- | --- | +| V1 | `require('@rspack/core')` from repack's compiled CJS — named exports and Babel default-interop | ✅ PASS — v2 uses the `module.exports` ESM-interop convention; `require()` returns the callable `rspack` fn, v1-identical shape | +| V2 | `rspackVersion` still exported from core v2 | ✅ PASS (`2.1.2`) | +| V3 | `rspack.experiments.swc` still exposed in v2 JS API | ✅ PASS — `transform/transformSync/minify/minifySync` present; blocker cleared | +| V4 | `compiler.webpack.container.ModuleFederationPluginV1` exists in v2 | ✅ PASS — functional host build; `library: {type: 'self'}` renders `self.name = __webpack_exports__`; runtime-tools pre-check still needed | +| V5 | Does v2 schema validation reject the `devServer` key? | ✅ PASS — accepted; v2 validation is loose overall (unknown keys silently ignored) | +| V6 | `chunkLoading: 'jsonp'` + `chunkFormat: 'array-push'` + `globalObject` produce working RN bundles under v2 | ✅ PASS — full RepackTargetPlugin mechanism replicated and bundle **executed**: `load_script` name intact, `module.source.source` mutation works, custom RuntimeModule injection works, lazy chunk loaded | +| V7 | HMR machinery under v2 (`__webpack_hash__`, hot-update globals, `module.hot`) | ✅ PASS build-level (`rspackHotUpdate*` confirmed live); device e2e stays in Phase 3 | +| V8 | Top-level `target` propagation doesn't override our per-rule SWC options | ✅ PASS — explicit `jsc.target` wins; propagation applies only without loader options | +| V9 | `--trace-*` profiling flow against v2 tracing | ⚠️ **PARTIAL** — API compatible, but **perfetto layer missing from published binaries**; `'logger'` works. `--trace` default breaks under v2 → plan §2.5 gains a `profile-2` item | +| V10 | `@module-federation/enhanced` on Rspack 2; CJS require of `enhanced/rspack` | ✅ PASS — `enhanced@2.6.0` builds an MF host cleanly on 2.1.2; blocker cleared | +| V11 | Aliased dynamic require + `exportsPresence` under v2 | ✅ PASS — `exportsPresence: 'error'` default confirmed and `'auto'` fix works (Q1 validated); **aliased-require regression did not reproduce** on 2.1.2. Full metro-compat sweep stays in Phase 3 | + +## Concerns (not blockers, keep on the radar) + +- **Chunk global rename** (`webpackChunk*` → `rspackChunk*`, same for hot updates): safe + within a build, but anyone doing OTA/code-push-style delivery where a *pre-built* chunk + is loaded into a host built with a different Rspack major will break. Also affects users + who hand-patch or post-process bundles matching on `webpackChunk`. Mitigation: docs note + + users can pin `output.chunkLoadingGlobal` themselves for cross-version stability. +- **Type duality:** compiling repack against v2 types while supporting v1 at runtime means + v1-only user configs (e.g. `experiments.cache`) type-error against our exported config + types even though they run fine. Acceptable if documented; revisit if users complain. +- **`stats.json` content shrink** under v2 defaults for `bundle --json` consumers + (custom analysis scripts, size-tracking CI) — docs note. +- **plugin-react-refresh v1 pin longevity:** staying on the v1 plugin line is fine today, + but upstream will eventually stop patching it; the manual-path-resolution approach in + the plan removes the coupling so a future bump to ^2 is trivial. +- **Upstream cadence:** 2.x is moving fast (2.0 → 2.1.2 in ~2 months). Pin exact versions + in CI fixtures to keep failures attributable. +- **Rsbuild/rstack interplay:** none of our packages depend on Rsbuild, but users mixing + Re.Pack docs with Rsbuild guides will hit config-shape differences; keep our migration + page self-contained. + +## Current blocker summary + +**No blockers — verified empirically** ([07-verification-results.md](./07-verification-results.md)). +The two items previously flagged as potential blockers both cleared: + +1. **V3** ✅ — `experiments.swc` is present in v2's JS API; `babel-swc-loader` needs no + new SWC acquisition path. +2. **V10** ✅ — `@module-federation/enhanced@2.6.0` loads via CJS and builds MF hosts + cleanly on Rspack 2.1.2. + +One new work item from verification: **V9** — published v2 binaries lack the perfetto +trace layer, so `--trace-*` needs a v2 code path defaulting to the `logger` layer +(plan §2.5). diff --git a/agent_context/rspackv2-jul2026/05-user-benefits.md b/agent_context/rspackv2-jul2026/05-user-benefits.md new file mode 100644 index 000000000..b3fb5c748 --- /dev/null +++ b/agent_context/rspackv2-jul2026/05-user-benefits.md @@ -0,0 +1,64 @@ +# What Rspack 2.0 Brings to Re.Pack Users + +Sourced from the [Rspack 2.0 announcement](https://rspack.rs/blog/announcing-2-0) and the +[migration guide](https://rspack.rs/guide/migration/rspack_1.x), filtered to what actually +matters for React Native + Re.Pack workflows. + +## Build performance + +- **~10% faster builds vs 1.7, up to 2× vs 1.0**, and **>20% lower memory usage** — + directly felt in `repack start`/`repack bundle` on large RN apps. +- **Persistent cache is now stable** (top-level `cache` option, was + `experiments.cache`). Upstream benchmark: cached prod build 2.2s → 1.4s. For RN teams + this shortens the cold-start after `pnpm install`/branch switches. Re.Pack's + `--reset-cache` already integrates with it. +- **SWC minimizer ~50% faster on cache hits** — a candidate to replace Terser as Re.Pack's + default Rspack minimizer (pending Hermes output-parity validation), which would cut the + dominant cost of release builds. +- **`lazyCompilation` stable** — faster dev-server startup for large multi-entry setups. + +## Bundle size / output quality (bigger deal on mobile than web) + +- **Smarter tree shaking**: CommonJS destructuring analysis, property-access analysis, + smarter dynamic imports — RN dependency trees are full of CJS interop, so this should + translate into real bundle-size wins (faster app startup, smaller OTA payloads). +- **`/*#__NO_SIDE_EFFECTS__*/` and `optimization.inlineExports`** — more dead code + eliminated across module boundaries. +- **Module Federation shared-dependency tree shaking** (`treeShaking` config) — notable for + Re.Pack's super-app/MF audience where shared `react-native` deps dominate remote sizes. +- **`optimization.moduleIds: 'hashed'`** — stable short module IDs across builds; useful + for ScriptManager-based chunk caching and OTA diffing, where ID churn currently + invalidates chunks unnecessarily. +- **`enforceSizeThreshold` in splitChunks (50KB prod default)** — better automatic chunk + granularity for remote-loaded code. + +## Dependency & install footprint + +- `@rspack/core` went from 8 npm dependencies to 1 — leaner `node_modules`, fewer + transitive-dep audit findings, faster CI installs. +- `@module-federation/runtime-tools` no longer force-installed for non-MF users. + +## DX & correctness + +- **Config validation on by default** — announced as catching config mistakes early. + *In practice weaker than the announcement (verified against 2.1.2, [doc 07](./07-verification-results.md)): + unknown top-level and `experiments` keys are silently accepted — validation catches some + structural invariants, not typos or removed keys. Don't rely on it as a migration signal.* +- **Top-level `target` propagates to SWC/LightningCSS/minimizers** — one place to declare + the syntax floor instead of three (Re.Pack still pins RN-appropriate loader options, but + user overrides get simpler). +- **`detectSyntax: 'auto'` for swc-loader**, subpath `#` imports from `package.json` + `imports` working without extra config, `import.meta.dirname/filename` support. +- **Better agent/debugging tooling direction** upstream (Rsdoctor integration, richer + tracing) — aligns with Re.Pack's `--trace-*` profiling flow. + +## Strategic + +- **Rspack 1.x is in maintenance mode** (critical fixes only, frozen at 1.7.12). New + features — including RN-relevant output optimizations — land in 2.x only. Supporting 2.x + keeps Re.Pack users on the maintained line and keeps Re.Pack attractive vs Metro on + build-performance grounds. +- Experimental **React Server Components support** upstream — not an RN feature today, but + relevant to where the React ecosystem is heading. +- Ecosystem momentum: Rspack downloads grew 100k → 5M/week; Next.js, Nuxt, Angular, + Storybook support it — more shared knowledge and third-party plugin compatibility. diff --git a/agent_context/rspackv2-jul2026/06-react-refresh-deep-dive.md b/agent_context/rspackv2-jul2026/06-react-refresh-deep-dive.md new file mode 100644 index 000000000..d24bbdd47 --- /dev/null +++ b/agent_context/rspackv2-jul2026/06-react-refresh-deep-dive.md @@ -0,0 +1,200 @@ +# Deep dive: `deprecated_runtimePaths` and the React Refresh integration + +Context for break №2 in [02-impact-analysis.md](./02-impact-analysis.md): what the API is, +why Re.Pack depends on it, why upstream removed it in v2, and the better v2-supported +approach to replace it. + +Verified against published tarballs +([`@rspack/plugin-react-refresh@1.0.0`](https://www.npmjs.com/package/@rspack/plugin-react-refresh/v/1.0.0) +and [`@2.0.2`](https://www.npmjs.com/package/@rspack/plugin-react-refresh/v/2.0.2)) and +upstream history: + +- Removal PR: [rstackjs/rspack-plugin-react-refresh#95](https://github.com/rstackjs/rspack-plugin-react-refresh/pull/95) — "fix: remove deprecated static method for runtime paths" (merged 2026-04-07, part of v2.0.0) +- ESM migration: [rstackjs/rspack-plugin-react-refresh#91](https://github.com/rstackjs/rspack-plugin-react-refresh/pull/91) +- The static existed since at least Nov 2023 (visible pre-existing in [web-infra-dev/rspack#4486](https://github.com/web-infra-dev/rspack/pull/4486), back when the plugin lived in the rspack monorepo and its refresh utils were still sourced from `@pmmmwh/react-refresh-webpack-plugin`) + +## What `deprecated_runtimePaths` is + +A static property on the v1 plugin class exposing its four internal client-runtime file +paths, so integrators could rebuild the plugin's wiring themselves: + +```js +// @rspack/plugin-react-refresh@1.x — dist/index.js +const runtimePaths = [ + reactRefreshEntryPath, // client/reactRefreshEntry.js — injects react-refresh into the global hook, must run FIRST + reactRefreshPath, // client/reactRefresh.js — the $ReactRefreshRuntime$ facade (refresh/register/createSignatureFunctionForTransform) + refreshUtilsPath, // client/refreshUtils.js — module.hot bookkeeping, exports comparison, performReactRefresh() + refreshRuntimeDirPath, // dirname of react-refresh/runtime (for resolve.alias) +]; +ReactRefreshRspackPlugin.deprecated_runtimePaths = runtimePaths; +``` + +The `deprecated_` prefix was there from day one — it was never a supported API, but an +escape hatch acknowledging that the plugin wasn't configurable enough for integrators. + +## What Re.Pack uses it for — and why it bypasses the plugin + +Re.Pack never calls `plugin.apply()`. `DevelopmentPlugin` harvests the first three paths +and **re-implements the plugin's wiring by hand** (`DevelopmentPlugin.ts:124-161`), because +the v1 plugin can't accommodate three React Native requirements: + +| Requirement | v1 plugin behavior | What Re.Pack needs | +| --- | --- | --- | +| **Entry placement** | Always injects `reactRefreshEntry` as a *global, unnamed* entry (`EntryPlugin(..., { name: undefined })`) — no way to disable or control ordering | Dev entries added **per named entrypoint** (including Module Federation containers), in the exact order `[reactRefreshEntry, configurePublicPath, WebpackHMRClient]`; on webpack, additionally reordered around the MF `.federation/entry` (`DevelopmentPlugin.ts:183-199`) | +| **Loader** | Hardcodes `builtin:react-refresh-loader` — a native Rspack loader that **doesn't exist in webpack** | One loader for both bundlers: `@callstack/repack/react-refresh-loader`, a JS port that also accounts for RN runtime specifics (`setImmediate` guard before refresh) | +| **Error overlay** | Web-oriented error overlay + dev-server socket integration on by default | Meaningless in React Native — Re.Pack stubs it via `DefinePlugin({ __react_refresh_error_overlay__: false, __react_refresh_socket__: false })` | + +So Re.Pack's manual wiring is a faithful mirror of the v1 plugin's internals: the same +`ProvidePlugin({ $ReactRefreshRuntime$ })`, `ProvidePlugin({ __react_refresh_utils__ })`, +`DefinePlugin({ __react_refresh_library__ })`, and `resolve.alias['react-refresh']` — just +with RN-appropriate values and its own entry/loader handling. The runtime paths were the +only piece it couldn't produce itself, hence the dependency on the escape hatch. + +## Why upstream removed it + +Two reasons, both visible in the v2 source: + +**1. It leaked internals that v2 changed incompatibly.** The paths were only useful if you +also replicated the plugin's wiring — and that wiring contract is exactly what changed: + +| Internal contract | v1 | v2 | +| --- | --- | --- | +| Client file module format | CommonJS (`require`/`module.exports`) | ESM (`import`/`export`) | +| Defines expected by `refreshUtils.js` | `__react_refresh_library__`, `__react_refresh_error_overlay__`, `__react_refresh_socket__` | `__react_refresh_library__`, `__reload_on_runtime_errors__` (overlay/socket **removed entirely** — the overlay client files no longer ship) | +| Runtime requirements | implicit | plugin explicitly taps `additionalTreeRuntimeRequirements` to add `RuntimeGlobals.moduleCache` (refreshUtils reads `__webpack_require__.c`) | +| Deep-import surface | any file reachable | strict `exports` map: only `./react-refresh` and `./react-refresh-entry` exposed; `client/refreshUtils.js` is **not** importable by subpath | +| Plugin export | CJS default (`module.exports = class`) | **named export only** (`export { ReactRefreshRspackPlugin }`) — our `import ReactRefreshPlugin from ...` default import breaks too | + +Consuming files by path while hand-rolling the wiring invites exactly this version skew — +which is why the paths were never a safe public API. + +**2. v2 made the escape hatch unnecessary.** The v2 plugin added first-class integrator +options (from `dist/options.d.ts`): + +```ts +type PluginOptions = { + injectEntry?: boolean; // default true — set false to control entry placement yourself + injectLoader?: boolean; // default true — set false to skip the loader rule entirely + reactRefreshLoader?: string; // default 'builtin:react-refresh-loader' — swap in a custom loader + test?: RuleSetCondition; // loader rule conditions now configurable + include?: RuleSetCondition | null; + exclude?: RuleSetCondition | null; + resourceQuery?: RuleSetCondition; + library?: string; // falls back to output.uniqueName || output.library (same as our manual define) + forceEnable?: boolean; + reloadOnRuntimeErrors?: boolean; +}; +``` + +Every reason Re.Pack had for bypassing the plugin now has a supported knob: +`injectEntry: false` covers the entry-placement problem, `reactRefreshLoader` covers the +custom loader, and the overlay problem evaporated because v2 deleted the overlay. + +## The better approach for Re.Pack + +> ✅ **DECIDED (2026-07-02).** Drop the `@rspack/plugin-react-refresh@1.0.0` dependency +> entirely. Architecture: +> +> - **Rspack ≥ 2** → apply the official v2 plugin with `injectEntry: false` + +> `reactRefreshLoader` (target-state code below); entry from the supported +> `/react-refresh-entry` subpath. The plugin becomes an **optional peerDependency** +> (`^2`) with a friendly install pre-check (same pattern as `@module-federation/enhanced`); +> `repack-init` adds it by default since new projects default to Rspack 2 (Q3). +> The plugin must be **lazily required inside the rspack≥2 branch** — it's ESM-only, and +> a top-level import would crash Node 18 users even on webpack; the branch is guarded by +> the Q2 Node ≥ 20.19 runtime check, where `require(esm)` works. +> - **Rspack 1 + webpack** → vendor the three client files (adapted from v2, MIT, +> overlay-free) into `packages/repack/src/modules`; keep today's manual wiring pointed at +> them, swapping the removed overlay defines for `__reload_on_runtime_errors__: false`. +> *(Location later amended per maintainer feedback #2: package-root +> `vendor/react-refresh/` shipped as-is, with a LICENSE/provenance file — doc 10 §2.)* +> No `moduleCache` tap needed — today's manual wiring already works without it on +> rspack 1/webpack. +> - **No interim step** — this lands directly in the dual-support release. When Rspack 1 +> support ends at the next major (Q5), the vendored path becomes webpack-only with no +> rework. + +### Rspack ≥ 2 branch: apply the plugin with integrator options + +```ts +// DevelopmentPlugin.ts — inside the rspack≥2 branch (NOT top-level: package is ESM-only, +// safe here because the Node ≥20.19 guard has already run and require(esm) works) +const { ReactRefreshRspackPlugin } = require('@rspack/plugin-react-refresh'); // named export in v2 + +new ReactRefreshRspackPlugin({ + injectEntry: false, // we inject the entry ourselves, per entrypoint, in our required order + reactRefreshLoader: '@callstack/repack/react-refresh-loader', // RN-specific footer + test: /\.([cm]js|[jt]sx?|flow)$/i, // match our current rule conditions + exclude: /node_modules/i, +}).apply(compiler); + +// entry path via the v2 exports map — a SUPPORTED subpath, not an internal file: +const reactRefreshEntryPath = require.resolve( + '@rspack/plugin-react-refresh/react-refresh-entry' +); +const devEntries = [ + reactRefreshEntryPath, + require.resolve('../modules/configurePublicPath.js'), + require.resolve('../modules/WebpackHMRClient.js'), +]; +// ... existing per-entrypoint EntryPlugin loop unchanged +``` + +The plugin then owns everything that was previously copy-pasted wiring: the +`$ReactRefreshRuntime$` / `__react_refresh_utils__` provides, the +`__react_refresh_library__` / `__reload_on_runtime_errors__` defines, the `react-refresh` +alias, the loader rule (using **our** loader), and the `moduleCache` runtime requirement. +Version skew between client files and wiring becomes impossible — that's the whole point +of the supported options. + +Deletions this enables in `DevelopmentPlugin`: both `ProvidePlugin` calls, the refresh +`DefinePlugin` call, the `resolve.alias` patch, and the manual loader-rule unshift +(~30 lines), for the rspack branch. + +### Rspack 1 + webpack branch: vendored client files + today's manual wiring + +The v2 plugin is rspack-2-only for us (it calls `compiler.rspack.*`, is ESM-only, and +peer-requires core `^2`), so the Rspack 1 and webpack paths keep the existing manual +wiring — with the client files **vendored into Re.Pack** instead of harvested from the v1 +package: + +- Adapt the three v2 client files (MIT, originally ported from + `@pmmmwh/react-refresh-webpack-plugin`; RN needs no overlay so it's ~150–200 lines total) + into `packages/repack/src/modules`, next to `WebpackHMRClient`. *(Amended per + maintainer feedback #2: they live at package-root `vendor/react-refresh/`, + shipped as-is — doc 10 §2.)* +- Manual wiring changes only in the defines: drop + `__react_refresh_error_overlay__` / `__react_refresh_socket__` (v1-file contract), add + `__reload_on_runtime_errors__: false` (v2-file contract). +- The loader footer contract (`$ReactRefreshRuntime$.refresh/register/createSignatureFunctionForTransform`) + is satisfied by the v2 files unchanged (verified). +- Vendoring is also the escape valve if upstream ever changes the v2 option surface. + +### Implementation notes + +- **Dependency shape:** `@rspack/plugin-react-refresh@1.0.0` regular dep → deleted. + `@rspack/plugin-react-refresh@^2` → optional peerDependency + install pre-check in the + rspack≥2 branch (mirror `ModuleFederationPluginV2.ensureModuleFederationPackageInstalled`). +- **Lazy require:** `const { ReactRefreshRspackPlugin } = require('@rspack/plugin-react-refresh')` + *inside* the rspack≥2 branch only — never top-level (ESM-only package; Node 18 + webpack/rspack-1 users must never evaluate it). +- **Sunset path:** at Re.Pack's next major (Rspack 1 support ends per Q5), the vendored + path becomes webpack-only; no rework needed. + +### Watch-outs when adopting the v2 plugin + +- **Named export**: `import { ReactRefreshRspackPlugin } from ...` — the default import + returns `undefined` in v2. +- **Loader footer compatibility**: our loader's footer calls + `$ReactRefreshRuntime$.refresh/register/createSignatureFunctionForTransform` — all three + are still exported by v2's `client/reactRefresh.js` (verified), so the footer is + unchanged. +- **`library` option**: omit it — the v2 plugin falls back to + `output.uniqueName || output.library`, which is exactly what our manual + `__react_refresh_library__` define computes today. +- **Mode gating**: the plugin no-ops unless `mode === 'development'` (or `forceEnable`). + Our `DevelopmentPlugin` already only wires refresh when `devServer.hot` is set — keep + that outer gate, it's stricter. +- **`reloadOnRuntimeErrors`**: new v2 behavior knob (full reload on runtime errors, + default `false`). Default matches current behavior; worth evaluating later as a DX + improvement for RN (a "reload app on unrecoverable HMR error" toggle). diff --git a/agent_context/rspackv2-jul2026/07-verification-results.md b/agent_context/rspackv2-jul2026/07-verification-results.md new file mode 100644 index 000000000..3734e5c1e --- /dev/null +++ b/agent_context/rspackv2-jul2026/07-verification-results.md @@ -0,0 +1,175 @@ +# Verification Results (V1–V11) + +Executed 2026-07-02 against `@rspack/core@2.1.2`, `@rspack/plugin-react-refresh@2.0.2`, +`@module-federation/enhanced@2.6.0` on Node v26.3.1, in an isolated lab project +(CJS consumer, mirroring `@callstack/repack`'s published module format). Checklist +defined in [04-questions-and-blockers.md](./04-questions-and-blockers.md). + +External sources: + +- [Planned breaking changes discussion (web-infra-dev/rspack#9270)](https://github.com/web-infra-dev/rspack/discussions/9270) +- [Official 1.x → 2.0 migration guide](https://rspack.rs/guide/migration/rspack_1.x) +- Packages tested (from npm): [@rspack/core@2.1.2](https://www.npmjs.com/package/@rspack/core/v/2.1.2), + [@rspack/core@1.7.12](https://www.npmjs.com/package/@rspack/core/v/1.7.12), + [@rspack/plugin-react-refresh@2.0.2](https://www.npmjs.com/package/@rspack/plugin-react-refresh/v/2.0.2), + [@module-federation/enhanced@2.6.0](https://www.npmjs.com/package/@module-federation/enhanced/v/2.6.0) + +## Scoreboard + +| # | Check | Verdict | +| --- | --- | --- | +| V1 | `require(esm)` of `@rspack/core` from CJS | ✅ PASS | +| V2 | `rspackVersion` export | ✅ PASS | +| V3 | `experiments.swc` JS API | ✅ PASS — potential blocker cleared | +| V4 | Built-in `ModuleFederationPluginV1` | ✅ PASS (functional build) | +| V5 | `devServer` key vs v2 validation | ✅ PASS (accepted) | +| V6 | RN chunk loading chain under v2 | ✅ PASS (executed end-to-end) | +| V7 | HMR machinery (build-level) | ✅ PASS — device e2e still required | +| V8 | `target` propagation vs explicit loader options | ✅ PASS (explicit wins) | +| V9 | `--trace-*` / globalTrace | ⚠️ **PARTIAL — perfetto layer missing from published binaries** | +| V10 | `@module-federation/enhanced` on Rspack 2 | ✅ PASS — potential blocker cleared | +| V11 | Aliased dynamic require + `exportsPresence` | ✅ PASS (with one prediction overturned) | + +**No blockers.** Both items previously flagged as potential blockers (V3, V10) cleared. +One new work item surfaced (V9 perfetto). Two findings **revise the impact analysis** — +see "Revised findings" below. + +## Details + +### V1 — `require('@rspack/core')` from CJS ✅ + +Better than expected. Rspack 2 uses Node's `module.exports` ESM-interop convention, so +`require('@rspack/core')` returns **the callable `rspack` function itself** with all named +exports attached (`core.rspack === core` is `true`) — byte-for-byte compatible with v1's +CJS shape. Babel-compiled named imports (`_core.rspack`) and default-import interop both +work. Note: no `__esModule` marker and no `default` export — irrelevant for our usage, but +`import default` of **`@rspack/plugin-react-refresh@2`** yields `undefined` (named export +only), independently confirming that part of break №2. + +### V2 — `rspackVersion` ✅ + +Exported, returns `2.1.2`. The version-detection helper (plan §0.1) is safe. + +### V3 — `experiments.swc` ✅ (blocker cleared) + +Present with `transform`, `transformSync`, `minify`, `minifySync` — exactly what +`babelSwcLoader/utils.ts` consumes. No new SWC acquisition path needed. + +### V4 — Built-in MFv1 plugin ✅ (functional) + +`rspack.container.ModuleFederationPluginV1` exists (alongside `ModuleFederationPlugin`, +`ContainerPlugin`, `ContainerReferencePlugin`; `sharing.*` includes a new +`TreeShakingSharedPlugin`). A functional host build with +`library: { type: 'self' }` + `exposes` compiled with **zero errors** and rendered the +container exactly as Re.Pack expects: `self.mfv1host = __webpack_exports__`. +`@module-federation/runtime-tools` was resolvable in the lab only because +`@module-federation/enhanced` hoists it — a standalone MFv1 user won't have it, so the +**pre-check + friendly error stays in the plan** (§2.3). + +### V5 — `devServer` key ✅ (and a broader discovery) + +`rspack({ ...config, devServer: {...} })` is accepted — no stripping needed in the `start` +flow. Broader discovery: **v2 config validation is loose** — unknown keys (bogus +experiments, bogus top-level keys) are silently ignored, not rejected. Validation does +exist but only enforces specific invariants (e.g. `context` must be absolute). This +overturns the "validation on by default → hard failure" assumption from the initial +research; see "Revised findings". + +### V6 — RN chunk-loading chain ✅ (executed end-to-end) + +Reproduced `RepackTargetPlugin`'s exact mechanism under v2 and **executed the output**: + +- Runtime module names intact: `load_script` still fires (alongside `ensure_chunk`, + `jsonp_chunk_loading`, `public_path`, `get javascript chunk filename`, + `has_own_property`) — the `module.name === 'load_script' || 'load script'` match in + `RepackTargetPlugin.ts:115` keeps working. (CSS runtime module names untested — no CSS + in the fixture; low risk.) +- `module.source.source = Buffer.from(...)` mutation applies (marker found in output). +- `compilation.addRuntimeModule(chunk, new CustomRuntimeModule())` with a + `compiler.webpack.RuntimeModule` subclass works (`STAGE_BASIC`, `generate()`). +- `chunkLoading: 'jsonp'` + `chunkFormat: 'array-push'` + `globalObject: 'self'` + + `target: false` build executed in a VM with a `self` shim: the async `import()` resolved + through our replaced loader — the full ScriptManager-style interception chain works. +- Confirmed live: `chunkLoadingGlobal` is now `rspackChunk${uniqueName}` — internally + consistent, bundle runs fine; cross-major chunk mixing caveat stands (docs note). + +### V7 — HMR machinery ✅ (build-level; device e2e outstanding) + +Dev build with `HotModuleReplacementPlugin`: `__webpack_hash__` compiles to the runtime +hash function, `module.hot` API present, hot-update chunk filename machinery present, and +the hot-update global is `rspackHotUpdatetesterapp` (rename confirmed live; our client +never hardcodes it). Real HMR + React Refresh on an iOS/Android device remains a +Phase 3 validation item. + +### V8 — `target` propagation ✅ + +With top-level `target: ['web', 'es2022']`: + +- explicit `builtin:swc-loader` options `{ jsc: { target: 'es5' } }` **win** — optional + chaining and private class fields were downleveled; +- with no loader options, the propagated es2022 target applies (modern syntax preserved). + +Re.Pack's per-rule SWC options are safe; no config changes needed. + +### V9 — Tracing ⚠️ PARTIAL (new work item) + +`rspack.experiments.globalTrace.{register,cleanup}` exist (API compatible), **but the +published 2.1.2 binaries are built without the perfetto trace layer**: +`register(filter, 'perfetto', out)` throws +*"Perfetto trace layer is not enabled in this build"*. The `'logger'` layer works. +Re.Pack's `profile-1.4.ts` defaults `traceLayer` to `'perfetto'` and its `major > 1` gate +sends Rspack 2 down that path → **`--trace-*` with default options breaks under v2**. +Plan impact (§2.5): add `profile-2` handling — default to `'logger'` under v2 (or +detect/surface the build-feature error clearly), and check whether upstream restores +perfetto in later binaries. + +### V10 — Module Federation v2 ✅ (blocker cleared) + +`require('@module-federation/enhanced/rspack')` from CJS works (v2.6.0 ships CJS). +An MF host with `exposes` built cleanly on Rspack 2 — container + expose chunks emitted, +zero errors. Minor: the bundled Manifest plugin warns when `publicPath` isn't a string — +Re.Pack uses `publicPath: 'noop:///'` (a string), but worth watching in tester-federation +runs. `enhanced`'s exports map does not expose `./package.json`; Re.Pack's pre-check +resolves the main entry, so unaffected. + +### V11 — Parser behavior ✅ (one prediction overturned) + +- **`exportsPresence`**: v2 default confirmed as hard error + (`ESModulesLinkingError: export 'x' was not found`). Setting + `module.parser.javascript.exportsPresence: 'auto'` downgrades it to a warning — the + **Q1 fix works exactly as decided**. +- **Aliased dynamic require**: the predicted regression **did not reproduce** on 2.1.2 — + `const r = require; r('./locales/' + name + '.js')` still creates a context module and + bundles the locale files with default settings (and `requireAlias: true` also works as + an explicit opt-in). Possibly relaxed after the 2.0 release (the related + `requireAsExpression` flip was also reverted upstream). The full `tests/metro-compat` + sweep in Phase 3 remains the definitive check. + +## Revised findings vs the original impact analysis + +1. **Break №1 (`experiments.parallelLoader`) downgraded**: v2 **silently ignores** the + key — no validation error, builds succeed. Still worth removing under v2 (dead config; + rejected by v2 *TypeScript types* at compile time; our loader's parallel-mode warning + probe goes permanently quiet), but users won't hard-fail. Original claim of + "schema validation error on every build" was wrong. +2. **Break №3 (`experiments.cache`) is a *silent* behavior loss, not an error**: verified + functionally — `experiments.cache: { type: 'persistent' }` is inert under v2 (no cache + dir created), while top-level `cache` works. A user migrating to v2 with a v1-style + config **loses persistent caching without any signal**. Plan §1.2 gains a sub-item: + when running v2 and `experiments.cache` is set, emit a warning pointing to top-level + `cache` (consider honoring it by copying it over). *(The "copy it over" idea was + later rejected by maintainer feedback #5 — warn-only, no mutation; doc 10 §5.)* +3. **Break №2 (React Refresh) stands** as the only import-time hard crash, and the + named-export-only detail was independently confirmed. +4. **New: v2 config validation is loose** — unknown keys silently pass. Good for + forward-compat of generated configs; bad for typo detection (documentation note). +5. **New: perfetto tracing absent from published v2 binaries** (V9) — `--trace-*` needs a + v2 code path defaulting to the `logger` layer. + +## Lab artifacts + +Experiment scripts live in the session scratchpad (`v2-lab/`): `api-checks.cjs`, +`validation-probe.cjs`, `cache-check.cjs`, `v6-runtime.cjs`, `v7-hmr.cjs`, +`v8-target.cjs`, `v11.cjs`, `v10-mf.cjs`, `v4-v9-functional.cjs`. They are +self-contained and can be re-run against future Rspack releases by bumping the installed +version. diff --git a/agent_context/rspackv2-jul2026/08-implementation-notes.md b/agent_context/rspackv2-jul2026/08-implementation-notes.md new file mode 100644 index 000000000..e07fd94a0 --- /dev/null +++ b/agent_context/rspackv2-jul2026/08-implementation-notes.md @@ -0,0 +1,417 @@ +# Implementation Notes + +What was actually built on `feat/rspack-2-support`, including the non-obvious +technical details discovered during implementation that aren't captured in the +research docs (01–07). Written so a fresh context can pick up the work without +the original conversation. + +## Commits on this branch + +| Commit | Contents | +| --- | --- | +| `914d3053` | Research docs (01–05 + README) | +| `8d741365` | React Refresh deep dive (doc 06) | +| `7d8687f8` | Q1–Q5 decisions recorded | +| `0b1a3a5a` | V1–V11 verification results (doc 07) | +| `d0ea05d6` | **feat: support rspack 2 alongside rspack 1** — the core implementation | +| `ba841a6a` | **refactor: replace type casts with proper typing** | +| `f623076f` | docs moved to `agent_context/rspackv2-jul2026/` | +| `2f50d03b` | agent_context lifecycle refinement | +| `9075eb20` | docs: external sources cited | +| `4c6c1ab9` | **refactor: warn about legacy experiments.cache instead of auto-migrating it** (feedback #5) | +| `a4e77af0` | **refactor: move vendored react-refresh client files to package-root vendor/** (feedback #2) | +| `ff80bdc8` | **test: add RSPACK_MAJOR jest lane** (doc 09 PR 2 spec + lane-guard test) | +| `95ed7aab` | **feat: per-major tester apps** — tester-app → v2 example, standalone tester-app-rspack1 lab | +| `10a6dfa6` | docs: reworks, corrections (incl. jest-lane correction), on-device validation | +| `41cc2d30` | **feat: flip the workspace default catalog to Rspack 2** (+ integration-test fixes for v2 output formats) | +| `e9705ac6` | docs: catalog flip + true-v2 integration findings | +| `926ff298` | **test: strip ANSI codes from bundle snapshots** (CI-only failure; see § CI snapshot portability) | +| `55b6739e` | **test: normalize URL-encoded repo paths in MFv2 bundle snapshots** (CI-only failure; see § CI snapshot portability) | +| `604392c8` | docs: empirical parallel-loader matrix (doc 10 §6) | + +All of the above are pushed; CI on the branch is **green** as of `55b6739e` +(run 28670402784: TypeScript, Tests, Lint). The narrative sections below were +written as of `d0ea05d6`/`ba841a6a`; where they conflict with later commits, +§ Reference branch updates and § Catalog flip win. + +Draft PR for the whole branch: [#1393](https://github.com/callstack/repack/pull/1393) +(to be closed in favor of the PR stack — see doc 09). + +## What was implemented (plan phases 0–2) + +1. **Version detection** — `packages/repack/src/helpers/rspackVersion.ts`: + `getRspackVersion` / `getRspackMajorVersion` / `isRspack2` resolve + `@rspack/core/package.json` instead of importing the package (safe on any + Node version, safe when not installed); `getRspackMajorVersionFromCompiler` + reads `compiler.webpack.rspackVersion` for plugin contexts. + `profile/index.ts` refactored onto it. +2. **Node guard + lazy commands** — `commands/rspack/ensureNodeCompat.ts` + raises a clear `CLIError` for Rspack 2 on Node < 20.19 (instead of + `ERR_REQUIRE_ESM`). `commands/rspack/index.ts` now lazy-imports + `start`/`bundle` inside the command `func`s — the guard runs first, and + loading `react-native.config.js` no longer touches `@rspack/core` at all. +3. **Config generation** — `getRepackConfig`: `experiments.parallelLoader` + only under v1; `module.parser.javascript.exportsPresence: 'auto'` under v2 + (decision Q1). `checkParallelModeAvailable` in babelSwcLoader skips its + probe under v2 (the global flag no longer exists; non-parallel is a valid + choice there, not a misconfiguration). +4. **Persistent cache** — `getRspackCacheConfig` reads both the v1 + (`experiments.cache`) and v2 (top-level `cache`) locations; + `warnLegacyRspackCacheConfig` (called from `start`/`bundle` when + `isRspack2`) emits a one-time warning and leaves the config untouched — + because v2 *silently ignores* the legacy key (verified in doc 07). + (Originally implemented as `migrateLegacyRspackCacheConfig`, which + auto-copied the value; reworked to warn-only per maintainer feedback #5 — + doc 10 §5.) +5. **React Refresh** — per the doc 06 decision: `@rspack/plugin-react-refresh@1.0.0` + dependency deleted; v2 plugin added as **optional peerDependency** (`^2.0.0`); + `DevelopmentPlugin` splits on major — rspack≥2 applies the official plugin + (`injectEntry: false`, `forceEnable: true`, + `reactRefreshLoader: '@callstack/repack/react-refresh-loader'`, lazily + `require`d inside the branch since the package is ESM-only), webpack + + rspack 1 use the manual wiring pointed at client files **vendored** into + the package-root `vendor/react-refresh/` (adapted from plugin v2.0.2, + MIT, with a LICENSE/provenance file; defines swap the removed overlay + flags for `__reload_on_runtime_errors__: false`). (Originally vendored + into `src/modules/reactRefresh/`; relocated per maintainer feedback #2 — + doc 10 §2.) +6. **Tracing** — `profile-2.ts` defaults the trace layer to `'logger'` under + v2 (published v2 binaries lack perfetto, verified V9). +7. **MFv1 pre-check** — `ModuleFederationPluginV1.apply` verifies + `@module-federation/runtime-tools` is resolvable under rspack≥2 with an + actionable error (no longer auto-installed by `@rspack/core`). +8. **Types** — `packages/repack` devDeps moved to `@rspack/core@^2.1.2` + + `@swc/helpers@^0.5.23` (workspace catalog stays `^1.6.0` for everything + else). `ConfigKeys` gained `cache` and `experiments` (it genuinely + under-described what the commands read). + +## Non-obvious technical details (hard-won, do not rediscover) + +### Jest cannot load ESM-only @rspack/core — sandbox escape required +Jest's CJS module runtime cannot `require(esm)`, and **`createRequire` inside +the Jest sandbox is wrapped by Jest** — a bridge module calling +`createRequire(__filename)('@rspack/core')` loops back through +`moduleNameMapper` into itself (observed: the bridge received its own partial +exports). The working escape: a custom test environment +(`jest.environment.js`) — environments load *outside* the sandbox with Node's +real module system — preloads the core via `await import()` and exposes it as +`this.global.__RSPACK_CORE__`; `jest.rspack-core-bridge.js` (mapped via +`moduleNameMapper`) reshapes it with `__esModule: true` so Babel's import +interop keeps named imports working. Result: all suites run against the real +Rspack 2 — 280 tests (previously 234; four suites weren't even loading). + +### require(esm) interop shape +`require('@rspack/core')` under v2 returns **the callable `rspack` function +itself** with all named exports attached (`core.rspack === core`) — Rspack +uses Node's `module.exports` ESM-interop convention, so CJS consumers get a +v1-identical shape. No `__esModule` marker, no `default` export. Babel-compiled +named imports work unchanged. (`@rspack/plugin-react-refresh@2` does NOT do +this — it has a **named export only**; a default import yields `undefined`.) + +### v2 type fallout patterns +- `SwcLoaderOptions` became a **union discriminated on `detectSyntax`** — + spread-and-override helpers can't reassemble a union. Fix: local non-union + `SwcConfig` alias in `loaders/babelSwcLoader/options.ts` + (`Omit & { detectSyntax?: false; jsc?: SwcLoaderJscConfig }`). +- The raw SWC `transformSync` options type doesn't accept + `builtin:swc-loader`-only keys — `babelSwcLoader` now destructures + `rspackExperiments`/`transformImport`/`collectTypeScriptInfo`/`detectSyntax` + off before calling it (also more correct at runtime). `SwcOverrides` + excludes them too. +- Cache types are derived from source of truth: + `RspackConfiguration['cache']` + `NonNullable & { cache?: ... }` + (the intersection also defeats TS's weak-type check that plagued + structurally-typed attempts). +- TS's **weak-type check** rejects all-optional parameter types when an + argument's union members share no properties — this is why the cache + migration call lives in `start`/`bundle` (concrete `Configuration[]`), not + in `makeCompilerConfig` (inferred literal-union from `webpack-merge`). + +### Working agreement: no type casts +Maintainer preference (Daniel, 2026-07-02): avoid `as X` and especially +`as unknown as X`. Use `satisfies`, type narrowing, or fix the underlying +mismatch; where genuinely impossible, keep the cast with the full reasoning +in a comment and call it out in review. Current state: **one** irreducible +cast remains, in `commands/rspack/start.ts` — Re.Pack's `devServer` type +augmentation (`src/types/dev-server-options.d.ts`) vs Rspack 2's bundled +`DevServer` type are incompatible solely because each pulls `proxy` types from +a different copy of http-proxy-middleware; `devServer` can't be stripped there +because the dev-server flow reads it back from `compiler.options`. The genuine +fix would be aligning `@callstack/repack-dev-server`'s proxy types with +rspack's bundled ones (possible future work). `bundle.ts` avoids the cast by +rest-destructuring `devServer` off (it's not needed for bundling). + +### Misc +- The `devServer` key is *accepted* by v2 at runtime (validation is loose — + doc 07); the conflict is purely type-level. +- Repack's `type: 'javascript/auto'` on transform rules is what makes its ESM + `dist/modules/*` files bundle inside a `"type": "commonjs"` package scope — + a bare config without such a rule parses them as CJS and fails. +- Biome's `useOptionalChain` conflicts with TS narrowing on `false | DevServer`; + `typeof x === 'object' && x.hot` satisfies both. + +## Verification performed + +- `pnpm typecheck` / `build` / `test` (280/280) / biome — clean; + `turbo run build typecheck` green across all 12 workspace tasks. +- **Smoke tests of the built dist** in isolated projects (Node 26); the + script and lab setup are preserved in + [appendix-smoke-harness/](./appendix-smoke-harness/README.md): + - Rspack **1.7.12**: parallelLoader kept, no parser override, cache + accessor + migration, Node guard, full dev build with HMR + React Refresh + via the **vendored files** — all PASS. + - Rspack **2.1.2**: no parallelLoader, `exportsPresence: 'auto'`, cache + migration, Node guard, full dev build with HMR + React Refresh via the + **official v2 plugin** — all PASS. + - Lab setup notes: react-native stubbed via `resolve.alias` (RN sources + need the full flow/babel loader chain); loader resolved via + `resolveLoader.alias`; rspack-2 users of the official plugin also need + `react-refresh` installed (pnpm-strict layouts won't hoist repack's copy + into the plugin's resolution scope). +- NOT yet verified (phase 3): metro-compat / resolver-cases suites under v2, + CI matrix. (Tester apps + device HMR were manually verified 2026-07-03 — + see § On-device validation below.) + +## Reference branch updates (2026-07-02, post-feedback) + +The maintainer-feedback reworks planned in [doc 09](./09-pr-split-plan.md) / +[doc 10](./10-maintainer-feedback-evaluation.md) were applied directly to +`feat/rspack-2-support` (so porting into the stack PRs is a cherry-pick, not +a rework), plus one new discovery made while validating them: + +### Applied reworks + +- **Warn-only cache** (feedback #5, PR 4 material): + `commands/common/migrateLegacyRspackCacheConfig.ts` → + `warnLegacyRspackCacheConfig.ts`; warns once, mutates nothing; call sites + in `start.ts`/`bundle.ts` updated. Runtime-verified against the built dist + (warns exactly once, config untouched, accessor still reads the legacy + location). +- **Vendor directory** (feedback #2, PR 6 material): + `src/modules/reactRefresh/` → package-root `vendor/react-refresh/` with an + upstream LICENSE/provenance file (files are verbatim upstream v2.0.2 client + files apart from headers/formatting — diffed to confirm). Shipped as-is via + `package.json#files` (`"vendor"`); excluded from biome + (`packages/repack/vendor/**`); outside the babel `src → dist` build by + construction. The `require.resolve('../../vendor/react-refresh/*')` paths + resolve identically from `src/plugins` and `dist/plugins`. +- **PR 8 apps** (restructured 2026-07-03, maintainer decision): + **`tester-app` is the Rspack 2 example** — its manifest moved to an + interim `rspack2` named catalog, folded into the workspace **default** + catalog the same day (§ Catalog flip below): `@rspack/core@^2.1.2`, + `@swc/helpers@^0.5.23`, `@rspack/plugin-react-refresh` all `catalog:`, + plus a direct `react-refresh@^0.18.0`; **`apps/tester-app-rspack1`** is the special + case (standalone v1, § Discovery below). An interim + `apps/tester-app-rspack2` shared-src mirror (built + device-verified + 2026-07-02/03) was removed in the restructure: in-workspace, tester-app + already runs v2, so a nominally-v1 tester-app plus a v2 mirror was one + app too many and the wrong one labeled. + +### Discovery: repack's devDep shadows the project's rspack in-workspace + +First smoke run of the two tester apps showed **both** compiling with Rspack +2.1.2 — including `tester-app`, whose manifest pins `@rspack/core@^1.6.0`. +Cause: `Compiler.ts`/`bundle.ts`/`profile-*.ts` do a bare +`import { rspack } from '@rspack/core'`, which from `packages/repack/dist` +resolves repack's **own devDependency** (v2, added for types/tests) before +the app's copy — because workspace apps link repack as a symlink, so +resolution walks up from `packages/repack`. Published packages are +unaffected (`@rspack/core` is only a peer there; tarball installs have no +nested `node_modules`), but in-workspace no app manifest can pin Rspack 1. + +**Decision (Daniel, 2026-07-03): do NOT work around this in shipped code.** +A first fix (`helpers/loadRspack.ts`, resolving `@rspack/core` from the +project root and threading context through the commands) was implemented, +verified, and then **reverted** — it let monorepo layout details leak into +the published package. The shipped code keeps plain `import '@rspack/core'`; +the consequence is accepted and solved at the fixture level instead: + +- **In-workspace apps always run repack's devDep major (currently v2).** + A v1 pin in a workspace app manifest would affect only that app's own + types/`node_modules`, not what the CLI loads — which is why `tester-app` + was moved to a v2 catalog pin — now the workspace default (§ Catalog + flip) — so its manifest matches what runs, and no workspace app claims + to be a v1 surface. +- **The Rspack 1 validation surface is `apps/tester-app-rspack1`** — a + standalone app *outside* the pnpm workspace (negation glob in the root + `pnpm-workspace.yaml` + its own `pnpm-workspace.yaml` marking a separate + workspace root), with its own `node_modules` and repack installed from a + **packed tarball** (`pnpm run pack-repack` → `file:./callstack-repack.tgz`) + so resolution behaves exactly like a real user project. Minimal own src + (async local chunk + HMR target; not shared with tester-app — sharing src + across the workspace boundary would load two copies of react). See its + README. +- The dual-major **unit** lane (`pnpm test:rspack1`) is unaffected — the + Jest environment explicitly loads the aliased `@rspack/core-v1`. + +### Correction (2026-07-03): the dual-major unit lane didn't exist until now + +Earlier notes in this doc claimed "280/280 under both majors" via +`RSPACK_MAJOR=1 pnpm test`. **That claim was wrong**: `jest.environment.js` +unconditionally imported `@rspack/core` (v2) and no `@rspack/core-v1` alias +or `test:rspack1` script existed — the env var was silently ignored, so both +runs tested v2. (Caught by an external review of the docs, 2026-07-03.) + +The lane described in doc 09 (PR 2 § testing) is now **implemented on the +reference branch**: aliased devDep `"@rspack/core-v1": "npm:@rspack/core@^1.7.12"`, +`jest.environment.js` parameterized on `RSPACK_MAJOR` (v1 via plain +`require` — CJS, outside the sandbox; v2 via `await import`), exposed +`__RSPACK_MAJOR__` global, and `"test:rspack1": "cross-env RSPACK_MAJOR=1 jest"` +(cross-env for Windows shells, per the doc 09 note). A permanent guard test +(`src/__tests__/rspackTestLane.test.ts`) asserts the loaded core's major +matches the requested lane, so a silently-unwired lane can't pass again. +Verified for real: **281/281 under v2 and under v1 (1.7.12)** — including +the plugin suites that run actual compilations (OutputPlugin, CodeSigning, +MFv2). No test needed `__RSPACK_MAJOR__` gating yet: the suite's +version-detection paths resolve repack's own devDep (v2) in-workspace either +way (see § Discovery), so the v1 lane's coverage is the real v1 **core +object/compilation surface**, not version-routing logic. + +### Verification (2026-07-02/03, after the revert where relevant) + +- `pnpm build` / `typecheck` / biome clean; `pnpm test` and + `pnpm test:rspack1`: **281/281 under both majors** — see the correction + below on when the v1 lane became real. +- `tester-app-rspack1` (standalone, tarball install): `bundle:android` and + `bundle:ios` print "(Rspack **1.7.12**) compiled successfully"; dev bundle + contains the **vendored** refresh runtime and zero official-plugin refs. +- `tester-app` (manifested on the v2 catalog, now the default): `bundle:android` + / `bundle:ios` → "(Rspack **2.1.2**) compiled successfully" incl. + local/remote chunks + assets; dev bundle contains the **official + plugin's** refresh runtime and zero vendored refs; its vitest suite + passes (12/12). +- Appendix smoke-harness assertions updated to warn-only (2b) and the new + vendored path (4b). + +## On-device validation (2026-07-03, agent-device) + +Run on real targets — Android: **Pixel 7 (physical device)**; iOS: +**iPhone 17 simulator**. Final state after the 2026-07-03 restructure +(tester-app = v2 example, standalone tester-app-rspack1 = v1 lane); all with +clean shipped code (post-`loadRspack`-revert): + +- **`tester-app` (Rspack 2.1.2, official refresh plugin), both platforms**, + including the interactive flows (not just passive rendering): + - all six sections render; async local chunk auto-loads; + - **Remote chunks**: "Prefetch chunk" → button flips to "Prefetched", + "Load chunk" → "Remote: this text comes from remote chunk"; + - **Mini-apps**: Install (chunk fetch) → Show → "MiniApp: this text comes + from MiniApp" + its embedded PNG renders → Hide/Remove + (`invalidateScripts`) re-enables Install; + - **Assets test incl. the remote asset**: with + `pnpm serve-remote-assets:` running (http-server :9999 over + `build/output//remote`, populated by `bundle:`; + plus `adb reverse tcp:9999 tcp:9999` on Android), all three frames + (local / inline / remote) render — the :9999 access log shows the + device fetching `remote-assets/.../webpack@3x.png`. **Without that + server the remote frame is blank** — that is environment setup, not a + Re.Pack regression; + - live React Refresh edit+revert; Reanimated + NativeWind sections render. +- **`tester-app-rspack1` (standalone, Rspack 1.7.12, vendored refresh + runtime), both platforms**: boot, async local chunk auto-loads, live + React Refresh edit+revert. + +Notes: the only in-app console warning anywhere was RN's own `SafeAreaView` +deprecation (pre-existing, unrelated). The removed interim +`tester-app-rspack2` mirror had also passed the same checks minus the +button-driven flows before its removal. + +Practical notes for re-running (also apply to CI/e2e follow-up): +- RNTA's gradle **requires** a `resources` section in `app.json` (crashes + with `containsKey() on null` without one) — chunk filenames in it are + path-derived, so apps with different roots get different names (e.g. + `tester-app-rspack1` uses `src_Async_local_tsx.chunk.bundle`). +- The RN CLI's wrapped `pod install` step is flaky when the `resources` + files don't exist yet; `pnpm bundle:ios` once (or manual + `bundle exec pod install`) unblocks it. `RBENV_VERSION` may need overriding + (tester-app pins `.ruby-version` 2.7.6, which isn't installed) and + CocoaPods needs a UTF-8 locale in non-interactive shells. +- Android: the app's main bundle comes from device `localhost:8081` + (`adb reverse tcp:8081 tcp:`); chunks use the + `__PUBLIC_PORT__` baked into the bundle (repack auto-reverses that port). + iOS simulator: `xcrun simctl spawn booted defaults write + RCT_jsLocation "127.0.0.1:"` before relaunch. +- `tester-app-rspack1` setup: `pnpm run pack-repack && pnpm install` in the + app dir (re-run both after changing `packages/repack` — the tarball is a + snapshot). Its copied Android shell needed tester-app's + async-storage-specific maven block removed from `build.gradle`. + +## Catalog flip: workspace default is Rspack 2 (2026-07-03) + +Decided with the maintainer after the per-major tester-app restructure. The +default pnpm catalog previously pinned `@rspack/core: ^1.6.0`, but those v1 +pins were cosmetic for anything compiled through repack: every workspace +consumer already ran 2.1.2 via repack's devDep (§ Discovery above). The +workspace now says what it runs: + +- Default catalog: `@rspack/core: ^2.1.2`, `@rspack/plugin-react-refresh: + ^2.0.2`, `@swc/helpers: ^0.5.23`. The named `rspack2` catalog is deleted; + `tester-app` pins plain `catalog:` again (no longer the odd one out), and + both federation apps declare the refresh plugin like any real v2 app. +- The Rspack 1 surfaces are unchanged and explicit: the standalone + `apps/tester-app-rspack1` lab and the `pnpm test:rspack1` jest lane. + +### Findings: first true-v2 run of tests/integration's rspack lane + +`tests/integration` imported `@rspack/core` directly (not through repack), +so its rspack lane was the one workspace surface genuinely on v1 until the +flip. Running it on 2.1.2 surfaced three **output-format** changes (no +behavioral regressions — useful for anyone post-processing bundles): + +1. **Custom runtime-module banners** lost the `webpack/runtime/` prefix: + `// webpack/runtime/repack/polyfills` (v1/webpack) is `// repack/polyfills` + under v2. Built-in and MF-plugin runtime modules keep the prefix + (`// webpack/runtime/embed_federation_runtime`). +2. **Unminified module factories** use shorthand method syntax under v2 + (`721() { ... },`) instead of `721: (function (...) { ... }),`. +3. **Runtime-module order vs MFv2's `embed_federation_runtime` flipped**: + polyfills now precede the embed wrapper in the runtime section. The + invariant Re.Pack cares about — polyfills execute before + `__webpack_require__.x()` is invoked — holds under both majors (verified + by inspecting the emitted bundle end-to-end). + +Test-side fixes in `NativeEntryPlugin.test.ts`: version-agnostic +`repack/polyfills` marker, an added Rspack-2 module-factory regex in +`extractModuleIdByMarker`, the MFv2 order assertion reduced to the real +invariant, and rspack-lane snapshots regenerated under 2.1.2 (webpack-lane +snapshots changed only by the marker offset). All 58 tests pass in both +lanes; the semantic assertions (polyfill/startup ordering, runtime require +ids aligned with production module ids) now genuinely verify v2. + +### Revalidation after the flip (2026-07-03) + +Full sweep, all green: build/typecheck/lint; `turbo run typecheck test +--force` (17/17 incl. integration, metro-compat, resolver-cases, tester-app +bundle tests on 2.1.2 + webpack); `test:rspack1` 281/281; +`tester-federation` host+mini bundles on both platforms under Rspack 2.1.2 +and the `USE_WEBPACK` lane; `tester-federation-v2` host+mini bundles on both +platforms (container + `mf-manifest.json` emitted) plus a dev-server smoke +(host bundle, mini container, and manifest all served 200). The standalone +lab is outside the workspace and unaffected by catalogs; it was validated +the same day (release bundles on 1.7.12, dev bundle served with the +vendored refresh runtime). + +### CI snapshot portability (2026-07-03, post-flip) + +The first CI runs after the catalog flip failed on rspack-lane +`NativeEntryPlugin` snapshots for two reasons that never reproduce in a +default local run — both fixed in `normalizeBundle` +(`tests/integration/src/plugins/NativeEntryPlugin.test.ts`), no product code +involved: + +1. **ANSI color codes** (`926ff298`): Rspack 2 colorizes the diagnostics it + inlines into error-stub modules when the environment enables color (CI + does). The codes reach the bundle as escaped text (backslash-u001b + SGR) + inside the stub's string literal. Reproduce locally with `FORCE_COLOR=3`; + normalizeBundle strips both the raw and string-escaped forms. +2. **Machine-specific absolute paths** (`55b6739e`): for + `@module-federation/enhanced` 0.15.x/0.21.x under Rspack 2, + `embed_federation_runtime` inlines a `data:` URI module whose URL-encoded + source embeds the absolute path to `webpack-bundler-runtime` + (`%2FUsers%2F...` locally vs `%2Fhome%2Frunner%2F...` on CI). + normalizeBundle now also rewrites the `encodeURIComponent` form of the + repo root; the snapshot files contain no machine paths (grep-verified). + +Rule of thumb this establishes: **regenerate rspack-lane snapshots with +`FORCE_COLOR=3` locally at least once before pushing** — it surfaces the +env-dependent class locally. diff --git a/agent_context/rspackv2-jul2026/09-pr-split-plan.md b/agent_context/rspackv2-jul2026/09-pr-split-plan.md new file mode 100644 index 000000000..e25adfce4 --- /dev/null +++ b/agent_context/rspackv2-jul2026/09-pr-split-plan.md @@ -0,0 +1,456 @@ +# PR Split Plan & Where We Left Off + +> **STATUS / WHERE WE LEFT OFF (updated 2026-07-03):** All research, +> decisions, implementation (plan phases 0–2), feedback reworks, per-major +> tester apps, the default-catalog flip, and verification are complete, +> **committed, and pushed** on `feat/rspack-2-support` (`d0ea05d6..604392c8`; +> commit map in [doc 08](./08-implementation-notes.md)). CI on the branch is +> **green** (TypeScript, Tests, Lint). The next step is executing the split +> below. **The split has not been executed yet.** +> +> **Plan restructured 2026-07-02 (same day, after maintainer feedback) for +> parallel execution** — see "Why this structure" for the conflict analysis +> that drove it. The stack is now: docs + one foundations PR, then four +> mutually conflict-free PRs that can be authored/reviewed/merged in any +> order, then a closer PR and an Rspack 2 tester app (PR 8, decided +> 2026-07-02). +> +> **Reference branch updated 2026-07-02/03:** the feedback reworks are now +> **applied on `feat/rspack-2-support` itself** — warn-only cache (feedback +> #5), vendor-directory relocation (feedback #2), plus the PR 8 apps: +> **`tester-app` is now the Rspack 2 example** (on the workspace default +> catalog, which is Rspack 2 since the 2026-07-03 flip — doc 08 § Catalog +> flip) and **`apps/tester-app-rspack1`** is the special case — a +> standalone app outside the workspace, v1 via tarball-installed repack. A +> `loadRspack` project-context loading fix was implemented and then +> **reverted by decision (2026-07-03)** — shipped code must not carry +> monorepo-aware resolution workarounds; the standalone app solves the same +> problem at the fixture level. Details in +> [doc 08 § Reference branch updates](./08-implementation-notes.md); porting +> these pieces into their stack PRs is now a cherry-pick, not a rework. +> +> Branch strategy (agreed): `feat/rspack-2-support` stays as a **reference +> version** — kept locally and on the remote. Draft PR +> [#1393](https://github.com/callstack/repack/pull/1393) will be **closed +> (not merged)** once the stack PRs are open, and referenced from them. +> +> Maintainer feedback on #1393 is recorded below (distilled to the substance) +> and must be incorporated while building the stack. + +## Maintainer feedback on #1393 (2026-07-02) + +Overall verdict: *"PR looks mostly good / overally looks sensible"*, split into +~5 PRs confirmed as the right approach (everything must stay backwards +compatible — not aiming for a 6.0). Specific points, each mapped to an action +(PR references use the restructured numbering below). **Each point is +evaluated in depth — understanding, validity, implementation revision with +code examples — in [doc 10](./10-maintainer-feedback-evaluation.md).** + +1. **Vendoring the React Refresh client files is fine.** + `deprecated_runtimePaths` was originally used just for ease of use — no + attachment to it. ✅ validates the doc 06 decision. +2. **BUT keep vendored code out of main `src/`** — put it in a dedicated + `vendor` directory instead of `src/modules/reactRefresh/`. + → **Action (PR 6 — React Refresh):** relocate the vendored files (note: + `vendor/` outside `src/` ships as-is rather than through babel — the files + are plain JS, so add the dir to `package.json#files` and point the manual + wiring at it; or use `src/vendor/` if build-processing is preferred — + decide during PR 6). +3. **Revisit the React Refresh / DevelopmentPlugin changes and minimize their + footprint.** `DevelopmentPlugin` is used by BOTH rspack and webpack — test + both paths. The expectation is that little actually *needed* to change + beyond cleaning up deprecated usage; splitting the plugin per-bundler was + floated as an option if the refresh plugin diverged that much. + → **Action (PR 6 — React Refresh):** re-examine how small the diff can be; + explicitly test the webpack path; consider (but don't default to) a + per-bundler split. +4. **`start.ts` changes are further deviation from webpack** — the rspack and + webpack command paths should ultimately be bridged to avoid maintaining + the same thing twice. + → **Action (PRs 2 and 4 — the two that touch `start.ts`):** keep + `start.ts` diffs minimal; where a change is needed (Node guard, lazy + loading, cache handling), either mirror the same approach in the webpack + commands or structure it as shared code. +5. **Don't auto-migrate the user's cache config.** If a user bumps rspack, + *they* should migrate their config. It's fine to **silently set newer + options when the project doesn't configure caching at all** (we know which + rspack version is targeted). + → **DECISION OVERRIDE (2026-07-02):** replaces the earlier "honor the + legacy value by copying it over" decision (docs 03 §1.2 / 08). New + behavior for PR 4 (cache): when v2 + `experiments.cache` is set, **warn + only** (clear message pointing at top-level `cache`) — do not copy the + value. +6. **`parallelLoader` was always per-rule** — the experiments flag was just + the global toggle, and in Rspack 2 parallel loading is **enabled by + default**. + → **Action (PR 3 — config routing):** verify against upstream (our docs + assumed per-rule opt-in remained); if parallel is default-on under v2, our + loader's parallel-mode warning is fully obsolete there (current code + already skips it under v2 — confirm that's the right call) and docs 01/02 + need a small correction. +7. **The ESM `require` flow needs testing on Windows** — including monorepo + setups and the super-app showcase. + → **New verification item (PR 2 — foundations):** Windows smoke pass for + the require(esm) loading path and path handling in the version helpers. +8. **MFv1 changes look good.** ✅ no action. + +## Why this structure (decision, 2026-07-02) + +The original stack (docs → foundations → types → config routing → React +Refresh) serialized on the "compile against Rspack 2 types" PR: mapping each +planned PR onto the actual files changed on `feat/rspack-2-support` showed it +conflicted with **both** downstream PRs, on top of the logical dependency +(the cache types don't compile against v1-only types): + +| Overlap | Colliding PRs (old numbering) | Cause | +| --- | --- | --- | +| `start.ts`, `bundle.ts` | types ↔ config routing | devServer type handling vs. cache-warning call sites | +| `loaders/babelSwcLoader/*` | types ↔ config routing | `SwcConfig` alias / transformSync split vs. parallel-probe change | +| `package.json` + `pnpm-lock.yaml` | types ↔ React Refresh | `@rspack/core@^2` devDep bump vs. react-refresh dependency change | + +Everything in the types PR is **behavior-neutral** (type fallout, devDep +bump, Jest infrastructure, cache accessor) — the same review theme as the +foundations PR ("zero runtime change for existing users"). Folding it into +foundations removes every conflict and every inter-PR dependency in one move. +Cost: a chunkier foundations PR (~15 files + lockfile), all mechanical, and +all already reviewed as part of #1393. + +The four PRs that follow were re-checked pairwise against the branch diff: +**no shared files** (the cache PR is the only one touching `start.ts`/ +`bundle.ts`; React Refresh is the only one touching `package.json`; +changesets get uniquely-named files per PR). + +## The stack + +Each PR is independently green: typecheck, build, `pnpm test` under **both +majors** (see testing strategy below), biome — plus the per-PR verification +noted inline. + +### Sequential prefix + +#### PR 1 — Rspack 2 adoption plan (documentation) +- Introduces `agent_context/` (convention + `README.md` index, `AGENTS.md` + pointer) and `agent_context/rspackv2-jul2026/` with all documents 01–09 and + the [smoke-harness appendix](./appendix-smoke-harness/README.md). +- No code changes. Title: "docs: rspack 2 adoption plan". +- **Fully independent** — can be opened immediately and merged at any point; + it is "first" only in spirit. + +#### PR 2 — Foundations (the single blocking PR) +Absorbs the old "types" PR; theme: *Re.Pack builds and tests green against +Rspack 2 with zero runtime behavior change for Rspack 1 / webpack users.* +- `helpers/rspackVersion.ts` (+ helpers index export) +- `commands/rspack/ensureNodeCompat.ts` + lazy command loading in + `commands/rspack/index.ts` +- Note: `@rspack/core` is loaded with a plain import — **no project-context + resolution** (a `loadRspack` workaround was implemented and reverted by + decision 2026-07-03; the in-workspace devDep-shadowing consequence and the + standalone-app answer are documented in doc 08 § Discovery) +- `profile/index.ts` refactor onto the version helper +- `packages/repack` devDeps: `@rspack/core@^2.1.2`, `@swc/helpers@^0.5.23` + (workspace catalog stays v1) +- Type fallout: `SwcConfig` alias, transformSync loader-only-options split, + `bundle.ts` devServer destructure, the single documented cast in `start.ts`, + `RepackTargetPlugin` devServer narrowing, `ConfigKeys` additions +- `getRspackCacheConfig` + derived cache types (the accessor is + behavior-neutral; the *warning* that uses it lands in PR 4 — cross-link) +- Jest custom environment + bridge, **extended to dual-major** (see testing + strategy) + CI lane running the unit suite under Rspack 1 +- Verification per maintainer feedback #7: **Windows** smoke pass of the + require(esm) loading path — standalone project, pnpm monorepo, and + super-app-showcase — plus a `windows-latest` CI lane running the unit suite + under both majors (specifics in [doc 10 §7](./10-maintainer-feedback-evaluation.md)) +- Patch changeset at most (friendlier Node error is the only user-visible + change). + +### Parallel set — branch each from `main` after PR 2 merges + +No ordering between these four; no shared files; author/review/merge in any +order. Each carries its own uniquely-named changeset (patch-level where +user-visible). + +#### PR 3 — Config routing +- `getRepackConfig`: `parallelLoader` gating + `exportsPresence: 'auto'` +- Version-aware parallel-mode warning probe in babelSwcLoader — the upstream + verification of feedback #6 is **done** (2026-07-02, [doc 10 §6](./10-maintainer-feedback-evaluation.md)): + per-rule opt-in still required under v2, only the global flag is gone; the + gating ships as-is, and docs 01/02 are already corrected +- `profile-2.ts` (logger trace layer default under v2) + `profile/index.ts` + wiring +- Files: `commands/common/config/getRepackConfig.ts`, + `loaders/babelSwcLoader/*` (probe only), `commands/rspack/profile/*` + +#### PR 4 — Legacy cache config warning +- **Warn-only** per maintainer feedback #5 — **applied on the reference + branch 2026-07-02**: `migrateLegacyRspackCacheConfig` (auto-migrate) is now + `warnLegacyRspackCacheConfig` — under v2 with `experiments.cache` set, it + emits a one-time actionable warning pointing at top-level `cache` and + leaves the config untouched; porting is a straight cherry-pick +- Call sites in `start.ts` / `bundle.ts` — keep diffs minimal / mirrored in + webpack commands (feedback #4) +- Files: `commands/common/warnLegacyRspackCacheConfig.ts` (renamed from + `migrateLegacyRspackCacheConfig.ts`), `commands/common/index.ts`, + `commands/rspack/start.ts`, `commands/rspack/bundle.ts` + +#### PR 5 — MFv1 runtime-tools pre-check +- `ModuleFederationPluginV1.apply` verifies + `@module-federation/runtime-tools` is resolvable under rspack≥2 with an + actionable error (maintainer-approved, feedback #8) +- Files: `plugins/ModuleFederationPluginV1.ts` only — the smallest PR. + +#### PR 6 — React Refresh restructure +- Vendored client files — relocated to a dedicated **vendor directory** + (feedback #2) — **applied on the reference branch 2026-07-02**: + package-root `packages/repack/vendor/react-refresh/` with an upstream + LICENSE/provenance file, shipped as-is via `package.json#files`, excluded + from biome; `DevelopmentPlugin` major split; + `@rspack/plugin-react-refresh@1.0.0` dependency → `^2` optional peer +- Footprint approach decided ([doc 10 §3](./10-maintainer-feedback-evaluation.md), + feedback #3): keep `setupManualReactRefresh` byte-equivalent to the old + inline wiring except the three enumerated deltas (runtime-file source, + define-flag swap, `include:` → `test:`), so the diff reads as a move; no + per-bundler plugin split; explicitly test the **webpack** path (tester-app + `webpack-start` HMR) alongside both rspack majors +- The riskiest PR for dev experience; needs its own manual HMR pass (both + majors + webpack) +- Files: `plugins/DevelopmentPlugin.ts`, vendored files, `package.json`, + lockfile + +### Closer + +#### PR 7 — Dual-major smoke suite + headline changeset +- Formalize the [appendix smoke harness](./appendix-smoke-harness/README.md) + into a committed suite (e.g. `tests/rspack-compat/`, following the existing + `tests/*` conventions) that builds the repack dist and asserts the full + behavior matrix under **both** `1.7.12` and `2.1.2`: config routing, cache + warning (update assertion 2b to warn-only), Node guard, dev build with + HMR + React Refresh from the correct source per major +- CI wiring for the smoke lane +- Carries the headline **minor changeset** ("Rspack 2 support") — solves the + old "goes on whichever merges last" problem, since with parallel merging + that's unpredictable; the feature is also genuinely not "shipped" until + everything above is in +- Depends on PRs 3–6 (it asserts their behavior), which is fine: it's the + fan-in. + +#### PR 8 — per-major tester apps (restructured 2026-07-03; implemented on the reference branch) +Both majors get an app-level validation surface for the whole dual-support +window: + +- **`apps/tester-app` becomes the Rspack 2 example** (maintainer decision + 2026-07-03). In-workspace it already *runs* repack's devDep major (v2, see + doc 08 § Discovery) — this just makes the manifest honest: `@rspack/core` + + `@swc/helpers` pin the workspace **default catalog** (Rspack 2 since the + 2026-07-03 flip; an interim `rspack2` named catalog existed for a few + hours and was folded into the default same day), and it gains + `@rspack/plugin-react-refresh: catalog:` plus a direct + `react-refresh@^0.18.0` (pnpm-strict layouts don't hoist repack's copy + into the official plugin's scope — doc 08 lab note). No other changes — + full feature surface (assets matrix incl. remote, async/remote chunks, + mini-apps, nativewind, reanimated, webpack lane) stays where it always + was. Known cosmetic wart: `postcss-loader@8` declares peer + `@rspack/core@"0.x || 1.x"` → one unmet-peer install warning. +- **`apps/tester-app-rspack1` is the special case** — a **standalone** app + on Rspack 1, *outside* the workspace (negation glob + own + `pnpm-workspace.yaml`) with its own `node_modules` and repack installed + from a packed tarball (`pnpm run pack-repack`). Required because + in-workspace, repack's `@rspack/core@^2` devDep shadows any app's v1 pin — + and the shipped code deliberately carries no monorepo-aware resolution + workaround (`loadRspack` reverted by decision, 2026-07-03). Minimal own + src (async local chunk + HMR target), not shared with tester-app (a + shared src would resolve two copies of react across the workspace + boundary). + +An interim shape (a third app, `tester-app-rspack2`, as a shared-src +workspace mirror with tester-app staying nominally on v1) was built, +device-verified, and **removed the same day** — in-workspace no app can +genuinely run v1, so "tester-app stays on v1" was illusory and the mirror +was redundant with tester-app itself. + +Other notes: +- The **default catalog** in `pnpm-workspace.yaml` carries + `@rspack/core: ^2.1.2`, `@swc/helpers: ^0.5.23`, + `@rspack/plugin-react-refresh: ^2.0.2` (flipped 2026-07-03 — doc 08 + § Catalog flip; the earlier plan kept the default on v1 until phase 3, + but the v1 default was cosmetic given devDep shadowing). Porting note: + this workspace change ships together with the integration-test v2 fixes + (see § Mechanics). +- Node floor is a non-issue: the monorepo already requires Node ≥24. +- No CI wiring — tester apps are a manual validation surface; device e2e + stays in the follow-up. No changeset (private apps). +- Sequencing: branch after PRs 2/3/6 are merged (before the React Refresh + PR, tester-app cannot run dev mode under v2 by design). Can proceed in + parallel with PR 7 — the only shared file is the lockfile. +- Lifecycle: tester-app is already the v2 primary; `tester-app-rspack1` + retires when Rspack 1 support ends at the next major. + +### Follow-up — workspace adoption (phase 3, separate effort) + +> ✅ **Partially executed early (2026-07-03, reference branch):** the +> default pnpm catalog was flipped to `@rspack/core@^2.1.2` (the named +> `rspack2` catalog is gone; tester-app pins plain `catalog:` again and both +> federation apps declare `@rspack/plugin-react-refresh`). Rationale: the +> v1 default was cosmetic — every workspace consumer already *ran* 2.1.2 +> via repack's devDep (doc 08 § Discovery), so manifests now match reality. +> The flip surfaced the first true-v2 run of `tests/integration`'s rspack +> lane; findings and test fixes in doc 08 § Catalog flip. Remaining +> phase-3 items below still stand. + +- CI matrix lanes (Node 18/20 = v1-only), + metro-compat + resolver-cases sweeps, device HMR e2e — run against **both** + tester apps now that each major has one (the earlier "bump tester-app to + v2" item is superseded by PR 8) +- **Module Federation validation** (doc 03 §2.3, amended 2026-07-03): + establish/document the supported `@module-federation/enhanced` range per + major; run `tester-federation` / `tester-federation-v2` — which + in-workspace covers **v2 only** (devDep shadowing, doc 08 § Discovery). + True-v1 federation coverage needs a standalone lab following the + `tester-app-rspack1` tarball-install pattern (+ enhanced); the stack + itself ships only PR 5's runtime-tools pre-check for MFv1 under v2. +- Per the agent_context lifecycle this is follow-up work → **new dated + folder** (e.g. `rspackv2-adoption-/`) linking back here. +- Also parked for later (phase 4, decided): flipping `repack-init`/templates/ + website defaults to Rspack 2, website migration guide. (tester-app is + already the v2 example as of PR 8's 2026-07-03 restructure; + `tester-app-rspack1` retires when v1 support ends.) + +## Testing both majors (added 2026-07-02) + +Three layers; the first two are what the stack itself must provide. + +### 1. Unit tests under both majors (PR 2) + +> **Implemented on the reference branch 2026-07-03** exactly as specced +> below (cross-env chosen for the script; plus a guard test, +> `src/__tests__/rspackTestLane.test.ts`, asserting the loaded major matches +> the requested lane — added after an external doc review caught that the +> lane had been *described as verified before it existed*; see doc 08 +> § Correction). 281/281 green under both majors. Remaining PR 2 work: the +> CI lane. + +The custom Jest environment already loads the real `@rspack/core` outside the +sandbox (doc 08). Parameterize it on an env var instead of hard-coding v2: + +- Add an aliased devDep to `packages/repack`: + `"@rspack/core-v1": "npm:@rspack/core@^1.7.12"` (plain version, not the + workspace catalog). +- `jest.environment.js` picks by `process.env.RSPACK_MAJOR` (default `2`): + v2 via `await import('@rspack/core')` as today; v1 via plain + `require('@rspack/core-v1')` — the environment runs outside the Jest + sandbox with Node's real module system, and using `require` for the CJS v1 + package sidesteps any reliance on cjs-module-lexer named-export synthesis. + The existing bridge (`__esModule: true` + spread) serves both shapes + unchanged. +- Expose `this.global.__RSPACK_MAJOR__` so tests can gate major-specific + assertions (e.g. `exportsPresence` expectations in `getRepackConfig` + tests). +- Scripts: keep `"test": "jest"` (v2) and add + `"test:rspack1": "RSPACK_MAJOR=1 jest"` (use `cross-env` if the script + must also run on Windows shells — decide in PR 2 alongside the feedback #7 + Windows pass). +- PR 2 must bring the suite green under v1 (done on the reference branch — + 281 tests incl. the lane guard) and add a CI lane for it. + +Caveats, recorded so they don't surprise: **types are always v2** — the +`@rspack/core` devDep stays at `^2`, so type-only imports check against v2 +while the runtime object under `RSPACK_MAJOR=1` is v1; that's the intended +shape (source must *compile* against v2, *run* against both). And the aliased +package means two rspack binaries in `node_modules` — dev-machine disk, not a +publish concern (devDep only). + +**Per-PR requirement for PRs 3–6:** run `pnpm test` **and** +`pnpm test:rspack1`; any test asserting major-divergent behavior must +gate on the exposed major rather than assuming v2. Note the lane's honest +scope: in-workspace, version *detection* still resolves repack's own v2 +devDep, so the v1 lane exercises the real v1 core object and compilations, +not version-routing logic (doc 08 § Correction). + +### 2. Built-dist smoke tests under both majors (PR 7) + +Unit tests exercise sources through the Jest/Babel pipeline; the failure +modes that bit during implementation (require(esm) interop, loader +resolution, refresh runtime source selection) only reproduce against the +**built dist** in a real project layout. That's the appendix harness, +formalized: two lab fixtures (v1: `@rspack/core@^1.7.12`; v2: `@rspack/core@ +^2.1.2` + `@rspack/plugin-react-refresh@^2` + `react-refresh` + +`@swc/helpers`), one assertion script that auto-detects the installed major. +Setup notes and the exact manifests are in the +[appendix README](./appendix-smoke-harness/README.md). + +### 3. App-level manual validation (PR 8) + workspace/e2e (follow-up) + +PR 8 gives each major its own tester app — `tester-app` (workspace, v2, +the full feature surface: dev server, HMR/React Refresh via the official +plugin, async/remote chunks + mini-apps, assets matrix incl. remote, +nativewind/reanimated plugin paths) and `tester-app-rspack1` (standalone +outside the workspace, v1 via tarball-installed repack: dev server, HMR +through the vendored runtime, async local chunks; minimal own src). The v1 +app must be standalone because in-workspace apps always run repack's devDep +major (doc 08 § Discovery). Automated device HMR e2e, metro-compat / +resolver-cases sweeps under v2, and the full CI Node-version matrix belong +to the workspace-adoption follow-up folder — they test *adoption*, not the +dual-support contract itself. + +## Mechanics for executing the split + +- PR 1's branch cuts from `main` immediately. PR 2's branch cuts from `main`; + materialize its file set via `git checkout feat/rspack-2-support -- ` + (the dual-major Jest parameterization is on the reference branch as of + 2026-07-03 — cherry-pick, no longer new work). +- **PRs 3–6 branch from `main` only after PR 2 merges** — not from PR 2's + branch — so nothing needs retargeting/rebasing and the parallel set stays + coordination-free. PRs 7 and 8 branch from `main` after PRs 3–6 are in + (they may run in parallel with each other; only the lockfile overlaps). +- Deltas from the reference branch, status as of 2026-07-02: cache + **warn-only** rework (PR 4, feedback #5) — **applied on the branch**; + vendor-directory relocation (PR 6, feedback #2) — **applied on the + branch**; parallel-default verification (PR 3, feedback #6) — **done** + (doc 10 §6). Remaining porting-time delta: the DevelopmentPlugin + footprint check via `git diff --color-moved` against pre-branch `main` + (PR 6, feedback #3). The branch also gained the two PR 8 tester apps; + a `loadRspack` project-context loader was implemented and **reverted** + (2026-07-03 decision — no monorepo workarounds in shipped code). +- **Catalog flip + integration-test v2 fixes travel together** (2026-07-03, + commits `41cc2d30`/`926ff298`/`55b6739e`): the default-catalog flip is what + puts the workspace integration rspack lane on v2, and the + `NativeEntryPlugin.test.ts` changes (version-agnostic markers, Rspack 2 + module-factory regex, ANSI + URL-encoded-path normalization in + normalizeBundle, regenerated rspack-lane snapshots) are required for it to + be green — port them in the same PR (fits PR 8 or the workspace-adoption + slice). When regenerating rspack-lane snapshots, run once with + `FORCE_COLOR=3` locally to surface env-dependent output before CI does + (doc 08 § CI snapshot portability). +- Re-run per branch: `pnpm turbo run typecheck test --force` at the root, + `pnpm test:rspack1` in `packages/repack` (the v1 jest lane), `pnpm lint:ci`. + For app-level checks: `pnpm bundle` in `apps/tester-federation` (plus the + `USE_WEBPACK=1` lane) and `pnpm run pack-repack && pnpm install && + pnpm bundle:ios bundle:android` in `apps/tester-app-rspack1`. +- Changesets: uniquely-named file per PR (no conflicts); patch-level on PRs + 2–5 where user-visible, the headline minor ("Rspack 2 support") on PR 7. + The reference branch's single `.changeset/rspack-2-support.md` gets split + accordingly. +- After all stack PRs are open: close #1393 with a comment linking the stack + and this folder. + +## Context for a fresh start (read this first) + +Reading order for picking this effort up without prior context: + +1. [README.md](./README.md) — index + TL;DR +2. [09 (this doc)](./09-pr-split-plan.md) — current state + next actions +3. [08-implementation-notes.md](./08-implementation-notes.md) — what's on the + reference branch and the technical landmines +4. Docs 01–07 as needed for the *why* behind any specific change + +Key working agreements captured along the way: +- **No type casts** (`as X` / `as unknown as X`) — use `satisfies`, narrowing, + or fix the root cause; irreducible cases get a full reasoning comment and a + review call-out (details in doc 08). +- **No monorepo leaks in shipped code** (Daniel, 2026-07-03) — published + package code must behave like any normal package (plain imports, no + workspace-aware resolution); workspace-only testing problems get solved at + the fixture level (standalone apps, tarball installs — see doc 08 + § Discovery and `apps/tester-app-rspack1`), never in `src/`. +- Decisions get recorded inline in these docs with dates (see docs 04/06). +- `agent_context/` lifecycle: living while in flight, settled once merged — + follow-ups get a new dated folder. diff --git a/agent_context/rspackv2-jul2026/10-maintainer-feedback-evaluation.md b/agent_context/rspackv2-jul2026/10-maintainer-feedback-evaluation.md new file mode 100644 index 000000000..3d285a724 --- /dev/null +++ b/agent_context/rspackv2-jul2026/10-maintainer-feedback-evaluation.md @@ -0,0 +1,394 @@ +# Maintainer Feedback Evaluation & Implementation Revision + +Point-by-point evaluation of the maintainer feedback on +[#1393](https://github.com/callstack/repack/pull/1393) (recorded verbatim-ish +in [doc 09](./09-pr-split-plan.md)): what each point means, how valid it is +against the code and upstream sources, and exactly how the plan/implementation +changes in response. Written 2026-07-02. + +Legend for the validity verdict: **✅ valid** (adopt as-is), **✅ valid with +nuance** (adopt, with a caveat recorded), **⚠️ partially correct** (the +underlying concern is right but a factual detail isn't). + +--- + +## #1 — Vendoring the React Refresh client files is fine + +**Feedback.** `deprecated_runtimePaths` was originally used just for ease of +use — no attachment to it. + +**Understanding.** The maintainer confirms the doc 06 finding: Re.Pack's use +of `ReactRefreshPlugin.deprecated_runtimePaths` was a convenience (getting +paths to the plugin's client runtime files without wiring them manually), not +a load-bearing design choice. Replacing it with vendored copies of those +files is acceptable. + +**Validity: ✅ valid.** Matches the upstream history — the accessor existed +for integrators and was removed in `@rspack/plugin-react-refresh@2` +(doc 06). No revision needed; this de-risks the riskiest decision. + +**Empirical verification (2026-07-03).** Probed with a thread-id-reporting +loader (worker_threads) against both real majors, `experiments.parallelLoader` +unset unless stated: + +| @rspack/core | `use[].parallel` | `experiments.parallelLoader` | loader ran in | +| --- | --- | --- | --- | +| 2.1.2 | true | *(removed)* | **worker thread** | +| 2.1.2 | false | *(removed)* | main thread | +| 1.7.12 | true | not set | main thread (silently serial) | +| 1.7.12 | true | true | **worker thread** | + +Confirms the shipped gating exactly: v1 needs both flags (so +`getRepackConfig` keeps emitting the global one), v2 honors the per-rule +flag alone (so emitting nothing is correct and users keep parallel loading +with no config change). + +**Plan impact.** None (confirmation). The considered-and-rejected alternative +is recorded under #3 for completeness. + +--- + +## #2 — Keep vendored code out of main `src/` + +**Feedback.** Put the vendored files in a dedicated `vendor` directory, not +`src/modules/reactRefresh/`. + +**Understanding.** Third-party-derived code mixed into first-party `src/` +creates review noise (it gets linted/formatted/refactored like our code), +obscures licensing provenance, and invites accidental "improvements" that +diverge from upstream. + +**Validity: ✅ valid.** Standard convention, and cheap to satisfy. The three +files (`reactRefresh.js`, `reactRefreshEntry.js`, `refreshUtils.js`, adapted +from `@rspack/plugin-react-refresh@2.0.2`, MIT) are plain JS client-runtime +modules — they are bundled by the *user's* compiler at app build time, never +executed inside Re.Pack's Node process, so they don't need Re.Pack's babel +build at all. (Today they pass through `babel src → dist`, which preserves +ESM anyway — doc 08; shipping them as-is is equivalent and simpler.) + +**Implementation (PR 6; applied to the reference branch 2026-07-02 — see +doc 08 § Reference branch updates).** Package-root `vendor/` shipped +verbatim: + +```text +packages/repack/ + vendor/ + react-refresh/ + LICENSE # upstream MIT license + provenance note (v2.0.2) + reactRefresh.js + reactRefreshEntry.js + refreshUtils.js +``` + +```jsonc +// packages/repack/package.json +{ + "files": ["dist", "vendor", /* ...existing entries */ ] +} +``` + +```ts +// DevelopmentPlugin.setupManualReactRefresh - resolution moves from +// '../modules/reactRefresh/*' (dist-relative) to the vendor dir +// (dist/plugins/DevelopmentPlugin.js -> ../../vendor/react-refresh/*) +const reactRefreshPath = require.resolve( + '../../vendor/react-refresh/reactRefresh.js' +); +``` + +Plus: exclude `vendor/` from biome and from the babel `src → dist` build +inputs (it no longer lives under `src/`), and keep an upstream-diff note in +the LICENSE/provenance file so future bumps can re-derive the adaptation +(the only functional edit: the removed overlay flags are replaced by +`__reload_on_runtime_errors__: false`). + +Fallback if shipping raw files proves awkward: `src/vendor/` (build-processed) +was explicitly offered by the maintainer as acceptable. **Resolved when +applying (2026-07-02): raw shipping worked** — the files turned out to be +verbatim upstream v2.0.2 apart from headers/formatting (diffed to confirm, +recorded in the LICENSE provenance note); the fallback wasn't needed. + +--- + +## #3 — Minimize the DevelopmentPlugin footprint; test both bundler paths + +**Feedback.** `DevelopmentPlugin` serves BOTH rspack and webpack; expectation +is that little actually *needed* to change beyond deprecated-usage cleanup. +Test both paths; a per-bundler plugin split is on the table if refresh +diverged too much. + +**Understanding.** Two asks: (a) confidence that webpack/Rspack-1 users see +no behavior change, (b) a diff that reads as "cleanup + one new branch", not +a rewrite. + +**Validity: ✅ valid with nuance.** The concern is right, but "little needed +to change" undersells one thing: the plugin-v1 dependency *had* to go (its +module-load-time `deprecated_runtimePaths` access hard-crashes under the v2 +plugin, and keeping `@rspack/plugin-react-refresh@1` as a dependency while +needing `^2` as a peer is unresolvable — same package name). So the manual +path's *runtime files* necessarily change source. The current diff (+157 +lines) is structurally mostly **moved** code — the old inline manual wiring +became `setupManualReactRefresh()` — plus the new v2 branch. The actual +decision point is ~10 lines: + +```ts +// the only behavioral fork - everything else is extraction +const rspackMajor = getRspackMajorVersionFromCompiler(compiler); +const reactRefreshEntryPath = + rspackMajor !== null && rspackMajor >= 2 + ? this.setupOfficialReactRefresh(compiler) // official v2 plugin + : this.setupManualReactRefresh(compiler); // webpack + Rspack 1 +``` + +A per-bundler plugin split is **not** warranted for one 10-line fork — +agreed with the maintainer's default. + +**The honest webpack-visible delta** (what PR 6's description must enumerate, +and what the explicit webpack-path test must cover): + +1. **Runtime files**: plugin v1's client files → vendored v2.0.2-adapted + files. Same wiring shape (`ProvidePlugin` ×2 + `DefinePlugin` + loader + rule + entry). +2. **Define flags**: `__react_refresh_error_overlay__: false` + + `__react_refresh_socket__: false` → `__reload_on_runtime_errors__: false` + — the v2 client files dropped the overlay/socket knobs and read the new + flag instead. Value semantics are unchanged (all web-oriented behaviors + stay off; RN surfaces errors via LogBox). +3. **Loader rule matcher**: `include:` → `test:` with the same regex — + both match the resource path here, but it's a semantic key change worth + covering in the test. + +**Rejected alternative (recorded per #1):** keep plugin v1's files without +vendoring via an aliased dependency +(`"plugin-react-refresh-v1": "npm:@rspack/plugin-react-refresh@1.0.0"`) — +zero runtime-file change for webpack/v1 users. Rejected: ships a permanently +frozen dead dependency to *all* users (v2 users included), splits the refresh +runtime across two sources of truth, and the maintainer independently blessed +vendoring (#1). + +**Plan impact (PR 6).** +- Keep `setupManualReactRefresh` byte-equivalent to the old inline block + except the three deltas above, so `git diff --color-moved` reads as a move. +- Explicit test matrix: webpack dev build + HMR (tester-app + `webpack-start`), Rspack 1 lab, Rspack 2 lab — the smoke harness + ([appendix](./appendix-smoke-harness/README.md)) already asserts the + correct refresh-runtime source per major; add a webpack lab to it during + PR 6/PR 7. + +--- + +## #4 — `start.ts` deviates further from webpack; bridge the command paths + +**Feedback.** The rspack and webpack command implementations should +ultimately converge instead of maintaining the same thing twice; this branch +widens the gap. + +**Understanding.** Directional/architectural feedback about +`commands/rspack/*` vs `commands/webpack/*` duplication, triggered by the +`start.ts` diff. + +**Validity: ✅ valid with nuance.** As a long-term direction, clearly right. +But the *new* divergence is small and mostly irreducible — diffing the two +`start.ts` files on the branch shows the gap is dominated by **pre-existing** +divergence (different `Compiler` constructor signatures, profiling env-vars, +`setupRspackEnvironment`, HMR typing). The branch adds exactly three rspack- +side pieces, none of which have a webpack counterpart to share: + +1. The cache-warning call (v2-only concept — webpack's `cache` never moved). +2. `getRspackCacheConfig` in the `--reset-cache` path (same reason). +3. The documented `MultiRspackOptions` cast (type-level only; webpack's side + compiles clean because *its* `devServer` augmentation matches). + +**Plan impact.** +- **PRs 2/4**: keep the `start.ts` diff at the current minimal shape; where a + pattern could apply to both bundlers (none of the current ones do), put it + in `commands/common/`. The cache warning helper already lives in + `commands/common/` even though only rspack calls it. +- **Root fix for the cast** (parked, noted in doc 08): align + `@callstack/repack-dev-server`'s `proxy` types with rspack's bundled + http-proxy-middleware copy — that removes the last irreducible cast. +- **Command-path bridging** is real but orthogonal work that predates this + effort — record as a follow-up candidate (new dated folder), don't smuggle + it into the Rspack 2 stack. + +--- + +## #5 — Don't auto-migrate the user's cache config + +**Feedback.** If a user bumps rspack, *they* migrate their config. Warning +is fine; silently fixing it is not. (Separately allowed: silently choosing +newer defaults when the user configures no caching at all.) + +**Understanding.** Config ownership: Re.Pack should not mutate user-provided +config values at runtime, even helpfully — it blurs responsibility and can +mask a config that is wrong in the user's own CI/tooling. + +**Validity: ✅ valid.** The original auto-migrate +(`migrateLegacyRspackCacheConfig`, doc 08 §4) honored user *intent* — under +v2 the legacy key is silently inert, so users would lose persistent caching +with no signal (verified, doc 07). But the maintainer's line is the safer +contract: **loud warning, no mutation**. The intent-honoring argument loses +because auto-migration makes Re.Pack behave differently from bare rspack +with the same config — exactly the class of magic that's hard to debug. + +**Implementation (PR 4; applied to the reference branch 2026-07-02 — see +doc 08 § Reference branch updates):** + +```ts +// commands/common/warnLegacyRspackCacheConfig.ts (renamed from migrate*) +let warningDisplayed = false; + +/** + * Rspack 2 moved persistent cache config from `experiments.cache` to the + * top-level `cache` option and silently ignores the legacy key - users + * migrating from Rspack 1 would lose caching with no signal. Warn (once), + * but leave the config untouched: migrating it is the user's move. + */ +export function warnLegacyRspackCacheConfig( + configs: RspackConfigurationWithLegacyCache[] +) { + if (warningDisplayed) return; + if (configs.every((c) => c.experiments?.cache === undefined)) return; + warningDisplayed = true; + console.warn( + colorette.yellow( + "Rspack 2 ignores the legacy 'experiments.cache' option, so persistent " + + "caching is NOT enabled. Move the value to the top-level 'cache' " + + 'option in your Rspack config.\n' + ) + ); +} +``` + +No `config.cache = ...`, no `delete` — the inert key is left in place (v2 +validation tolerates it, doc 07). + +**Consequential decision** (recorded here): `getRspackCacheConfig` (PR 2) +*keeps* reading `experiments.cache ?? cache`. Under warn-only, the legacy +value is not the *effective* v2 config — but `--reset-cache` should still +clear a cache directory that a legacy-configured project populated while on +Rspack 1 (that directory is precisely the stale one). Reading both locations +is correct for the accessor's actual consumer. + +**Parked (allowed, not required):** the maintainer explicitly permits +defaulting to newer cache options when the user configures nothing. Whether +Re.Pack should default-enable v2 persistent caching is a product decision — +belongs to the workspace-adoption/phase-4 follow-up, not this stack. + +--- + +## #6 — `parallelLoader` was always per-rule; parallel is "default-on" in v2 + +**Feedback.** The experiments flag was just the global toggle; per-rule +`use[].parallel` was always the real switch; in Rspack 2 parallel loading is +enabled by default. + +**Understanding + upstream verification (2026-07-02).** +- "Always per-rule" — **confirmed.** Under v1, parallel execution required + `experiments.parallelLoader: true` *and* `parallel: true` on the rule. +- "Enabled by default in v2" — **imprecise.** The + [v1→v2 migration guide](https://rspack.rs/guide/migration/rspack_1.x) + says: *"loader parallelization is now stable and enabled by default, but + you still need to configure `module.rules.use.parallel` to opt in"* — i.e. + the *feature/infrastructure* no longer needs a global flag, but **no + loader runs in parallel without per-rule opt-in**. The removal PR + ([web-infra-dev/rspack#12658](https://github.com/web-infra-dev/rspack/pull/12658)) + states the same: *"You still need to use `loader.use.parallel` to enable + this feature."* + +**Validity: ⚠️ partially correct** — the conclusion the maintainer draws from +it is still right, though: + +- Dropping `experiments.parallelLoader` from `getRepackConfig` under v2: + **correct** (the key is gone; doc 07 verified it's silently ignored, not a + validation error — doc 01 row 6's "schema validation error" severity needs + that correction; its "opt-in stays via `use[].parallel`" claim was right + all along). +- Skipping the loader's parallel-mode warning probe under v2: **correct, for + a subtler reason than "parallel is default-on".** The probe's entire + signal was the *global flag*: "you set `experiments.parallelLoader` but + forgot `parallel: true` on this rule". Under v2 the global flag doesn't + exist, so there is no way to distinguish "user wants parallel but + misconfigured" from "user doesn't use parallel" — running non-parallel is + a valid state, not a misconfiguration. The existing v2 skip stands: + +```ts +// Rspack 2 removed `experiments.parallelLoader` (parallel loading is stable +// and opt-in per rule only), so there is no global flag to check against - +// running non-parallel is a valid choice there, not a misconfiguration +const rspackVersion = loaderContext._compiler?.webpack?.rspackVersion; +if (rspackVersion && Number(rspackVersion.split('.')[0]) >= 2) { + return; +} +``` + +**Plan impact.** +- **PR 3** ships the gating as-is; the upstream verification demanded by + doc 09 is hereby done (sources above). +- **Docs correction (PR 1, this folder):** doc 01 row 6 severity — "schema + validation error" → "silently ignored" (doc 07 already established this; + the row predates verification). +- **Parked idea for follow-up:** since per-rule opt-in still exists under + v2, Re.Pack *could* default `parallel: true` in its own + `getJsTransformRules` under v2 for build perf — needs its own + verification (worker-context constraints on the loader: `_compiler` is + unavailable in threaded mode, which `babelSwcLoader` handles, but the + babel side has never been exercised under it). Not part of this stack. + +--- + +## #7 — Test the ESM `require` flow on Windows + +**Feedback.** Including monorepo setups and the super-app showcase. + +**Understanding.** The dual-support mechanism leans on Node's `require(esm)` +and on filesystem resolution (`require.resolve` with `paths`), both of which +have Windows-specific failure lore (path separators, drive letters, symlink +realpath behavior in monorepos/pnpm). + +**Validity: ✅ valid.** Nothing in the implementation *should* be +Windows-hostile — `require.resolve(..., { paths })` and `path.*` are used +throughout; no hand-built path strings — but "should" is exactly what a +smoke pass is for. The genuinely Windows-sensitive surfaces: + +1. `getRspackVersion` / `isRspack2` — resolving `@rspack/core/package.json` + from a *project* context (`paths: [context]`), especially under pnpm + symlinked monorepos on Windows (junctions vs symlinks). +2. The lazy command chain — `await import('./ensureNodeCompat.js')` then the + real command, compiled to CJS by babel. +3. `require(pluginPath)` of the ESM-only `@rspack/plugin-react-refresh@2` + via an absolute Windows path (PR 6's + `resolveReactRefreshPluginRequest`). +4. `require(esm)` of `@rspack/core` itself on Windows Node ≥20.19. + +**Plan impact (PR 2, with the plugin-resolution part re-checked in PR 6).** +Windows smoke pass covering: repack build + unit suite (both majors) on a +Windows runner or VM, plus a v2 lab run of the appendix smoke harness in +(a) a standalone project, (b) a pnpm monorepo layout, (c) the super-app +showcase. A `windows-latest` GitHub Actions lane running the unit suite is +cheap and durable — worth adding in PR 2 even though the tester apps stay +manual. + +--- + +## #8 — MFv1 changes look good + +**Feedback.** Approval of the `ModuleFederationPluginV1` +`@module-federation/runtime-tools` pre-check. + +**Validity: ✅ valid (approval).** No action; PR 5 ports it unchanged. + +--- + +## Summary of revisions this evaluation adds to the plan + +| # | Verdict | Revision | +| --- | --- | --- | +| 1 | ✅ confirmation | none | +| 2 | ✅ valid | PR 6: package-root `vendor/react-refresh/` shipped as-is + `files` entry + provenance/LICENSE + lint/build exclusions | +| 3 | ✅ valid w/ nuance | PR 6: keep manual path byte-equivalent modulo 3 enumerated deltas; explicit webpack HMR test; no plugin split; alias alternative recorded-rejected | +| 4 | ✅ valid w/ nuance | PRs 2/4: hold current minimal diff; dev-server proxy-type alignment parked as the cast's root fix; command bridging = separate follow-up effort | +| 5 | ✅ valid | PR 4: `warnLegacyRspackCacheConfig` — warn once, mutate nothing; accessor still reads both locations (reasoning above); default-cache-when-unset parked | +| 6 | ⚠️ partially correct | PR 3: gating ships as-is (upstream verified here); doc 01 row 6 severity correction; per-rule `parallel: true` default parked for follow-up | +| 7 | ✅ valid | PR 2: Windows smoke matrix (standalone / pnpm monorepo / super-app-showcase) + `windows-latest` unit-suite CI lane | +| 8 | ✅ approval | none | diff --git a/agent_context/rspackv2-jul2026/README.md b/agent_context/rspackv2-jul2026/README.md new file mode 100644 index 000000000..b1edcd342 --- /dev/null +++ b/agent_context/rspackv2-jul2026/README.md @@ -0,0 +1,95 @@ +# Rspack 2.0 Support — Research & Planning + +> Status: **Implemented, committed, pushed, CI green — pending PR split.** +> Core dual-version support (plan phases 0–2) is complete and verified on +> `feat/rspack-2-support` (`d0ea05d6..604392c8`, commit map in doc 08; kept +> as a reference — draft PR #1393 to be closed in favor of a PR stack). The +> maintainer-feedback reworks are **applied on the branch itself** (warn-only +> cache, vendor directory), `tester-app` is the **Rspack 2 example**, the +> workspace **default catalog is Rspack 2** (doc 08 § Catalog flip), and the +> standalone `apps/tester-app-rspack1` (outside the workspace, +> tarball-installed repack) is the Rspack 1 lane — all device-verified incl. +> HMR and the interactive chunk/asset flows; MF apps validated (bundles both +> platforms + MFv2 dev-server smoke). +> All decisions recorded (Q1–Q5 in doc 04, React Refresh in doc 06, feedback +> responses + reversals in docs 08–10), V1–V11 verification executed with no +> blockers (doc 07), implementation details + reference-branch updates in +> doc 08. +> Last updated: 2026-07-03 + +## Picking this up in a fresh session — start here + +1. Read [09-pr-split-plan.md](./09-pr-split-plan.md) top to bottom — it holds + the current state, the PR stack, the maintainer feedback, execution + mechanics (branch-cutting, per-PR validation commands, porting deltas), + and the working agreements. Its "Context for a fresh start" section gives + the full reading order. +2. **The task is executing the PR split** (doc 09 § The stack + § Mechanics). + Everything to port already exists on `feat/rspack-2-support`; the split is + cherry-picking, not new implementation. Known still-open work items: + the Windows require(esm) smoke pass + CI lane (PR 2, feedback #7), a CI + lane for `test:rspack1` (PR 2), and the DevelopmentPlugin + `git diff --color-moved` footprint check (PR 6, feedback #3). +3. Consult [08-implementation-notes.md](./08-implementation-notes.md) before + touching anything — commit map, technical landmines, the devDep-shadowing + discovery, CI snapshot-portability rules, and the on-device validation + record live there. +4. Do not revisit settled decisions without new information — they are + recorded inline with dates (docs 04/06/08/09/10). + +This folder tracks the investigation and plan for adding Rspack 2.0 support to Re.Pack +while keeping Rspack 1.x working (dual-version support). + +## Documents + +| Doc | Contents | +| --- | --- | +| [01-breaking-changes-inventory.md](./01-breaking-changes-inventory.md) | Every Rspack 2.0 breaking change (from the official discussion + migration guide), each mapped to its impact on Re.Pack | +| [02-impact-analysis.md](./02-impact-analysis.md) | Detailed codebase findings: what actually breaks, with file/line references | +| [03-dual-version-support-plan.md](./03-dual-version-support-plan.md) | Implementation plan for supporting Rspack 1.x and 2.x from a single Re.Pack release | +| [04-questions-and-blockers.md](./04-questions-and-blockers.md) | Open questions, concerns, and potential blockers to resolve before/while implementing | +| [05-user-benefits.md](./05-user-benefits.md) | What Rspack 2.0 gives Re.Pack users (performance, bundle size, DX) | +| [06-react-refresh-deep-dive.md](./06-react-refresh-deep-dive.md) | Deep dive: what `deprecated_runtimePaths` is, why v2 removed it, and the supported v2 approach (`injectEntry`/`reactRefreshLoader` options) | +| [07-verification-results.md](./07-verification-results.md) | Executed V1–V11 verification results against `@rspack/core@2.1.2` — no blockers; two impact-analysis revisions and one new work item (perfetto tracing) | +| [08-implementation-notes.md](./08-implementation-notes.md) | What was built on the reference branch: commits, technical landmines (Jest ESM escape, v2 type fallout patterns), working agreements, verification performed — **plus the reference-branch updates**: applied feedback reworks, the devDep-shadowing discovery and the `loadRspack` implement-then-revert decision, per-major tester apps, the on-device validation record (incl. interactive chunk/remote-asset flows), the **catalog flip** with the true-v2 integration findings, and the CI snapshot-portability rules | +| [09-pr-split-plan.md](./09-pr-split-plan.md) | **Where we left off** — the agreed PR stack, restructured for parallel execution (docs + foundations → 4 conflict-free parallel PRs → closer + per-major tester apps: tester-app as the v2 example, standalone tester-app-rspack1 as the v1 lane), dual-major testing strategy, branch/PR strategy, maintainer feedback, and reading order for a fresh start | +| [10-maintainer-feedback-evaluation.md](./10-maintainer-feedback-evaluation.md) | Point-by-point evaluation of the #1393 maintainer feedback — understanding, validity verdict (with upstream verification of #6), and the concrete implementation revision per point, with code examples | +| [appendix-smoke-harness/](./appendix-smoke-harness/README.md) | Verification artifact: the dual-major smoke script + lab setup used for doc 07/08 verification, preserved as the seed for the closer PR's committed smoke suite | + +## TL;DR + +Dual support (Rspack 1 + 2) is **feasible with a moderate amount of work**. Re.Pack is in +good shape because it configures almost everything explicitly rather than relying on +Rspack defaults, and it already has a version-branching precedent +(`packages/repack/src/commands/rspack/profile/index.ts`). + +**3 confirmed breaks in Re.Pack code** (severity revised after lab verification — doc 07): + +1. `experiments: { parallelLoader: true }` injected by `getRepackConfig` — the option was + removed in Rspack 2. *Verified: silently ignored, not a validation error* — dead config + plus a permanently-silent parallel-mode warning probe; still must be gated by major. +2. `ReactRefreshPlugin.deprecated_runtimePaths` (used in `DevelopmentPlugin`) — removed in + `@rspack/plugin-react-refresh@2`. **The only true hard crash** (throws at module load). + Strategy decided in doc 06. +3. Persistent cache config moved `experiments.cache` → top-level `cache`. *Verified: the + v1-style key is silently inert under v2* — users lose persistent caching with no + signal, and `--reset-cache` misdetects; the TS type Re.Pack derives from + `experiments.cache` is also gone from v2 types. + +**Biggest structural consideration:** `@rspack/core@2` is pure ESM and requires +Node `^20.19.0 || >=22.12.0`. Re.Pack's published CJS (`require('@rspack/core')`) keeps +working via Node's `require(esm)` — but only on those Node versions, which makes the Node +floor the real constraint, not the module format. + +**Biggest user-facing risk:** Rspack 2 changed `module.parser.javascript.exportsPresence` +default from `'warn'` to `'error'` — the React Native ecosystem is full of packages with +technically-invalid imports that Metro tolerates. We likely want Re.Pack to default this +back to a lenient value (see [04](./04-questions-and-blockers.md)). + +## Key external references + +- Planned breaking changes discussion: https://github.com/web-infra-dev/rspack/discussions/9270 +- Announcement blog post: https://rspack.rs/blog/announcing-2-0 +- Official migration guide: https://rspack.rs/guide/migration/rspack_1.x +- Rspack 2.0 stable released ~2026-04-22; latest at time of writing: `@rspack/core@2.1.2` +- Rspack 1.x line frozen at `1.7.12` (critical fixes only, new features go to 2.x) diff --git a/agent_context/rspackv2-jul2026/appendix-smoke-harness/README.md b/agent_context/rspackv2-jul2026/appendix-smoke-harness/README.md new file mode 100644 index 000000000..045070f32 --- /dev/null +++ b/agent_context/rspackv2-jul2026/appendix-smoke-harness/README.md @@ -0,0 +1,70 @@ +# Appendix: dual-major smoke harness (verification artifact) + +The actual script used for the dual-major smoke verification recorded in +[doc 07](../07-verification-results.md) / [doc 08](../08-implementation-notes.md) +(originally run from an ephemeral session scratchpad; preserved here so the +"formalize into a real test suite" PR — see [doc 09](../09-pr-split-plan.md), +closer PR — doesn't have to rebuild it from prose). It smoke-tests the **built +`packages/repack` dist** against whichever `@rspack/core` major is installed +in the current working directory: + +1. `getRepackConfig` routing — `experiments.parallelLoader` kept under v1 / + dropped under v2, `exportsPresence: 'auto'` parser override under v2 only. +2. Persistent-cache accessor + legacy-cache **warn-only** handling (per + maintainer feedback #5, doc 10 §5): warns once, mutates nothing, accessor + still reads the legacy location. (Assertions updated 2026-07-02 when the + warn-only rework was applied to the reference branch.) +3. `ensureNodeCompat` guard passes on a supported Node. +4. Full dev build through `DevelopmentPlugin`: HMR client + React Refresh + wiring present in the bundle, and the refresh runtime comes from the + correct source per major (vendored files under v1/webpack, official + `@rspack/plugin-react-refresh` under v2). + +## Lab setup (reconstructed from the 2026-07-02 session) + +Two throwaway npm projects ("labs"), each with `src/App.jsx` containing a +trivial component (`export function App() { return null; }`) and these +dependencies (exact manifests used): + +**v1-lab** — `@rspack/core@^1.7.12` (nothing else; repack's own deps cover +the manual refresh wiring). + +**v2-lab** — + +```json +{ + "@module-federation/enhanced": "^2.6.0", + "@rspack/core": "^2.1.2", + "@rspack/plugin-react-refresh": "^2.0.2", + "@swc/helpers": "^0.5.23", + "react-refresh": "^0.18.0" +} +``` + +Notes (from doc 08): + +- `react-refresh` must be installed in the v2 lab explicitly — pnpm-strict + layouts won't hoist repack's copy into the official plugin's resolution + scope. +- `react-native` is stubbed via `resolve.alias` to [rn-stub/](./rn-stub/) + (real RN sources need the full flow/babel loader chain, which is out of + scope for wiring-level smoke tests). The stub covers the modules the + DevelopmentPlugin runtime imports: `index.js` (`DevSettings`, `LogBox`), + `Libraries/Core/NativeExceptionsManager`, + `Libraries/Utilities/DevLoadingView`, + `Libraries/NativeModules/specs/NativeRedBox`. +- The repack loader is resolved via `resolveLoader.alias` + (`@callstack/repack/react-refresh-loader` → the dist file), since the labs + don't install repack from a registry. +- Node 26 was used; the harness assumes `pnpm build` has been run in + `packages/repack` first. + +## Running + +```sh +cd && node /agent_context/rspackv2-jul2026/appendix-smoke-harness/smoke.cjs +``` + +The script auto-detects the installed major and flips its assertions +accordingly. All checks printed `PASS` on 2026-07-02 against `1.7.12` and +`2.1.2` (doc 08 § Verification performed). diff --git a/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/Libraries/Core/NativeExceptionsManager.js b/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/Libraries/Core/NativeExceptionsManager.js new file mode 100644 index 000000000..0f1d5dd40 --- /dev/null +++ b/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/Libraries/Core/NativeExceptionsManager.js @@ -0,0 +1,6 @@ +export default { + hide() {}, + showMessage() {}, + dismissRedbox() {}, + reportException() {}, +}; diff --git a/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/Libraries/NativeModules/specs/NativeRedBox.js b/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/Libraries/NativeModules/specs/NativeRedBox.js new file mode 100644 index 000000000..0f1d5dd40 --- /dev/null +++ b/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/Libraries/NativeModules/specs/NativeRedBox.js @@ -0,0 +1,6 @@ +export default { + hide() {}, + showMessage() {}, + dismissRedbox() {}, + reportException() {}, +}; diff --git a/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/Libraries/Utilities/DevLoadingView.js b/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/Libraries/Utilities/DevLoadingView.js new file mode 100644 index 000000000..0f1d5dd40 --- /dev/null +++ b/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/Libraries/Utilities/DevLoadingView.js @@ -0,0 +1,6 @@ +export default { + hide() {}, + showMessage() {}, + dismissRedbox() {}, + reportException() {}, +}; diff --git a/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/index.js b/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/index.js new file mode 100644 index 000000000..a78c3eeb5 --- /dev/null +++ b/agent_context/rspackv2-jul2026/appendix-smoke-harness/rn-stub/index.js @@ -0,0 +1,2 @@ +export const DevSettings = { reload() {} }; +export const LogBox = { clearAllLogs() {} }; diff --git a/agent_context/rspackv2-jul2026/appendix-smoke-harness/smoke.cjs b/agent_context/rspackv2-jul2026/appendix-smoke-harness/smoke.cjs new file mode 100644 index 000000000..eccd24da6 --- /dev/null +++ b/agent_context/rspackv2-jul2026/appendix-smoke-harness/smoke.cjs @@ -0,0 +1,227 @@ +// Smoke test of built @callstack/repack dist against the rspack major +// installed in the current working directory. +// +// Provenance: verification artifact from the 2026-07-02 implementation +// session (docs 07/08). Run from inside a lab project (see README.md next to +// this file for the lab setup) with `node /smoke.cjs`. Assertions +// 2a-2c match the warn-only cache behavior applied on the reference branch +// per maintainer feedback #5 (doc 10 §5). +const path = require('node:path'); +const fs = require('node:fs'); +const REPACK = path.resolve(__dirname, '../../..', 'packages/repack'); +const LAB = process.cwd(); +const rspackPkg = require( + path.join(LAB, 'node_modules/@rspack/core/package.json') +); +const major = Number(rspackPkg.version.split('.')[0]); +console.log( + `\n=== smoke @rspack/core ${rspackPkg.version} (major ${major}) ===` +); + +(async () => { + // --- 1. getRepackConfig --- + const { getRepackConfig } = require( + path.join(REPACK, 'dist/commands/common/config/getRepackConfig.js') + ); + const repackConfig = await getRepackConfig('rspack', LAB); + const hasParallel = repackConfig.experiments?.parallelLoader === true; + const exportsPresence = + repackConfig.module?.parser?.javascript?.exportsPresence; + if (major >= 2) { + console.log( + '1a. no experiments.parallelLoader :', + !hasParallel ? 'PASS' : 'FAIL' + ); + console.log( + '1b. exportsPresence auto :', + exportsPresence === 'auto' ? 'PASS' : 'FAIL: ' + exportsPresence + ); + } else { + console.log( + '1a. experiments.parallelLoader kept :', + hasParallel ? 'PASS' : 'FAIL' + ); + console.log( + '1b. no module parser override :', + repackConfig.module === undefined ? 'PASS' : 'FAIL' + ); + } + + // --- 2. cache config accessor + legacy-cache warning (warn-only, feedback #5) --- + const { getRspackCacheConfig } = require( + path.join(REPACK, 'dist/commands/common/resetPersistentCache.js') + ); + const { warnLegacyRspackCacheConfig } = require( + path.join(REPACK, 'dist/commands/common/warnLegacyRspackCacheConfig.js') + ); + const legacyCfg = { + experiments: { + cache: { type: 'persistent', storage: { directory: '/custom' } }, + }, + }; + console.log( + '2a. accessor reads legacy location :', + getRspackCacheConfig(legacyCfg)?.storage?.directory === '/custom' + ? 'PASS' + : 'FAIL' + ); + const warns = []; + const origWarn = console.warn; + console.warn = (msg) => warns.push(String(msg)); + warnLegacyRspackCacheConfig([legacyCfg]); + warnLegacyRspackCacheConfig([legacyCfg]); // must warn only once + console.warn = origWarn; + const untouched = + legacyCfg.cache === undefined && + legacyCfg.experiments.cache?.storage?.directory === '/custom'; + console.log( + '2b. warns once, mutates nothing :', + warns.length === 1 && untouched + ? 'PASS' + : `FAIL (warns=${warns.length} untouched=${untouched})` + ); + console.log( + '2c. accessor still reads legacy location :', + getRspackCacheConfig(legacyCfg)?.storage?.directory === '/custom' + ? 'PASS' + : 'FAIL' + ); + + // --- 3. node compat guard --- + const { ensureNodeSupportsRspack } = require( + path.join(REPACK, 'dist/commands/rspack/ensureNodeCompat.js') + ); + try { + ensureNodeSupportsRspack(); + console.log( + '3. node guard passes on', + process.versions.node, + ' : PASS' + ); + } catch (e) { + console.log( + '3. node guard threw unexpectedly : FAIL -', + e.message + ); + } + + // --- 4. DevelopmentPlugin end-to-end dev build with HMR + React Refresh --- + const labRequire = require('node:module').createRequire( + path.join(LAB, 'package.json') + ); + const rspack = labRequire('@rspack/core'); + const rspackFn = rspack.rspack ?? rspack; + const { DevelopmentPlugin } = require( + path.join(REPACK, 'dist/plugins/DevelopmentPlugin.js') + ); + const OUT = path.join(LAB, 'dist', 'smoke'); + + const config = { + context: LAB, + mode: 'development', + devtool: false, + entry: { main: './src/App.jsx' }, + devServer: { host: 'localhost', port: 8081, hot: true }, + output: { + path: OUT, + filename: 'index.bundle', + uniqueName: 'smokeapp', + clean: true, + }, + module: { + rules: [ + { + // mirror Re.Pack's getJsTransformRules: 'javascript/auto' makes + // ESM/CJS detection syntax-based instead of package-scope based + type: 'javascript/auto', + test: /\.[cm]?jsx?$/, + use: { + loader: 'builtin:swc-loader', + options: { jsc: { parser: { syntax: 'ecmascript', jsx: true } } }, + }, + }, + ], + }, + resolve: { + alias: { + // stub react-native - the smoke test validates refresh wiring, + // not RN itself (RN sources need the full flow/babel loader setup) + 'react-native': path.join(__dirname, 'rn-stub'), + }, + }, + resolveLoader: { + alias: { + '@callstack/repack/react-refresh-loader': path.join( + REPACK, + 'dist/loaders/reactRefreshLoader/index.js' + ), + }, + }, + plugins: [new DevelopmentPlugin({ platform: 'ios' })], + }; + + const compiler = rspackFn(config); + await new Promise((resolve) => { + compiler.run((err, stats) => { + if (err) { + console.log( + '4. DevelopmentPlugin build : FAIL -', + err.message.split('\n')[0] + ); + return resolve(); + } + const j = stats.toJson({ all: false, errors: true }); + if (j.errors?.length) { + console.log('4. DevelopmentPlugin build : FAIL'); + for (const e of j.errors.slice(0, 3)) + console.log( + ' err:', + e.message.split('\n').slice(0, 2).join(' | ').slice(0, 200) + ); + return resolve(); + } + compiler.close(() => { + const out = fs.readFileSync(path.join(OUT, 'index.bundle'), 'utf8'); + const checks = { + 'refresh entry bundled (__reactRefreshInjected)': out.includes( + '__reactRefreshInjected' + ), + 'repack loader footer applied (setImmediate)': + out.includes('setImmediate'), + 'HMR client bundled': + out.includes('[Re.Pack] HMR') || + out.includes('WebpackHMRClient') || + out.includes('__hmr'), + 'refresh utils wired ($ReactRefreshRuntime$)': + out.includes('$RefreshReg$'), + }; + let pass = true; + for (const [name, ok] of Object.entries(checks)) { + if (!ok) { + pass = false; + console.log(' missing:', name); + } + } + const usedVendored = + out.includes('vendor/react-refresh/reactRefresh.js') || + out.includes('vendor_react-refresh'); + const usedOfficial = out.includes('plugin-react-refresh/client/'); + const sourceOk = + major >= 2 + ? usedOfficial && !usedVendored + : usedVendored && !usedOfficial; + console.log( + '4a. dev build with refresh + HMR :', + pass ? 'PASS' : 'FAIL' + ); + console.log( + '4b. refresh runtime source correct :', + sourceOk + ? `PASS (${major >= 2 ? 'official plugin' : 'vendored files'})` + : `FAIL (vendored=${usedVendored} official=${usedOfficial})` + ); + resolve(); + }); + }); + }); +})(); diff --git a/apps/tester-app-rspack1/.gitignore b/apps/tester-app-rspack1/.gitignore new file mode 100644 index 000000000..256e006ba --- /dev/null +++ b/apps/tester-app-rspack1/.gitignore @@ -0,0 +1,8 @@ +# standalone lab - its install artifacts stay out of the repository +node_modules/ +pnpm-lock.yaml +callstack-repack.tgz +.repack-pack/ +build/ +ios/Pods/ +ios/*.xcworkspace/ diff --git a/apps/tester-app-rspack1/Gemfile b/apps/tester-app-rspack1/Gemfile new file mode 100644 index 000000000..ed05077dd --- /dev/null +++ b/apps/tester-app-rspack1/Gemfile @@ -0,0 +1,15 @@ +source 'https://rubygems.org' + +# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version +ruby '>= 2.6.10' + +# Exclude problematic versions of cocoapods and activesupport that causes build failures. +gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' +gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' +gem 'xcodeproj', '< 1.26.0' + +# Ruby 3.4.0 has removed some libraries from the standard library. +gem 'bigdecimal' +gem 'logger' +gem 'benchmark' +gem 'mutex_m' diff --git a/apps/tester-app-rspack1/Gemfile.lock b/apps/tester-app-rspack1/Gemfile.lock new file mode 100644 index 000000000..f5b6dc3d5 --- /dev/null +++ b/apps/tester-app-rspack1/Gemfile.lock @@ -0,0 +1,118 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.8) + activesupport (7.1.3.3) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + base64 (0.3.0) + benchmark (0.4.0) + bigdecimal (3.1.8) + claide (1.1.0) + cocoapods (1.15.2) + addressable (~> 2.8) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.15.2) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.8.0) + nap (~> 1.0) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.15.2) + activesupport (>= 5.0, < 8) + addressable (~> 2.8) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix (~> 4.0) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (2.1) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored2 (3.1.2) + concurrent-ruby (1.3.1) + connection_pool (2.4.1) + drb (2.2.1) + escape (0.0.4) + ethon (0.16.0) + ffi (>= 1.15.0) + ffi (1.17.0) + ffi (1.17.0-arm64-darwin) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + httpclient (2.8.3) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + json (2.7.2) + logger (1.7.0) + minitest (5.23.1) + molinillo (0.8.0) + mutex_m (0.2.0) + nanaimo (0.3.0) + nap (1.1.0) + netrc (0.11.0) + public_suffix (4.0.7) + rexml (3.4.4) + ruby-macho (2.5.1) + typhoeus (1.4.1) + ethon (>= 0.9.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + xcodeproj (1.25.1) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + rexml (>= 3.3.6, < 4.0) + +PLATFORMS + arm64-darwin-21 + arm64-darwin-22 + ruby + +DEPENDENCIES + activesupport (>= 6.1.7.5, != 7.1.0) + benchmark + bigdecimal + cocoapods (>= 1.13, != 1.15.1, != 1.15.0) + logger + mutex_m + xcodeproj (< 1.26.0) + +RUBY VERSION + ruby 2.7.6p219 + +BUNDLED WITH + 2.4.20 diff --git a/apps/tester-app-rspack1/README.md b/apps/tester-app-rspack1/README.md new file mode 100644 index 000000000..3b4a6af58 --- /dev/null +++ b/apps/tester-app-rspack1/README.md @@ -0,0 +1,49 @@ +# tester-app-rspack1 + +Standalone validation app pinned to **Rspack 1**, deliberately **outside the +pnpm workspace** (excluded via a negation glob in the root +`pnpm-workspace.yaml`, and marked as its own workspace root by the local +`pnpm-workspace.yaml`). + +## Why outside the workspace + +`packages/repack` has `@rspack/core@^2` as a devDependency (needed for types +and unit tests). Inside the workspace, repack is symlinked, so its published +code's plain `require('@rspack/core')` resolves that devDependency **before** +any version an app pins - every workspace app effectively runs Rspack 2, +regardless of its manifest. The shipped code intentionally stays free of +monorepo-aware resolution workarounds (decision 2026-07-03), so the Rspack 1 +validation surface has to be a project where resolution works like a real +user project: + +- own `node_modules` (nothing hoisted from the workspace), +- repack installed from a **packed tarball** (`file:./callstack-repack.tgz`) + - a tarball install has no nested `node_modules`, so `@rspack/core` + resolves to this app's own `^1.x` copy. + +The src is intentionally minimal and **not** shared with `tester-app` +(sharing src across the workspace boundary would resolve `react`/ +`react-native` from two different installs). It covers the bundler-major +surface: dev server, HMR/React Refresh (the vendored-runtime path under v1), +async local chunks via ScriptManager, and production bundling. Full feature +coverage (NativeWind, Reanimated, remote chunks/mini-apps, assets matrix) +lives in [`tester-app`](../tester-app/) - the **Rspack 2** example. + +## Setup + +```sh +pnpm run pack-repack # builds packages/repack and packs it to ./callstack-repack.tgz +pnpm install # standalone install (own lockfile, gitignored) +``` + +Re-run both steps after changing `packages/repack` - the tarball is a +snapshot, not a link. + +## Usage + +```sh +pnpm start # dev server (Rspack 1) +pnpm bundle:android # production bundle - should print "(Rspack 1.x)" +pnpm android / pnpm ios # native shells (react-native-test-app) +pnpm pods # iOS pods (see tester-app notes re: ruby version) +``` diff --git a/apps/tester-app-rspack1/android/build.gradle b/apps/tester-app-rspack1/android/build.gradle new file mode 100644 index 000000000..6b403e9d7 --- /dev/null +++ b/apps/tester-app-rspack1/android/build.gradle @@ -0,0 +1,43 @@ +buildscript { + apply(from: { + def searchDir = rootDir.toPath() + do { + def p = searchDir.resolve("node_modules/react-native-test-app/android/dependencies.gradle") + if (p.toFile().exists()) { + return p.toRealPath().toString() + } + } while (searchDir = searchDir.getParent()) + throw new GradleException("Could not find `react-native-test-app`"); + }()) + + repositories { + mavenCentral() + google() + } + + dependencies { + getReactNativeDependencies().each { dependency -> + classpath(dependency) + } + } +} + +allprojects { + repositories { + { + def searchDir = rootDir.toPath() + do { + def p = searchDir.resolve("node_modules/react-native/android") + if (p.toFile().exists()) { + maven { + url(p.toRealPath().toString()) + } + break + } + } while (searchDir = searchDir.getParent()) + // As of 0.80, React Native is no longer installed from npm + }() + mavenCentral() + google() + } +} diff --git a/apps/tester-app-rspack1/android/debug.keystore b/apps/tester-app-rspack1/android/debug.keystore new file mode 100644 index 000000000..364e105ed Binary files /dev/null and b/apps/tester-app-rspack1/android/debug.keystore differ diff --git a/apps/tester-app-rspack1/android/gradle.properties b/apps/tester-app-rspack1/android/gradle.properties new file mode 100644 index 000000000..a55f2dea9 --- /dev/null +++ b/apps/tester-app-rspack1/android/gradle.properties @@ -0,0 +1,55 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the Gradle Daemon. The setting is +# particularly useful for configuring JVM memory settings for build performance. +# This does not affect the JVM settings for the Gradle client VM. +# The default is `-Xmx512m -XX:MaxMetaspaceSize=256m`. +org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will fork up to org.gradle.workers.max JVMs to execute +# projects in parallel. To learn more about parallel task execution, see the +# section on Gradle build performance: +# https://docs.gradle.org/current/userguide/performance.html#parallel_execution. +# Default is `false`. +#org.gradle.parallel=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true + +# Use this property to specify which architecture you want to build. +# You can also override it from the CLI using +# ./gradlew -PreactNativeArchitectures=x86_64 +reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 + +# Use this property to enable support to the new architecture. +# This will allow you to use TurboModules and the Fabric render in +# your application. You should enable this flag either if you want +# to write custom TurboModules/Fabric components OR use libraries that +# are providing them. +# Note that this is incompatible with web debugging. +newArchEnabled=true +bridgelessEnabled=true +hermesEnabled=true + +# Uncomment the line below to build React Native from source. +#react.buildFromSource=true + +# Version of Android NDK to build against. +#ANDROID_NDK_VERSION=26.1.10909125 + +# Version of Kotlin to build against. +#KOTLIN_VERSION=1.8.22 + +# Use this property to enable edge-to-edge display support. +# This allows your app to draw behind system bars for an immersive UI. +# Note: Only works with ReactActivity and should not be used with custom Activity. +edgeToEdgeEnabled=true \ No newline at end of file diff --git a/apps/tester-app-rspack1/android/gradle/wrapper/gradle-wrapper.jar b/apps/tester-app-rspack1/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000..1b33c55ba Binary files /dev/null and b/apps/tester-app-rspack1/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/apps/tester-app-rspack1/android/gradle/wrapper/gradle-wrapper.properties b/apps/tester-app-rspack1/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..2a84e188b --- /dev/null +++ b/apps/tester-app-rspack1/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/apps/tester-app-rspack1/android/gradlew b/apps/tester-app-rspack1/android/gradlew new file mode 100755 index 000000000..17fc5dbb8 --- /dev/null +++ b/apps/tester-app-rspack1/android/gradlew @@ -0,0 +1,252 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH="\\\"\\\"" + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/apps/tester-app-rspack1/android/gradlew.bat b/apps/tester-app-rspack1/android/gradlew.bat new file mode 100644 index 000000000..db3a6ac20 --- /dev/null +++ b/apps/tester-app-rspack1/android/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/apps/tester-app-rspack1/android/settings.gradle b/apps/tester-app-rspack1/android/settings.gradle new file mode 100644 index 000000000..5d2160856 --- /dev/null +++ b/apps/tester-app-rspack1/android/settings.gradle @@ -0,0 +1,21 @@ +pluginManagement { + repositories { + gradlePluginPortal() + mavenCentral() + google() + } +} + +rootProject.name = "TesterAppRspack1" + +apply(from: { + def searchDir = rootDir.toPath() + do { + def p = searchDir.resolve("node_modules/react-native-test-app/test-app.gradle") + if (p.toFile().exists()) { + return p.toRealPath().toString() + } + } while (searchDir = searchDir.getParent()) + throw new GradleException("Could not find `react-native-test-app`"); +}()) +applyTestAppSettings(settings) diff --git a/apps/tester-app-rspack1/app.json b/apps/tester-app-rspack1/app.json new file mode 100644 index 000000000..b4128b125 --- /dev/null +++ b/apps/tester-app-rspack1/app.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/react-native-test-app/trunk/schema.json", + "name": "TesterAppRspack1", + "displayName": "TesterAppRspack1", + "singleApp": "tester-app-rspack1", + "components": [ + { + "appKey": "TesterAppRspack1", + "displayName": "TesterAppRspack1", + "slug": "tester-app-rspack1" + } + ], + "android": { + "package": "com.testerapprspack1", + "signingConfigs": { + "debug": { + "storeFile": "android/debug.keystore" + }, + "release": { + "storeFile": "android/debug.keystore" + } + } + }, + "ios": { + "bundleIdentifier": "com.testerapprspack1" + }, + "resources": { + "android": [ + "build/output/android/index.android.bundle", + "build/output/android/src_Async_local_tsx.chunk.bundle", + "build/output/android/res" + ], + "ios": [ + "build/output/ios/main.jsbundle", + "build/output/ios/src_Async_local_tsx.chunk.bundle", + "build/output/ios/assets" + ] + } +} diff --git a/apps/tester-app-rspack1/babel.config.js b/apps/tester-app-rspack1/babel.config.js new file mode 100644 index 000000000..98655448c --- /dev/null +++ b/apps/tester-app-rspack1/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ['@react-native/babel-preset'], +}; diff --git a/apps/tester-app-rspack1/index.js b/apps/tester-app-rspack1/index.js new file mode 100644 index 000000000..3d2e8e19a --- /dev/null +++ b/apps/tester-app-rspack1/index.js @@ -0,0 +1,8 @@ +import { AppRegistry } from 'react-native'; +import { name as appName } from './app.json'; +import App from './src/App'; + +// ScriptManager setup +import './src/setup'; + +AppRegistry.registerComponent(appName, () => App); diff --git a/apps/tester-app-rspack1/ios/.xcode.env b/apps/tester-app-rspack1/ios/.xcode.env new file mode 100644 index 000000000..2fc7c2bec --- /dev/null +++ b/apps/tester-app-rspack1/ios/.xcode.env @@ -0,0 +1 @@ +export NODE_BINARY='/Users/daniel.williams/.local/share/fnm/node-versions/v26.3.1/installation/bin/node' diff --git a/apps/tester-app-rspack1/ios/Podfile b/apps/tester-app-rspack1/ios/Podfile new file mode 100644 index 000000000..0e9828e35 --- /dev/null +++ b/apps/tester-app-rspack1/ios/Podfile @@ -0,0 +1,15 @@ +ws_dir = Pathname.new(__dir__) +ws_dir = ws_dir.parent until + File.exist?("#{ws_dir}/node_modules/react-native-test-app/test_app.rb") || + ws_dir.expand_path.to_s == '/' +require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb" + +workspace 'TesterAppRspack1.xcworkspace' + +options = { + :bridgeless_enabled => true, + :fabric_enabled => true, + :hermes_enabled => true, +} + +use_test_app! options diff --git a/apps/tester-app-rspack1/ios/Podfile.lock b/apps/tester-app-rspack1/ios/Podfile.lock new file mode 100644 index 000000000..7294cab5b --- /dev/null +++ b/apps/tester-app-rspack1/ios/Podfile.lock @@ -0,0 +1,2171 @@ +PODS: + - callstack-repack (5.2.5): + - hermes-engine + - JWTDecode (~> 3.0.0) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - SwiftyRSA (~> 1.7) + - Yoga + - FBLazyVector (0.84.1) + - hermes-engine (250829098.0.9): + - hermes-engine/Pre-built (= 250829098.0.9) + - hermes-engine/Pre-built (250829098.0.9) + - JWTDecode (3.0.1) + - RCTDeprecation (0.84.1) + - RCTRequired (0.84.1) + - RCTSwiftUI (0.84.1) + - RCTSwiftUIWrapper (0.84.1): + - RCTSwiftUI + - RCTTypeSafety (0.84.1): + - FBLazyVector (= 0.84.1) + - RCTRequired (= 0.84.1) + - React-Core (= 0.84.1) + - React (0.84.1): + - React-Core (= 0.84.1) + - React-Core/DevSupport (= 0.84.1) + - React-Core/RCTWebSocket (= 0.84.1) + - React-RCTActionSheet (= 0.84.1) + - React-RCTAnimation (= 0.84.1) + - React-RCTBlob (= 0.84.1) + - React-RCTImage (= 0.84.1) + - React-RCTLinking (= 0.84.1) + - React-RCTNetwork (= 0.84.1) + - React-RCTSettings (= 0.84.1) + - React-RCTText (= 0.84.1) + - React-RCTVibration (= 0.84.1) + - React-callinvoker (0.84.1) + - React-Core (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default (= 0.84.1) + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core-prebuilt (0.84.1): + - ReactNativeDependencies + - React-Core/CoreModulesHeaders (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/Default (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/DevSupport (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default (= 0.84.1) + - React-Core/RCTWebSocket (= 0.84.1) + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTActionSheetHeaders (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTAnimationHeaders (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTBlobHeaders (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTImageHeaders (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTLinkingHeaders (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTNetworkHeaders (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTSettingsHeaders (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTTextHeaders (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTVibrationHeaders (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTWebSocket (0.84.1): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default (= 0.84.1) + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-CoreModules (0.84.1): + - RCTTypeSafety (= 0.84.1) + - React-Core-prebuilt + - React-Core/CoreModulesHeaders (= 0.84.1) + - React-debug + - React-jsi (= 0.84.1) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-NativeModulesApple + - React-RCTBlob + - React-RCTFBReactNativeSpec + - React-RCTImage (= 0.84.1) + - React-runtimeexecutor + - React-utils + - ReactCommon + - ReactNativeDependencies + - React-cxxreact (0.84.1): + - hermes-engine + - React-callinvoker (= 0.84.1) + - React-Core-prebuilt + - React-debug (= 0.84.1) + - React-jsi (= 0.84.1) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-logger (= 0.84.1) + - React-perflogger (= 0.84.1) + - React-runtimeexecutor + - React-timing (= 0.84.1) + - React-utils + - ReactNativeDependencies + - React-debug (0.84.1) + - React-defaultsnativemodule (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-domnativemodule + - React-featureflags + - React-featureflagsnativemodule + - React-idlecallbacksnativemodule + - React-intersectionobservernativemodule + - React-jsi + - React-jsiexecutor + - React-microtasksnativemodule + - React-RCTFBReactNativeSpec + - React-webperformancenativemodule + - ReactNativeDependencies + - Yoga + - React-domnativemodule (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-Fabric + - React-Fabric/bridging + - React-FabricComponents + - React-graphics + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-Fabric (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/animated (= 0.84.1) + - React-Fabric/animationbackend (= 0.84.1) + - React-Fabric/animations (= 0.84.1) + - React-Fabric/attributedstring (= 0.84.1) + - React-Fabric/bridging (= 0.84.1) + - React-Fabric/componentregistry (= 0.84.1) + - React-Fabric/componentregistrynative (= 0.84.1) + - React-Fabric/components (= 0.84.1) + - React-Fabric/consistency (= 0.84.1) + - React-Fabric/core (= 0.84.1) + - React-Fabric/dom (= 0.84.1) + - React-Fabric/imagemanager (= 0.84.1) + - React-Fabric/leakchecker (= 0.84.1) + - React-Fabric/mounting (= 0.84.1) + - React-Fabric/observers (= 0.84.1) + - React-Fabric/scheduler (= 0.84.1) + - React-Fabric/telemetry (= 0.84.1) + - React-Fabric/templateprocessor (= 0.84.1) + - React-Fabric/uimanager (= 0.84.1) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/animated (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/animationbackend (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/animations (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/attributedstring (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/bridging (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/componentregistry (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/componentregistrynative (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/components/legacyviewmanagerinterop (= 0.84.1) + - React-Fabric/components/root (= 0.84.1) + - React-Fabric/components/scrollview (= 0.84.1) + - React-Fabric/components/view (= 0.84.1) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/legacyviewmanagerinterop (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/root (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/scrollview (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/view (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-renderercss + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-Fabric/consistency (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/core (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/dom (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/imagemanager (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/leakchecker (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/mounting (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/observers (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/observers/events (= 0.84.1) + - React-Fabric/observers/intersection (= 0.84.1) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/observers/events (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/observers/intersection (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/scheduler (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/observers/events + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-performancecdpmetrics + - React-performancetimeline + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/telemetry (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/templateprocessor (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/uimanager (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/uimanager/consistency (= 0.84.1) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererconsistency + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/uimanager/consistency (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererconsistency + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-FabricComponents (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-FabricComponents/components (= 0.84.1) + - React-FabricComponents/textlayoutmanager (= 0.84.1) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-FabricComponents/components/inputaccessory (= 0.84.1) + - React-FabricComponents/components/iostextinput (= 0.84.1) + - React-FabricComponents/components/modal (= 0.84.1) + - React-FabricComponents/components/rncore (= 0.84.1) + - React-FabricComponents/components/safeareaview (= 0.84.1) + - React-FabricComponents/components/scrollview (= 0.84.1) + - React-FabricComponents/components/switch (= 0.84.1) + - React-FabricComponents/components/text (= 0.84.1) + - React-FabricComponents/components/textinput (= 0.84.1) + - React-FabricComponents/components/unimplementedview (= 0.84.1) + - React-FabricComponents/components/virtualview (= 0.84.1) + - React-FabricComponents/components/virtualviewexperimental (= 0.84.1) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/inputaccessory (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/iostextinput (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/modal (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/rncore (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/safeareaview (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/scrollview (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/switch (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/text (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/textinput (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/unimplementedview (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/virtualview (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/virtualviewexperimental (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/textlayoutmanager (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricImage (0.84.1): + - hermes-engine + - RCTRequired (= 0.84.1) + - RCTTypeSafety (= 0.84.1) + - React-Core-prebuilt + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-jsiexecutor (= 0.84.1) + - React-logger + - React-rendererdebug + - React-utils + - ReactCommon + - ReactNativeDependencies + - Yoga + - React-featureflags (0.84.1): + - React-Core-prebuilt + - ReactNativeDependencies + - React-featureflagsnativemodule (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-graphics (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-jsiexecutor + - React-utils + - ReactNativeDependencies + - React-hermes (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact (= 0.84.1) + - React-jsi + - React-jsiexecutor (= 0.84.1) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-oscompat + - React-perflogger (= 0.84.1) + - React-runtimeexecutor + - ReactNativeDependencies + - React-idlecallbacksnativemodule (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - React-runtimescheduler + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-ImageManager (0.84.1): + - React-Core-prebuilt + - React-Core/Default + - React-debug + - React-Fabric + - React-graphics + - React-rendererdebug + - React-utils + - ReactNativeDependencies + - React-intersectionobservernativemodule (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-Fabric + - React-Fabric/bridging + - React-graphics + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - React-runtimescheduler + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-jserrorhandler (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-jsi + - ReactCommon/turbomodule/bridging + - ReactNativeDependencies + - React-jsi (0.84.1): + - hermes-engine + - React-Core-prebuilt + - ReactNativeDependencies + - React-jsiexecutor (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-jserrorhandler + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-jsinspector (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-jsi + - React-jsinspectorcdp + - React-jsinspectornetwork + - React-jsinspectortracing + - React-oscompat + - React-perflogger (= 0.84.1) + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-jsinspectorcdp (0.84.1): + - React-Core-prebuilt + - ReactNativeDependencies + - React-jsinspectornetwork (0.84.1): + - React-Core-prebuilt + - React-jsinspectorcdp + - ReactNativeDependencies + - React-jsinspectortracing (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-jsinspectornetwork + - React-oscompat + - React-timing + - ReactNativeDependencies + - React-jsitooling (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact (= 0.84.1) + - React-debug + - React-jsi (= 0.84.1) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-jsitracing (0.84.1): + - React-jsi + - React-logger (0.84.1): + - React-Core-prebuilt + - ReactNativeDependencies + - React-Mapbuffer (0.84.1): + - React-Core-prebuilt + - React-debug + - ReactNativeDependencies + - React-microtasksnativemodule (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-NativeModulesApple (0.84.1): + - hermes-engine + - React-callinvoker + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-runtimeexecutor + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-networking (0.84.1): + - React-Core-prebuilt + - React-jsinspectornetwork + - React-jsinspectortracing + - React-performancetimeline + - React-timing + - ReactNativeDependencies + - React-oscompat (0.84.1) + - React-perflogger (0.84.1): + - React-Core-prebuilt + - ReactNativeDependencies + - React-performancecdpmetrics (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-performancetimeline + - React-runtimeexecutor + - React-timing + - ReactNativeDependencies + - React-performancetimeline (0.84.1): + - React-Core-prebuilt + - React-featureflags + - React-jsinspector + - React-jsinspectortracing + - React-perflogger + - React-timing + - ReactNativeDependencies + - React-RCTActionSheet (0.84.1): + - React-Core/RCTActionSheetHeaders (= 0.84.1) + - React-RCTAnimation (0.84.1): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTAnimationHeaders + - React-debug + - React-featureflags + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-RCTAppDelegate (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-CoreModules + - React-debug + - React-defaultsnativemodule + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-jsitooling + - React-NativeModulesApple + - React-RCTFabric + - React-RCTFBReactNativeSpec + - React-RCTImage + - React-RCTNetwork + - React-RCTRuntime + - React-rendererdebug + - React-RuntimeApple + - React-RuntimeCore + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon + - ReactNativeDependencies + - React-RCTBlob (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-Core/RCTBlobHeaders + - React-Core/RCTWebSocket + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - React-RCTNetwork + - ReactCommon + - ReactNativeDependencies + - React-RCTFabric (0.84.1): + - hermes-engine + - RCTSwiftUIWrapper + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-FabricComponents + - React-FabricImage + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-networking + - React-performancecdpmetrics + - React-performancetimeline + - React-RCTAnimation + - React-RCTFBReactNativeSpec + - React-RCTImage + - React-RCTText + - React-rendererconsistency + - React-renderercss + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-RCTFBReactNativeSpec (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec/components (= 0.84.1) + - ReactCommon + - ReactNativeDependencies + - React-RCTFBReactNativeSpec/components (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-NativeModulesApple + - React-rendererdebug + - React-utils + - ReactCommon + - ReactNativeDependencies + - Yoga + - React-RCTImage (0.84.1): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTImageHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - React-RCTNetwork + - ReactCommon + - ReactNativeDependencies + - React-RCTLinking (0.84.1): + - React-Core/RCTLinkingHeaders (= 0.84.1) + - React-jsi (= 0.84.1) + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactCommon/turbomodule/core (= 0.84.1) + - React-RCTNetwork (0.84.1): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTNetworkHeaders + - React-debug + - React-featureflags + - React-jsi + - React-jsinspectorcdp + - React-jsinspectornetwork + - React-NativeModulesApple + - React-networking + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-RCTRuntime (0.84.1): + - hermes-engine + - React-Core + - React-Core-prebuilt + - React-debug + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-RuntimeApple + - React-RuntimeCore + - React-runtimeexecutor + - React-RuntimeHermes + - React-utils + - ReactNativeDependencies + - React-RCTSettings (0.84.1): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTSettingsHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-RCTText (0.84.1): + - React-Core/RCTTextHeaders (= 0.84.1) + - Yoga + - React-RCTVibration (0.84.1): + - React-Core-prebuilt + - React-Core/RCTVibrationHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-rendererconsistency (0.84.1) + - React-renderercss (0.84.1): + - React-debug + - React-utils + - React-rendererdebug (0.84.1): + - React-Core-prebuilt + - React-debug + - ReactNativeDependencies + - React-RuntimeApple (0.84.1): + - hermes-engine + - React-callinvoker + - React-Core-prebuilt + - React-Core/Default + - React-CoreModules + - React-cxxreact + - React-featureflags + - React-jserrorhandler + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsitooling + - React-Mapbuffer + - React-NativeModulesApple + - React-RCTFabric + - React-RCTFBReactNativeSpec + - React-RuntimeCore + - React-runtimeexecutor + - React-RuntimeHermes + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - React-RuntimeCore (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-Fabric + - React-featureflags + - React-jserrorhandler + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsitooling + - React-performancetimeline + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - React-runtimeexecutor (0.84.1): + - React-Core-prebuilt + - React-debug + - React-featureflags + - React-jsi (= 0.84.1) + - React-utils + - ReactNativeDependencies + - React-RuntimeHermes (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-hermes + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-jsitracing + - React-RuntimeCore + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-runtimescheduler (0.84.1): + - hermes-engine + - React-callinvoker + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-jsi + - React-jsinspectortracing + - React-performancetimeline + - React-rendererconsistency + - React-rendererdebug + - React-runtimeexecutor + - React-timing + - React-utils + - ReactNativeDependencies + - React-timing (0.84.1): + - React-debug + - React-utils (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-debug + - React-jsi (= 0.84.1) + - ReactNativeDependencies + - React-webperformancenativemodule (0.84.1): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-jsi + - React-jsiexecutor + - React-performancetimeline + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - ReactAppDependencyProvider (0.84.1): + - ReactCodegen + - ReactCodegen (0.84.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-FabricImage + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-NativeModulesApple + - React-RCTAppDelegate + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - ReactCommon (0.84.1): + - React-Core-prebuilt + - ReactCommon/turbomodule (= 0.84.1) + - ReactNativeDependencies + - ReactCommon/turbomodule (0.84.1): + - hermes-engine + - React-callinvoker (= 0.84.1) + - React-Core-prebuilt + - React-cxxreact (= 0.84.1) + - React-jsi (= 0.84.1) + - React-logger (= 0.84.1) + - React-perflogger (= 0.84.1) + - ReactCommon/turbomodule/bridging (= 0.84.1) + - ReactCommon/turbomodule/core (= 0.84.1) + - ReactNativeDependencies + - ReactCommon/turbomodule/bridging (0.84.1): + - hermes-engine + - React-callinvoker (= 0.84.1) + - React-Core-prebuilt + - React-cxxreact (= 0.84.1) + - React-jsi (= 0.84.1) + - React-logger (= 0.84.1) + - React-perflogger (= 0.84.1) + - ReactNativeDependencies + - ReactCommon/turbomodule/core (0.84.1): + - hermes-engine + - React-callinvoker (= 0.84.1) + - React-Core-prebuilt + - React-cxxreact (= 0.84.1) + - React-debug (= 0.84.1) + - React-featureflags (= 0.84.1) + - React-jsi (= 0.84.1) + - React-logger (= 0.84.1) + - React-perflogger (= 0.84.1) + - React-utils (= 0.84.1) + - ReactNativeDependencies + - ReactNativeDependencies (0.84.1) + - ReactNativeHost (0.5.19): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTAppDelegate + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - ReactTestApp-DevSupport (5.1.0): + - React-Core + - React-jsi + - ReactTestApp-Resources (1.0.0-dev) + - SwiftyRSA (1.7.0): + - SwiftyRSA/ObjC (= 1.7.0) + - SwiftyRSA/ObjC (1.7.0) + - Yoga (0.0.0) + +DEPENDENCIES: + - "callstack-repack (from `../node_modules/@callstack/repack`)" + - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) + - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) + - RCTDeprecation (from `../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) + - RCTRequired (from `../node_modules/react-native/Libraries/Required`) + - RCTSwiftUI (from `../node_modules/react-native/ReactApple/RCTSwiftUI`) + - RCTSwiftUIWrapper (from `../node_modules/react-native/ReactApple/RCTSwiftUIWrapper`) + - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) + - React (from `../node_modules/react-native/`) + - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) + - React-Core (from `../node_modules/react-native/`) + - React-Core-prebuilt (from `../node_modules/react-native/React-Core-prebuilt.podspec`) + - React-Core/RCTWebSocket (from `../node_modules/react-native/`) + - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) + - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) + - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) + - React-defaultsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/defaults`) + - React-domnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/dom`) + - React-Fabric (from `../node_modules/react-native/ReactCommon`) + - React-FabricComponents (from `../node_modules/react-native/ReactCommon`) + - React-FabricImage (from `../node_modules/react-native/ReactCommon`) + - React-featureflags (from `../node_modules/react-native/ReactCommon/react/featureflags`) + - React-featureflagsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/featureflags`) + - React-graphics (from `../node_modules/react-native/ReactCommon/react/renderer/graphics`) + - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) + - React-idlecallbacksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks`) + - React-ImageManager (from `../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) + - React-intersectionobservernativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/intersectionobserver`) + - React-jserrorhandler (from `../node_modules/react-native/ReactCommon/jserrorhandler`) + - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) + - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) + - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector-modern`) + - React-jsinspectorcdp (from `../node_modules/react-native/ReactCommon/jsinspector-modern/cdp`) + - React-jsinspectornetwork (from `../node_modules/react-native/ReactCommon/jsinspector-modern/network`) + - React-jsinspectortracing (from `../node_modules/react-native/ReactCommon/jsinspector-modern/tracing`) + - React-jsitooling (from `../node_modules/react-native/ReactCommon/jsitooling`) + - React-jsitracing (from `../node_modules/react-native/ReactCommon/hermes/executor/`) + - React-logger (from `../node_modules/react-native/ReactCommon/logger`) + - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) + - React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`) + - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) + - React-networking (from `../node_modules/react-native/ReactCommon/react/networking`) + - React-oscompat (from `../node_modules/react-native/ReactCommon/oscompat`) + - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) + - React-performancecdpmetrics (from `../node_modules/react-native/ReactCommon/react/performance/cdpmetrics`) + - React-performancetimeline (from `../node_modules/react-native/ReactCommon/react/performance/timeline`) + - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) + - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) + - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) + - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) + - React-RCTFabric (from `../node_modules/react-native/React`) + - React-RCTFBReactNativeSpec (from `../node_modules/react-native/React`) + - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) + - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) + - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) + - React-RCTRuntime (from `../node_modules/react-native/React/Runtime`) + - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) + - React-RCTText (from `../node_modules/react-native/Libraries/Text`) + - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) + - React-rendererconsistency (from `../node_modules/react-native/ReactCommon/react/renderer/consistency`) + - React-renderercss (from `../node_modules/react-native/ReactCommon/react/renderer/css`) + - React-rendererdebug (from `../node_modules/react-native/ReactCommon/react/renderer/debug`) + - React-RuntimeApple (from `../node_modules/react-native/ReactCommon/react/runtime/platform/ios`) + - React-RuntimeCore (from `../node_modules/react-native/ReactCommon/react/runtime`) + - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) + - React-RuntimeHermes (from `../node_modules/react-native/ReactCommon/react/runtime`) + - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) + - React-timing (from `../node_modules/react-native/ReactCommon/react/timing`) + - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) + - React-webperformancenativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/webperformance`) + - ReactAppDependencyProvider (from `build/generated/ios/ReactAppDependencyProvider`) + - ReactCodegen (from `build/generated/ios/ReactCodegen`) + - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - ReactNativeDependencies (from `../node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec`) + - "ReactNativeHost (from `../node_modules/.pnpm/react-native-test-app@5.1.0_@react-native-community+cli-types@20.1.2_memfs@4.57.8_tslib_c20fa268d9d21a026c9e9e7083cd5d34/node_modules/@rnx-kit/react-native-host`)" + - ReactTestApp-DevSupport (from `../node_modules/react-native-test-app`) + - ReactTestApp-Resources (from `..`) + - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) + +SPEC REPOS: + trunk: + - JWTDecode + - SwiftyRSA + +EXTERNAL SOURCES: + callstack-repack: + :path: "../node_modules/@callstack/repack" + FBLazyVector: + :path: "../node_modules/react-native/Libraries/FBLazyVector" + hermes-engine: + :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" + :tag: hermes-v250829098.0.9 + RCTDeprecation: + :path: "../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation" + RCTRequired: + :path: "../node_modules/react-native/Libraries/Required" + RCTSwiftUI: + :path: "../node_modules/react-native/ReactApple/RCTSwiftUI" + RCTSwiftUIWrapper: + :path: "../node_modules/react-native/ReactApple/RCTSwiftUIWrapper" + RCTTypeSafety: + :path: "../node_modules/react-native/Libraries/TypeSafety" + React: + :path: "../node_modules/react-native/" + React-callinvoker: + :path: "../node_modules/react-native/ReactCommon/callinvoker" + React-Core: + :path: "../node_modules/react-native/" + React-Core-prebuilt: + :podspec: "../node_modules/react-native/React-Core-prebuilt.podspec" + React-CoreModules: + :path: "../node_modules/react-native/React/CoreModules" + React-cxxreact: + :path: "../node_modules/react-native/ReactCommon/cxxreact" + React-debug: + :path: "../node_modules/react-native/ReactCommon/react/debug" + React-defaultsnativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/defaults" + React-domnativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/dom" + React-Fabric: + :path: "../node_modules/react-native/ReactCommon" + React-FabricComponents: + :path: "../node_modules/react-native/ReactCommon" + React-FabricImage: + :path: "../node_modules/react-native/ReactCommon" + React-featureflags: + :path: "../node_modules/react-native/ReactCommon/react/featureflags" + React-featureflagsnativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/featureflags" + React-graphics: + :path: "../node_modules/react-native/ReactCommon/react/renderer/graphics" + React-hermes: + :path: "../node_modules/react-native/ReactCommon/hermes" + React-idlecallbacksnativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks" + React-ImageManager: + :path: "../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" + React-intersectionobservernativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/intersectionobserver" + React-jserrorhandler: + :path: "../node_modules/react-native/ReactCommon/jserrorhandler" + React-jsi: + :path: "../node_modules/react-native/ReactCommon/jsi" + React-jsiexecutor: + :path: "../node_modules/react-native/ReactCommon/jsiexecutor" + React-jsinspector: + :path: "../node_modules/react-native/ReactCommon/jsinspector-modern" + React-jsinspectorcdp: + :path: "../node_modules/react-native/ReactCommon/jsinspector-modern/cdp" + React-jsinspectornetwork: + :path: "../node_modules/react-native/ReactCommon/jsinspector-modern/network" + React-jsinspectortracing: + :path: "../node_modules/react-native/ReactCommon/jsinspector-modern/tracing" + React-jsitooling: + :path: "../node_modules/react-native/ReactCommon/jsitooling" + React-jsitracing: + :path: "../node_modules/react-native/ReactCommon/hermes/executor/" + React-logger: + :path: "../node_modules/react-native/ReactCommon/logger" + React-Mapbuffer: + :path: "../node_modules/react-native/ReactCommon" + React-microtasksnativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks" + React-NativeModulesApple: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" + React-networking: + :path: "../node_modules/react-native/ReactCommon/react/networking" + React-oscompat: + :path: "../node_modules/react-native/ReactCommon/oscompat" + React-perflogger: + :path: "../node_modules/react-native/ReactCommon/reactperflogger" + React-performancecdpmetrics: + :path: "../node_modules/react-native/ReactCommon/react/performance/cdpmetrics" + React-performancetimeline: + :path: "../node_modules/react-native/ReactCommon/react/performance/timeline" + React-RCTActionSheet: + :path: "../node_modules/react-native/Libraries/ActionSheetIOS" + React-RCTAnimation: + :path: "../node_modules/react-native/Libraries/NativeAnimation" + React-RCTAppDelegate: + :path: "../node_modules/react-native/Libraries/AppDelegate" + React-RCTBlob: + :path: "../node_modules/react-native/Libraries/Blob" + React-RCTFabric: + :path: "../node_modules/react-native/React" + React-RCTFBReactNativeSpec: + :path: "../node_modules/react-native/React" + React-RCTImage: + :path: "../node_modules/react-native/Libraries/Image" + React-RCTLinking: + :path: "../node_modules/react-native/Libraries/LinkingIOS" + React-RCTNetwork: + :path: "../node_modules/react-native/Libraries/Network" + React-RCTRuntime: + :path: "../node_modules/react-native/React/Runtime" + React-RCTSettings: + :path: "../node_modules/react-native/Libraries/Settings" + React-RCTText: + :path: "../node_modules/react-native/Libraries/Text" + React-RCTVibration: + :path: "../node_modules/react-native/Libraries/Vibration" + React-rendererconsistency: + :path: "../node_modules/react-native/ReactCommon/react/renderer/consistency" + React-renderercss: + :path: "../node_modules/react-native/ReactCommon/react/renderer/css" + React-rendererdebug: + :path: "../node_modules/react-native/ReactCommon/react/renderer/debug" + React-RuntimeApple: + :path: "../node_modules/react-native/ReactCommon/react/runtime/platform/ios" + React-RuntimeCore: + :path: "../node_modules/react-native/ReactCommon/react/runtime" + React-runtimeexecutor: + :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" + React-RuntimeHermes: + :path: "../node_modules/react-native/ReactCommon/react/runtime" + React-runtimescheduler: + :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" + React-timing: + :path: "../node_modules/react-native/ReactCommon/react/timing" + React-utils: + :path: "../node_modules/react-native/ReactCommon/react/utils" + React-webperformancenativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/webperformance" + ReactAppDependencyProvider: + :path: build/generated/ios/ReactAppDependencyProvider + ReactCodegen: + :path: build/generated/ios/ReactCodegen + ReactCommon: + :path: "../node_modules/react-native/ReactCommon" + ReactNativeDependencies: + :podspec: "../node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec" + ReactNativeHost: + :path: "../node_modules/.pnpm/react-native-test-app@5.1.0_@react-native-community+cli-types@20.1.2_memfs@4.57.8_tslib_c20fa268d9d21a026c9e9e7083cd5d34/node_modules/@rnx-kit/react-native-host" + ReactTestApp-DevSupport: + :path: "../node_modules/react-native-test-app" + ReactTestApp-Resources: + :path: ".." + Yoga: + :path: "../node_modules/react-native/ReactCommon/yoga" + +SPEC CHECKSUMS: + callstack-repack: ac761bfc09e2d4c5946bcbe5d1ee7518aae8ac58 + FBLazyVector: e97c19a5a442429d1988f182a1940fb08df514da + hermes-engine: da5fd6f422bc00c802d445ebf33c05553b72c038 + JWTDecode: 2eed97c2fa46ccaf3049a787004eedf0be474a87 + RCTDeprecation: af44b104091a34482596cd9bd7e8d90c4e9b4bd7 + RCTRequired: bb77b070f75f53398ce43c0aaaa58337cebe2bf6 + RCTSwiftUI: afc0a0a635860da1040a0b894bfd529da06d7810 + RCTSwiftUIWrapper: cbb32eb90f09bd42ea9ed1eecd51fef3294da673 + RCTTypeSafety: d13e192a37f151ce354641184bf4239844a3be17 + React: 1ba7d364ade7d883a1ec055bfc3606f35fdee17b + React-callinvoker: bc2a26f8d84fb01f003fc6de6c9337b64715f95b + React-Core: bdaa87b276ca31877632a982ecf7c36f8c826414 + React-Core-prebuilt: 27887b0d16370aa651ff972a82099e70679c7317 + React-CoreModules: b24989f62d56390ae08ca4f65e6f38fe6802de42 + React-cxxreact: 1a2dfcbc18a6b610664dba152adf327f063a0d12 + React-debug: 755200a6e7f5e6e0a40ff8d215493d43cce285fc + React-defaultsnativemodule: 027cad46a2847719b5d3d20dd915463b06a5d4d1 + React-domnativemodule: 5ddfc6b3b73b48a31dfa12f52d6b62527f6f260c + React-Fabric: 6ffcc768e2378e84ed428069c7e2d270ee78f2bf + React-FabricComponents: ee6614287222dd4f04fdb1263d1ae6eb7fe952c6 + React-FabricImage: ab05740a08ad9e23e4e1701e9c354e9a9b048063 + React-featureflags: a8b0c8d9a93b5903f7620408659de160d95e4efe + React-featureflagsnativemodule: 0f0fe1a044829f31d7565a4bdfded376fbcfdfc1 + React-graphics: c497dd295c88729525a4752d524d2d783aa205d4 + React-hermes: c2bde95033e6df1599b5c1b6d7e45736a8aa5cba + React-idlecallbacksnativemodule: 6ceacabe93be052bbe822fb018602f63a8e280e2 + React-ImageManager: 820fe1d55add59ec053099a0c5abe830ecd6c699 + React-intersectionobservernativemodule: f84958aaf662f95f837dc4d26cbb5e7dcc4b8f09 + React-jserrorhandler: 390c6c46e2f639b5ba104385d7fba848396347e8 + React-jsi: 382de7964299bbf878458006a14f52cb66a36cfc + React-jsiexecutor: b781400a9becfb24e36ac063dccb42a52dcb44ca + React-jsinspector: 0644f32cc9b09eae2bc845ceb58d03420ae70821 + React-jsinspectorcdp: 96677569865afe25c737889e02d635db26131d9f + React-jsinspectornetwork: 28c7cac2e92b1739561dcffd07f5554e54050a85 + React-jsinspectortracing: 58ee96f9580a143011f8b914ad6927b5116461a7 + React-jsitooling: bc79639489d610c35731dd26e8e54c37e078996d + React-jsitracing: 1bb9fae4f2ccf891255a419cdfc13372d07ef4a5 + React-logger: 517377b1d2ba7ac722d47fb2183b98de86632063 + React-Mapbuffer: 45e088dfb58dc326ae20cca1814d3726553c4cad + React-microtasksnativemodule: ab9d1a05fe1f58ea44a97d307ef1b53463f45a3f + React-NativeModulesApple: b94faa2dce6d8c0a9d722ed7ee27b996d28b62d1 + React-networking: e409d8fb062162da6293e98b77f8d80cf4430e07 + React-oscompat: ff26abf0ae3e3fdbe47b44224571e3fc7226a573 + React-perflogger: 757c8c725cc20e94eba406885047f03cf83044fb + React-performancecdpmetrics: fec7e28b711c95ccb6fc7e3bb16572d88bcf27ae + React-performancetimeline: 4c6102f19df01db35c37a3e63a058cfbf1a056d9 + React-RCTActionSheet: fc1d5d419856868e7f8c13c14591ed63dadef43a + React-RCTAnimation: 1ce166ec15ab1f8eca8ebaae7f8f709d9be6958c + React-RCTAppDelegate: c752d93f597168a9a4d5678e9354bbb8d84df6d1 + React-RCTBlob: 147d41ee9f80cf27fe9b2f7adc1d6d24f68ec3fc + React-RCTFabric: 712c4ad749a43712609011d178234c90a17cde12 + React-RCTFBReactNativeSpec: 032ea8783dc27290ec6b9af9d8df5351847539a2 + React-RCTImage: fd39f1c478f1e43357bc72c2dbdc2454aafe4035 + React-RCTLinking: 02ca1c83536dab08130f5db4852f293c53885dd6 + React-RCTNetwork: 85dc64c530e4b0be7436f9a15b03caba24e9a3a1 + React-RCTRuntime: c75950caa80e6884cbf0417d8738992256890508 + React-RCTSettings: df5da31865cc1bab7ef5314e65ca18f6b538d71d + React-RCTText: 41587e426883c9a83fd8eb0c57fe328aad4ed57a + React-RCTVibration: 8ca2f9839c53416dffb584adb94501431ba7f96e + React-rendererconsistency: e91aba4bb482dac127ad955dba6333a8af629c5b + React-renderercss: 1f15a79f3cc3c9416902b8f70266408116d93bd0 + React-rendererdebug: 77dcf1490ee5c0ce141d2b1eaceed02aa0996826 + React-RuntimeApple: 1074835708500a69770b713f718400137f30ce7a + React-RuntimeCore: 148db945742d7ce2985cc35b8ddc61edfdb46e6d + React-runtimeexecutor: 5742146dac0f8de9c21f5f703993df249c046d0d + React-RuntimeHermes: a5bb378bea92d526341a65afa945a38c9bc787b2 + React-runtimescheduler: 91838dd32460920ed1b4da68590a2684b784aacc + React-timing: 9c0e2b1532317148fa0487bbc3833c1f348981a0 + React-utils: 2f8dd43fed5c6d881ac5971666bbb34cc4a03fa1 + React-webperformancenativemodule: afbee7a9fd0b5bf92f6765eb41767f865b293bcc + ReactAppDependencyProvider: 26bbf1e26768d08dd965a2b5e372e53f67b21fee + ReactCodegen: 42e524ec41d02c516ce8b35bd44b8b75dc4c7fcf + ReactCommon: 309419492d417c4cbb87af06f67735afa40ecb9d + ReactNativeDependencies: 870a3b61809578eb6379bad33a343d92766c0c08 + ReactNativeHost: 20818d27dd5e0bec793bd0003d1f10d36feac923 + ReactTestApp-DevSupport: 0520f3f0e6f13e2d915fc146389c855c94117c2b + ReactTestApp-Resources: c23f2e686b950af8ff3086201cf738e16cbf068d + SwiftyRSA: 8c6dd1ea7db1b8dc4fb517a202f88bb1354bc2c6 + Yoga: c0b3f2c7e8d3e327e450223a2414ca3fa296b9a2 + +PODFILE CHECKSUM: ffac462424742325a2ad7e4b3328caeaf7ca6cc3 + +COCOAPODS: 1.15.2 diff --git a/apps/tester-app-rspack1/package.json b/apps/tester-app-rspack1/package.json new file mode 100644 index 000000000..36a9556e6 --- /dev/null +++ b/apps/tester-app-rspack1/package.json @@ -0,0 +1,29 @@ +{ + "name": "tester-app-rspack1", + "version": "0.0.1", + "private": true, + "scripts": { + "pack-repack": "cd ../../packages/repack && pnpm build && pnpm pack --pack-destination ../../apps/tester-app-rspack1/.repack-pack && cd ../../apps/tester-app-rspack1 && mv .repack-pack/*.tgz callstack-repack.tgz && rmdir .repack-pack", + "android": "react-native run-android --appId com.testerapprspack1 --no-packager", + "ios": "react-native run-ios --no-packager", + "pods": "(cd ios && bundle install && (bundle exec pod install || bundle exec pod update))", + "start": "react-native webpack-start", + "bundle:android": "react-native webpack-bundle --platform android --entry-file index.js --dev=false --bundle-output build/output/android/index.android.bundle --assets-dest build/output/android/res", + "bundle:ios": "react-native webpack-bundle --platform ios --entry-file index.js --dev=false --bundle-output build/output/ios/main.jsbundle --assets-dest build/output/ios" + }, + "dependencies": { + "react": "19.2.3", + "react-native": "0.84.1" + }, + "devDependencies": { + "@babel/core": "^7.25.2", + "@callstack/repack": "file:./callstack-repack.tgz", + "@react-native-community/cli": "20.1.2", + "@react-native-community/cli-platform-android": "20.1.2", + "@react-native-community/cli-platform-ios": "20.1.2", + "@react-native/babel-preset": "0.84.1", + "@rspack/core": "^1.7.12", + "@swc/helpers": "~0.5.17", + "react-native-test-app": "5.1.0" + } +} diff --git a/apps/tester-app-rspack1/pnpm-workspace.yaml b/apps/tester-app-rspack1/pnpm-workspace.yaml new file mode 100644 index 000000000..cf81b03a4 --- /dev/null +++ b/apps/tester-app-rspack1/pnpm-workspace.yaml @@ -0,0 +1,4 @@ +# Marks this directory as its own workspace root, so pnpm treats it as a +# standalone project instead of a member of the repository workspace. +# See README.md for why this app must stay outside the workspace. +packages: [] diff --git a/apps/tester-app-rspack1/react-native.config.js b/apps/tester-app-rspack1/react-native.config.js new file mode 100644 index 000000000..d01dff358 --- /dev/null +++ b/apps/tester-app-rspack1/react-native.config.js @@ -0,0 +1,13 @@ +const { configureProjects } = require('react-native-test-app'); + +module.exports = { + project: configureProjects({ + android: { + sourceDir: 'android', + }, + ios: { + sourceDir: 'ios', + }, + }), + commands: require('@callstack/repack/commands/rspack'), +}; diff --git a/apps/tester-app-rspack1/rspack.config.mjs b/apps/tester-app-rspack1/rspack.config.mjs new file mode 100644 index 000000000..0d9e7fa24 --- /dev/null +++ b/apps/tester-app-rspack1/rspack.config.mjs @@ -0,0 +1,50 @@ +import * as Repack from '@callstack/repack'; + +const dirname = Repack.getDirname(import.meta.url); + +export default Repack.defineRspackConfig((env) => { + const { + mode = 'development', + context = dirname, + platform = process.env.PLATFORM, + } = env; + if (!platform) { + throw new Error('Missing platform'); + } + + return { + mode, + context, + entry: './index.js', + resolve: { + ...Repack.getResolveOptions(), + }, + output: { + uniqueName: 'tester-app-rspack1', + }, + module: { + rules: [ + { + test: /\.[cm]?[jt]sx?$/, + use: { + loader: '@callstack/repack/babel-swc-loader', + parallel: true, + options: {}, + }, + type: 'javascript/auto', + }, + { + test: Repack.getAssetExtensionsRegExp(Repack.ASSET_EXTENSIONS), + use: '@callstack/repack/assets-loader', + }, + ], + }, + plugins: [ + new Repack.RepackPlugin({ + // keep every async chunk on the filesystem so release builds work + // without a remote server + extraChunks: [{ include: /.*/, type: 'local' }], + }), + ], + }; +}); diff --git a/apps/tester-app-rspack1/src/App.tsx b/apps/tester-app-rspack1/src/App.tsx new file mode 100644 index 000000000..3ba5d216c --- /dev/null +++ b/apps/tester-app-rspack1/src/App.tsx @@ -0,0 +1,30 @@ +import { SafeAreaView, ScrollView, StyleSheet, Text, View } from 'react-native'; +import { AsyncContainer } from './AsyncContainer'; + +const App = () => { + return ( + + + TesterAppRspack1 + + Async chunk + + + + HMR test + HMR target + + + + ); +}; + +const styles = StyleSheet.create({ + root: { flex: 1, backgroundColor: '#fff' }, + scroll: { padding: 16, gap: 16 }, + title: { fontSize: 24, fontWeight: 'bold' }, + section: { gap: 8 }, + heading: { fontSize: 18, fontWeight: '600' }, +}); + +export default App; diff --git a/apps/tester-app-rspack1/src/Async.local.tsx b/apps/tester-app-rspack1/src/Async.local.tsx new file mode 100644 index 000000000..ff6b6f064 --- /dev/null +++ b/apps/tester-app-rspack1/src/Async.local.tsx @@ -0,0 +1,5 @@ +import { Text } from 'react-native'; + +const Async = () => Async: this text comes from async chunk; + +export default Async; diff --git a/apps/tester-app-rspack1/src/AsyncContainer.tsx b/apps/tester-app-rspack1/src/AsyncContainer.tsx new file mode 100644 index 000000000..1f5dbd676 --- /dev/null +++ b/apps/tester-app-rspack1/src/AsyncContainer.tsx @@ -0,0 +1,12 @@ +import React from 'react'; +import { Text } from 'react-native'; + +const Async = React.lazy(() => import('./Async.local')); + +export const AsyncContainer = () => { + return ( + Loading async chunk...}> + + + ); +}; diff --git a/apps/tester-app-rspack1/src/setup.ts b/apps/tester-app-rspack1/src/setup.ts new file mode 100644 index 000000000..53e82524a --- /dev/null +++ b/apps/tester-app-rspack1/src/setup.ts @@ -0,0 +1,16 @@ +import { Script, ScriptManager } from '@callstack/repack/client'; + +ScriptManager.shared.addResolver(async (scriptId) => { + if (__DEV__) { + return { + url: Script.getDevServerURL(scriptId), + cache: false, + }; + } + + // all chunks are configured as `local` - read them from the app bundle + return { + url: Script.getFileSystemURL(scriptId), + cache: false, + }; +}); diff --git a/apps/tester-app/ios/Podfile.lock b/apps/tester-app/ios/Podfile.lock index 294964d6a..d7df30511 100644 --- a/apps/tester-app/ios/Podfile.lock +++ b/apps/tester-app/ios/Podfile.lock @@ -21,7 +21,7 @@ PODS: - ReactCommon/turbomodule/core - ReactNativeDependencies - Yoga - - callstack-repack (5.2.4): + - callstack-repack (5.2.5): - hermes-engine - JWTDecode (~> 3.0.0) - RCTRequired @@ -2201,7 +2201,7 @@ DEPENDENCIES: - ReactCodegen (from `build/generated/ios/ReactCodegen`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - ReactNativeDependencies (from `../node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec`) - - "ReactNativeHost (from `../../../node_modules/.pnpm/react-native-test-app@5.1.0_react-native@0.84.1_@babel+core@7.25.2_@react-native-community+cl_ud36qqqczp7xfpwwlwshp326ei/node_modules/@rnx-kit/react-native-host`)" + - "ReactNativeHost (from `../../../node_modules/.pnpm/react-native-test-app@5.1.0_react-native@0.84.1_@babel+core@7.25.2_@react-native-commun_f26b7d0f2318c9dfa8ca60eadb230840/node_modules/@rnx-kit/react-native-host`)" - ReactTestApp-DevSupport (from `../node_modules/react-native-test-app`) - ReactTestApp-Resources (from `..`) - RNReanimated (from `../node_modules/react-native-reanimated`) @@ -2367,7 +2367,7 @@ EXTERNAL SOURCES: ReactNativeDependencies: :podspec: "../node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec" ReactNativeHost: - :path: "../../../node_modules/.pnpm/react-native-test-app@5.1.0_react-native@0.84.1_@babel+core@7.25.2_@react-native-community+cl_ud36qqqczp7xfpwwlwshp326ei/node_modules/@rnx-kit/react-native-host" + :path: "../../../node_modules/.pnpm/react-native-test-app@5.1.0_react-native@0.84.1_@babel+core@7.25.2_@react-native-commun_f26b7d0f2318c9dfa8ca60eadb230840/node_modules/@rnx-kit/react-native-host" ReactTestApp-DevSupport: :path: "../node_modules/react-native-test-app" ReactTestApp-Resources: @@ -2383,9 +2383,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: AsyncStorage: 0a927dc82ea8eaa0350779b37d73b11d070ea677 - callstack-repack: a35688de295884a73fadb39448d91c1c0905bb9e + callstack-repack: ac761bfc09e2d4c5946bcbe5d1ee7518aae8ac58 FBLazyVector: e97c19a5a442429d1988f182a1940fb08df514da - hermes-engine: f317b2ce95bb923bfd26a3a6ac85ca7c18eb936a + hermes-engine: 65a8d78c7ddbd165206fa2023950b4fbbe9ae74f JWTDecode: 2eed97c2fa46ccaf3049a787004eedf0be474a87 RCTDeprecation: af44b104091a34482596cd9bd7e8d90c4e9b4bd7 RCTRequired: bb77b070f75f53398ce43c0aaaa58337cebe2bf6 @@ -2395,7 +2395,7 @@ SPEC CHECKSUMS: React: 1ba7d364ade7d883a1ec055bfc3606f35fdee17b React-callinvoker: bc2a26f8d84fb01f003fc6de6c9337b64715f95b React-Core: bdaa87b276ca31877632a982ecf7c36f8c826414 - React-Core-prebuilt: 884854d96d5348d5ccc4458bf7966157d3d6e6df + React-Core-prebuilt: 8cc1199f6bea6dd09e23827d44673cf1a75c6879 React-CoreModules: b24989f62d56390ae08ca4f65e6f38fe6802de42 React-cxxreact: 1a2dfcbc18a6b610664dba152adf327f063a0d12 React-debug: 755200a6e7f5e6e0a40ff8d215493d43cce285fc @@ -2455,15 +2455,15 @@ SPEC CHECKSUMS: React-utils: 2f8dd43fed5c6d881ac5971666bbb34cc4a03fa1 React-webperformancenativemodule: afbee7a9fd0b5bf92f6765eb41767f865b293bcc ReactAppDependencyProvider: 26bbf1e26768d08dd965a2b5e372e53f67b21fee - ReactCodegen: 5e772d048f7dd41685b365f76f0d424adf884d52 + ReactCodegen: f2be4b209e7253cbfeb6e089156b4c9b974170f0 ReactCommon: 309419492d417c4cbb87af06f67735afa40ecb9d - ReactNativeDependencies: 767b6ece1facd2f4df1f47fc434f0f9d0e5da963 + ReactNativeDependencies: dd5e73a0e936bb10ff93634e7c0292d485fde937 ReactNativeHost: 36390b077b4717e51a2bdb4b3a48b121821f4a74 ReactTestApp-DevSupport: 0520f3f0e6f13e2d915fc146389c855c94117c2b ReactTestApp-Resources: 8d72c3deef156833760694a288ff334af4d427d7 - RNReanimated: 2483e62686494657737c421f5162fa851d805306 + RNReanimated: 83187f37b09cea8336bcacbd0c03e1e9658e81d9 RNSVG: 13970bfde0ea9c9e10e01ab0d7b4a6cde11fca1b - RNWorklets: e1d046d6c92e3262c929ba4554ffc59d1416e7c8 + RNWorklets: 52ea154a166723dc08b373fe3f50fca13180eecd SwiftyRSA: 8c6dd1ea7db1b8dc4fb517a202f88bb1354bc2c6 Yoga: c0b3f2c7e8d3e327e450223a2414ca3fa296b9a2 diff --git a/apps/tester-app/package.json b/apps/tester-app/package.json index 4ccfec01e..c58ca2bdc 100644 --- a/apps/tester-app/package.json +++ b/apps/tester-app/package.json @@ -45,6 +45,7 @@ "@react-native/typescript-config": "catalog:testers", "@rsdoctor/rspack-plugin": "^1.5.2", "@rspack/core": "catalog:", + "@rspack/plugin-react-refresh": "catalog:", "@svgr/webpack": "^8.1.0", "@swc/core": "^1.13.3", "@swc/helpers": "catalog:", @@ -57,6 +58,7 @@ "postcss": "^8.4.49", "postcss-loader": "^8.1.1", "react-native-test-app": "catalog:testers", + "react-refresh": "^0.18.0", "tailwindcss": "^3.4.17", "terser-webpack-plugin": "catalog:", "thread-loader": "^4.0.4", diff --git a/apps/tester-federation-v2/package.json b/apps/tester-federation-v2/package.json index ff297e34b..b528253c7 100644 --- a/apps/tester-federation-v2/package.json +++ b/apps/tester-federation-v2/package.json @@ -31,6 +31,7 @@ "@react-native-community/cli-platform-android": "catalog:testers", "@rsdoctor/rspack-plugin": "^1.5.2", "@rspack/core": "catalog:", + "@rspack/plugin-react-refresh": "catalog:", "@swc/helpers": "catalog:", "@types/jest": "^29.5.13", "@types/react": "catalog:testers", diff --git a/apps/tester-federation/package.json b/apps/tester-federation/package.json index f824fb515..0e31bc91f 100644 --- a/apps/tester-federation/package.json +++ b/apps/tester-federation/package.json @@ -36,6 +36,7 @@ "@react-native/typescript-config": "catalog:testers", "@rsdoctor/rspack-plugin": "^1.5.2", "@rspack/core": "catalog:", + "@rspack/plugin-react-refresh": "catalog:", "@swc/helpers": "catalog:", "@types/jest": "^29.5.13", "@types/react": "catalog:testers", diff --git a/biome.jsonc b/biome.jsonc index 802f920b5..db9ccffb1 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -19,6 +19,7 @@ "bracketSpacing": true, "ignore": [ "pnpm-lock.yaml", + "packages/repack/vendor/**", "tests/metro-compat/**/__tests__/**", "website/src/2.x/**", "website/src/3.x/**", @@ -27,7 +28,11 @@ }, "organizeImports": { "enabled": true, - "ignore": ["templates/*", "tests/metro-compat/**/__tests__/**"] + "ignore": [ + "templates/*", + "packages/repack/vendor/**", + "tests/metro-compat/**/__tests__/**" + ] }, "linter": { "enabled": true, @@ -55,7 +60,11 @@ "noConfusingVoidType": "off" } }, - "ignore": ["templates/*", "tests/metro-compat/**/__tests__/**"] + "ignore": [ + "templates/*", + "packages/repack/vendor/**", + "tests/metro-compat/**/__tests__/**" + ] }, "javascript": { "formatter": { diff --git a/packages/repack/jest.config.js b/packages/repack/jest.config.js index 950eee740..b9857e366 100644 --- a/packages/repack/jest.config.js +++ b/packages/repack/jest.config.js @@ -2,8 +2,9 @@ module.exports = { clearMocks: true, moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', + '^@rspack/core$': '/jest.rspack-core-bridge.js', }, setupFiles: ['./jest.setup.js'], - testEnvironment: 'node', + testEnvironment: '/jest.environment.js', testMatch: ['**/__tests__/**/*.ts?(x)'], }; diff --git a/packages/repack/jest.environment.js b/packages/repack/jest.environment.js new file mode 100644 index 000000000..d4846842a --- /dev/null +++ b/packages/repack/jest.environment.js @@ -0,0 +1,32 @@ +const { TestEnvironment: NodeEnvironment } = require('jest-environment-node'); + +/** + * @rspack/core v2 is published as a pure ESM package, which Jest's sandboxed + * CJS module runtime cannot load (even `createRequire` inside the sandbox is + * wrapped by Jest and loops back into the module registry). + * + * Test environments are loaded outside the Jest sandbox with Node's real + * module system, where loading ESM through `require()`/`import()` is + * supported. Load @rspack/core here and expose it to the sandbox via a + * global - see jest.rspack-core-bridge.js for the consuming side. + * + * The environment is parameterized on RSPACK_MAJOR (default 2) so the suite + * can run against both supported Rspack majors: + * - v2: `await import('@rspack/core')` (ESM-only package), + * - v1: plain `require` of the aliased `@rspack/core-v1` devDependency - the + * package is CJS, and requiring it directly sidesteps any reliance on + * cjs-module-lexer named-export synthesis. + * `__RSPACK_MAJOR__` is exposed alongside so tests can gate major-specific + * assertions. + */ +class RspackCoreEnvironment extends NodeEnvironment { + async setup() { + await super.setup(); + const major = Number(process.env.RSPACK_MAJOR ?? '2'); + this.global.__RSPACK_CORE__ = + major === 1 ? require('@rspack/core-v1') : await import('@rspack/core'); + this.global.__RSPACK_MAJOR__ = major; + } +} + +module.exports = RspackCoreEnvironment; diff --git a/packages/repack/jest.rspack-core-bridge.js b/packages/repack/jest.rspack-core-bridge.js new file mode 100644 index 000000000..39703a0c1 --- /dev/null +++ b/packages/repack/jest.rspack-core-bridge.js @@ -0,0 +1,18 @@ +// @rspack/core v2 is published as a pure ESM package, which Jest's sandboxed +// CJS module runtime cannot load. The real module is loaded natively by the +// custom test environment (jest.environment.js) and exposed via a global; +// this bridge maps `require('@rspack/core')` inside tests onto it. +// +// The `__esModule` marker keeps Babel's import interop treating this as an +// ESM-like namespace, so named imports (`import { rspack } from '@rspack/core'`) +// keep working. +const core = globalThis.__RSPACK_CORE__; + +if (!core) { + throw new Error( + '@rspack/core was not preloaded by the test environment - ' + + 'make sure jest.environment.js is set as the testEnvironment' + ); +} + +module.exports = { __esModule: true, ...core, default: core.default ?? core }; diff --git a/packages/repack/package.json b/packages/repack/package.json index da0b7402c..e7bc31762 100644 --- a/packages/repack/package.json +++ b/packages/repack/package.json @@ -26,6 +26,7 @@ "client", "commands", "mf", + "vendor", "callstack-repack.podspec", "src/modules/ScriptManager/NativeScriptManager.ts" ], @@ -56,6 +57,7 @@ "build:ts": "tsc -p tsconfig.build.json --emitDeclarationOnly", "build": "pnpm run \"/^build:.*/\"", "test": "jest", + "test:rspack1": "cross-env RSPACK_MAJOR=1 jest", "typecheck": "tsc --noEmit", "archive": "pnpm build && pnpm pack", "clang-format": "pnpm clang-format:ios && pnpm clang-format:android", @@ -65,6 +67,7 @@ "peerDependencies": { "@module-federation/enhanced": ">=0.6.10", "@rspack/core": ">=1", + "@rspack/plugin-react-refresh": "^2.0.0", "react-native": ">=0.74", "webpack": ">=5.90" }, @@ -75,6 +78,9 @@ "@rspack/core": { "optional": true }, + "@rspack/plugin-react-refresh": { + "optional": true + }, "webpack": { "optional": true } @@ -82,7 +88,6 @@ "dependencies": { "@callstack/repack-dev-server": "workspace:*", "@discoveryjs/json-ext": "^0.5.7", - "@rspack/plugin-react-refresh": "1.0.0", "babel-loader": "^9.2.1", "colorette": "^2.0.20", "dedent": "^0.7.0", @@ -113,8 +118,10 @@ "@babel/plugin-transform-modules-commonjs": "^7.23.2", "@module-federation/enhanced": "0.8.9", "@module-federation/sdk": "0.6.10", - "@rspack/core": "catalog:", - "@swc/helpers": "catalog:", + "@rspack/core": "^2.1.2", + "@rspack/core-v1": "npm:@rspack/core@^1.7.12", + "@rspack/plugin-react-refresh": "^2.0.2", + "@swc/helpers": "^0.5.23", "@types/babel__core": "^7.20.5", "@types/dedent": "^0.7.0", "@types/gradient-string": "^1.1.6", @@ -127,6 +134,7 @@ "@types/shallowequal": "^1.1.1", "babel-jest": "^29.7.0", "clang-format": "^1.8.0", + "cross-env": "^7.0.3", "jest": "^29.7.0", "react": "catalog:", "react-native": "catalog:", diff --git a/packages/repack/src/__tests__/rspackTestLane.test.ts b/packages/repack/src/__tests__/rspackTestLane.test.ts new file mode 100644 index 000000000..a5fbed3bb --- /dev/null +++ b/packages/repack/src/__tests__/rspackTestLane.test.ts @@ -0,0 +1,10 @@ +import { rspackVersion } from '@rspack/core'; + +// Guards the dual-major test wiring itself: the custom Jest environment +// (jest.environment.js) loads @rspack/core v2 by default and the aliased +// @rspack/core-v1 under RSPACK_MAJOR=1. If the env var stops being honored, +// the "v1 lane" silently tests v2 twice - this catches that. +test('the loaded @rspack/core major matches the requested RSPACK_MAJOR lane', () => { + const requested = Number(process.env.RSPACK_MAJOR ?? '2'); + expect(Number(rspackVersion.split('.')[0])).toBe(requested); +}); diff --git a/packages/repack/src/commands/common/config/getRepackConfig.ts b/packages/repack/src/commands/common/config/getRepackConfig.ts index cc4269174..d0c306c08 100644 --- a/packages/repack/src/commands/common/config/getRepackConfig.ts +++ b/packages/repack/src/commands/common/config/getRepackConfig.ts @@ -1,8 +1,30 @@ +import { getRspackMajorVersion } from '../../../helpers/index.js'; import { getMinimizerConfig } from './getMinimizerConfig.js'; -function getExperimentsConfig(bundler: 'rspack' | 'webpack') { +function getExperimentsConfig(bundler: 'rspack' | 'webpack', rootDir: string) { if (bundler === 'rspack') { - return { parallelLoader: true }; + const rspackMajor = getRspackMajorVersion(rootDir) ?? 1; + if (rspackMajor < 2) { + return { parallelLoader: true }; + } + // Rspack 2 removed `experiments.parallelLoader` (parallel loading is + // stable and opt-in per rule via `use[].parallel`) - nothing to set. + } +} + +function getModuleConfig(bundler: 'rspack' | 'webpack', rootDir: string) { + if (bundler === 'rspack') { + const rspackMajor = getRspackMajorVersion(rootDir) ?? 1; + if (rspackMajor >= 2) { + // Rspack 2 changed the `exportsPresence` default from 'warn' to 'error', + // which breaks builds on invalid imports inside node_modules - a common + // occurrence in the React Native ecosystem that Metro tolerates. + // Restore Metro-like leniency by default; users can override this + // in their project config. + return { + parser: { javascript: { exportsPresence: 'auto' as const } }, + }; + } } } @@ -10,12 +32,14 @@ export async function getRepackConfig( bundler: 'rspack' | 'webpack', rootDir: string ) { - const experiments = getExperimentsConfig(bundler); + const experiments = getExperimentsConfig(bundler, rootDir); + const moduleConfiguration = getModuleConfig(bundler, rootDir); const minimizerConfiguration = await getMinimizerConfig(bundler, rootDir); return { devtool: 'source-map', experiments, + module: moduleConfiguration, output: { clean: true, hashFunction: 'xxhash64', diff --git a/packages/repack/src/commands/common/index.ts b/packages/repack/src/commands/common/index.ts index ce61289b7..bdae6df17 100644 --- a/packages/repack/src/commands/common/index.ts +++ b/packages/repack/src/commands/common/index.ts @@ -8,5 +8,6 @@ export * from './runAdbReverse.js'; export * from './setupEnvironment.js'; export * from './setupInteractions.js'; export * from './setupStatsWriter.js'; +export * from './warnLegacyRspackCacheConfig.js'; export * from './config/makeCompilerConfig.js'; diff --git a/packages/repack/src/commands/common/resetPersistentCache.ts b/packages/repack/src/commands/common/resetPersistentCache.ts index 53dac9a59..eedfbdc4a 100644 --- a/packages/repack/src/commands/common/resetPersistentCache.ts +++ b/packages/repack/src/commands/common/resetPersistentCache.ts @@ -4,11 +4,33 @@ import type { Configuration as RspackConfiguration } from '@rspack/core'; import * as colorette from 'colorette'; import type { Configuration as WebpackConfiguration } from 'webpack'; -type RspackCacheOptions = NonNullable< +// Rspack 2 moved the persistent cache configuration from `experiments.cache` +// to the top-level `cache` option (same shape). The v2 types no longer +// declare the legacy location, so extend them with it to support configs +// written for either major. +type RspackCacheOptions = RspackConfiguration['cache']; +type RspackExperimentsWithLegacyCache = NonNullable< RspackConfiguration['experiments'] ->['cache']; +> & { cache?: RspackCacheOptions }; + +export interface RspackConfigurationWithLegacyCache { + cache?: RspackCacheOptions; + experiments?: RspackExperimentsWithLegacyCache; +} + type WebpackCacheOptions = WebpackConfiguration['cache']; +/** + * Reads the persistent cache configuration from a Rspack config, + * supporting both the Rspack 1 (`experiments.cache`) and + * Rspack 2 (top-level `cache`) locations. + */ +export function getRspackCacheConfig( + config: RspackConfigurationWithLegacyCache +): RspackCacheOptions { + return config.experiments?.cache ?? config.cache; +} + function getDefaultCacheDirectory( bundler: 'rspack' | 'webpack', rootDir: string @@ -31,6 +53,7 @@ function getRspackCachePaths( for (const cacheConfig of cacheConfigs) { if ( typeof cacheConfig === 'object' && + cacheConfig !== null && 'storage' in cacheConfig && cacheConfig.storage?.directory ) { diff --git a/packages/repack/src/commands/common/warnLegacyRspackCacheConfig.ts b/packages/repack/src/commands/common/warnLegacyRspackCacheConfig.ts new file mode 100644 index 000000000..050307598 --- /dev/null +++ b/packages/repack/src/commands/common/warnLegacyRspackCacheConfig.ts @@ -0,0 +1,32 @@ +import * as colorette from 'colorette'; +import type { RspackConfigurationWithLegacyCache } from './resetPersistentCache.js'; + +let warningDisplayed = false; + +/** + * Rspack 2 moved the persistent cache configuration from `experiments.cache` + * to the top-level `cache` option and silently ignores the legacy key + * (validation is loose) - users migrating a Rspack 1 config would lose + * persistent caching without any signal. + * + * Warn (once) when running Rspack 2 with a legacy `experiments.cache` value, + * but leave the config untouched - migrating it is the user's move, and + * mutating it here would make Re.Pack behave differently from bare Rspack + * given the same config. + */ +export function warnLegacyRspackCacheConfig( + configs: RspackConfigurationWithLegacyCache[] +) { + if (warningDisplayed) return; + if (configs.every((config) => config.experiments?.cache === undefined)) { + return; + } + warningDisplayed = true; + console.warn( + colorette.yellow( + "Rspack 2 ignores the legacy 'experiments.cache' option, so persistent " + + "caching is NOT enabled. Move the value to the top-level 'cache' " + + 'option in your Rspack config.\n' + ) + ); +} diff --git a/packages/repack/src/commands/rspack/bundle.ts b/packages/repack/src/commands/rspack/bundle.ts index 6c0975144..2292885f0 100644 --- a/packages/repack/src/commands/rspack/bundle.ts +++ b/packages/repack/src/commands/rspack/bundle.ts @@ -1,13 +1,15 @@ import { type Configuration, rspack } from '@rspack/core'; import type { Stats } from '@rspack/core'; -import { CLIError } from '../../helpers/index.js'; +import { CLIError, isRspack2 } from '../../helpers/index.js'; import { makeCompilerConfig } from '../common/config/makeCompilerConfig.js'; import { getMaxWorkers, + getRspackCacheConfig, normalizeStatsOptions, resetPersistentCache, setupEnvironment, setupRspackEnvironment, + warnLegacyRspackCacheConfig, writeStats, } from '../common/index.js'; import type { BundleArguments, CliConfig } from '../types.js'; @@ -25,17 +27,21 @@ export async function bundle( cliConfig: CliConfig, args: BundleArguments ) { - const [config] = await makeCompilerConfig({ - args: args, - bundler: 'rspack', - command: 'bundle', - rootDir: cliConfig.root, - platforms: [args.platform], - reactNativePath: cliConfig.reactNativePath, - }); + const [{ devServer: _devServer, ...config }] = + await makeCompilerConfig({ + args: args, + bundler: 'rspack', + command: 'bundle', + rootDir: cliConfig.root, + platforms: [args.platform], + reactNativePath: cliConfig.reactNativePath, + }); - // remove devServer configuration to avoid schema validation errors - delete config.devServer; + // Rspack 2 silently ignores the legacy `experiments.cache` option - + // warn the user so they migrate it to the top-level `cache` option + if (isRspack2(cliConfig.root)) { + warnLegacyRspackCacheConfig([config]); + } // expose selected args as environment variables setupEnvironment(args); @@ -51,7 +57,7 @@ export async function bundle( resetPersistentCache({ bundler: 'rspack', rootDir: cliConfig.root, - cacheConfigs: [config.experiments?.cache], + cacheConfigs: [getRspackCacheConfig(config)], }); } @@ -86,6 +92,9 @@ export async function bundle( } }; + // `devServer` is split off above - it's not needed for bundling, and + // Re.Pack's own dev server options (augmented onto `Configuration`) are + // not assignable to Rspack's bundled `DevServer` type const compiler = rspack(config); return new Promise((resolve) => { diff --git a/packages/repack/src/commands/rspack/ensureNodeCompat.ts b/packages/repack/src/commands/rspack/ensureNodeCompat.ts new file mode 100644 index 000000000..f17d30704 --- /dev/null +++ b/packages/repack/src/commands/rspack/ensureNodeCompat.ts @@ -0,0 +1,31 @@ +import semver from 'semver'; +import { CLIError, getRspackVersion } from '../../helpers/index.js'; + +// Rspack 2 is published as a pure ESM package and declares +// engines.node: "^20.19.0 || >=22.12.0" - the versions where +// loading ESM through require() is supported. +const RSPACK_2_NODE_RANGE = '^20.19.0 || >=22.12.0'; + +/** + * Fails fast with an actionable error when the installed Rspack major + * requires a newer Node.js version than the current one. + * + * Without this guard, loading `@rspack/core` v2 on an unsupported Node + * version crashes with an obscure `ERR_REQUIRE_ESM` error. + */ +export function ensureNodeSupportsRspack() { + const rspackVersion = getRspackVersion(); + + // not resolvable - let the import of '@rspack/core' surface its own error + if (!rspackVersion) return; + + if (semver.major(semver.coerce(rspackVersion) ?? '0.0.0') < 2) return; + + if (semver.satisfies(process.versions.node, RSPACK_2_NODE_RANGE)) return; + + throw new CLIError( + `Rspack ${rspackVersion} requires Node.js ^20.19.0 || >=22.12.0 - ` + + `found ${process.versions.node}. ` + + 'Upgrade Node.js or use @rspack/core@1 instead.' + ); +} diff --git a/packages/repack/src/commands/rspack/index.ts b/packages/repack/src/commands/rspack/index.ts index 7db45a291..6161d7bb7 100644 --- a/packages/repack/src/commands/rspack/index.ts +++ b/packages/repack/src/commands/rspack/index.ts @@ -1,31 +1,50 @@ import { bundleCommandOptions, startCommandOptions } from '../options.js'; -import { bundle } from './bundle.js'; -import { start } from './start.js'; + +import type { bundle } from './bundle.js'; +import type { start } from './start.js'; + +// The command modules load '@rspack/core' which is ESM-only in Rspack 2, +// so they are imported lazily: first the Node version guard runs and turns +// an unsupported setup into an actionable error instead of ERR_REQUIRE_ESM, +// and loading the project config stays free of bundler imports. +const lazyBundle = async (...args: Parameters) => { + const { ensureNodeSupportsRspack } = await import('./ensureNodeCompat.js'); + ensureNodeSupportsRspack(); + const { bundle } = await import('./bundle.js'); + return bundle(...args); +}; + +const lazyStart = async (...args: Parameters) => { + const { ensureNodeSupportsRspack } = await import('./ensureNodeCompat.js'); + ensureNodeSupportsRspack(); + const { start } = await import('./start.js'); + return start(...args); +}; const commands = [ { name: 'bundle', description: 'Build the bundle for the provided JavaScript entry file.', options: bundleCommandOptions, - func: bundle, + func: lazyBundle, }, { name: 'webpack-bundle', description: 'Build the bundle for the provided JavaScript entry file.', options: bundleCommandOptions, - func: bundle, + func: lazyBundle, }, { name: 'start', description: 'Start the React Native development server.', options: startCommandOptions, - func: start, + func: lazyStart, }, { name: 'webpack-start', description: 'Start the React Native development server.', options: startCommandOptions, - func: start, + func: lazyStart, }, ] as const; diff --git a/packages/repack/src/commands/rspack/profile/index.ts b/packages/repack/src/commands/rspack/profile/index.ts index ca88f0856..3cf7dd513 100644 --- a/packages/repack/src/commands/rspack/profile/index.ts +++ b/packages/repack/src/commands/rspack/profile/index.ts @@ -1,15 +1,20 @@ -import { rspackVersion } from '@rspack/core'; +import { getRspackVersion } from '../../../helpers/index.js'; -function getRspackVersion() { +function getInstalledRspackVersion() { // get rid of `-beta`, `-rc` etc. - const version = rspackVersion.split('-')[0]; + const version = (getRspackVersion() ?? '0.0.0').split('-')[0]; const [major, minor, patch] = version.split('.').map(Number); return { major, minor, patch }; } async function getProfilingHandler() { - const { major, minor } = getRspackVersion(); - if (major > 1 || (major === 1 && minor >= 4)) { + const { major, minor } = getInstalledRspackVersion(); + if (major >= 2) { + // Rspack 2 publishes binaries without the perfetto trace layer, + // so tracing defaults differ - see profile-2.ts + return await import('./profile-2.js'); + } + if (major === 1 && minor >= 4) { return await import('./profile-1.4.js'); } return await import('./profile-legacy.js'); diff --git a/packages/repack/src/commands/rspack/profile/profile-2.ts b/packages/repack/src/commands/rspack/profile/profile-2.ts new file mode 100644 index 000000000..0a0effae3 --- /dev/null +++ b/packages/repack/src/commands/rspack/profile/profile-2.ts @@ -0,0 +1,68 @@ +/** + * Reference: https://github.com/web-infra-dev/rspack/blob/bdfe548f4e5fd09c1ccb4d43919426819fb9a34f/packages/rspack-cli/src/utils/profile.ts + */ + +/** + * `RSPACK_PROFILE=ALL` // all trace events + * `RSPACK_PROFILE=OVERVIEW` // overview trace events + * `RSPACK_PROFILE=warn,tokio::net=info` // trace filter from https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#example-syntax + */ +import fs from 'node:fs'; +import path from 'node:path'; +import { rspack } from '@rspack/core'; + +// Rspack 2 publishes binaries built without the `perfetto` trace layer - +// requesting it throws "Perfetto trace layer is not enabled in this build". +// Default to the `logger` layer instead; `perfetto` is still accepted +// explicitly in case a custom Rspack build enables it. +const defaultRustTraceLayer = 'logger'; + +export async function applyProfile( + filterValue: string, + traceLayer: string = defaultRustTraceLayer, + traceOutput?: string +) { + const { asyncExitHook } = await import('exit-hook'); + + if (traceLayer !== 'logger' && traceLayer !== 'perfetto') { + throw new Error(`unsupported trace layer: ${traceLayer}`); + } + const timestamp = Date.now(); + const defaultOutputDir = path.resolve( + `.rspack-profile-${timestamp}-${process.pid}` + ); + if (!traceOutput) { + const defaultRustTracePerfettoOutput = path.resolve( + defaultOutputDir, + 'rspack.pftrace' + ); + const defaultRustTraceLoggerOutput = 'stdout'; + + const defaultTraceOutput = + traceLayer === 'perfetto' + ? defaultRustTracePerfettoOutput + : defaultRustTraceLoggerOutput; + + // biome-ignore lint/style/noParameterAssign: setting default value makes sense + traceOutput = defaultTraceOutput; + } else if (traceOutput !== 'stdout' && traceOutput !== 'stderr') { + // if traceOutput is not stdout or stderr, we need to ensure the directory exists + // biome-ignore lint/style/noParameterAssign: setting default value makes sense + traceOutput = path.resolve(defaultOutputDir, traceOutput); + } + + await ensureFileDir(traceOutput); + await rspack.experiments.globalTrace.register( + filterValue, + traceLayer, + traceOutput + ); + asyncExitHook(rspack.experiments.globalTrace.cleanup, { + wait: 500, + }); +} + +async function ensureFileDir(outputFilePath: string) { + const dir = path.dirname(outputFilePath); + await fs.promises.mkdir(dir, { recursive: true }); +} diff --git a/packages/repack/src/commands/rspack/start.ts b/packages/repack/src/commands/rspack/start.ts index dc915ab4f..936faff48 100644 --- a/packages/repack/src/commands/rspack/start.ts +++ b/packages/repack/src/commands/rspack/start.ts @@ -1,7 +1,7 @@ -import type { Configuration } from '@rspack/core'; +import type { Configuration, MultiRspackOptions } from '@rspack/core'; import packageJson from '../../../package.json'; import { VERBOSE_ENV_KEY } from '../../env.js'; -import { CLIError, isTruthyEnv } from '../../helpers/index.js'; +import { CLIError, isRspack2, isTruthyEnv } from '../../helpers/index.js'; import { ConsoleReporter, FileReporter, @@ -14,6 +14,7 @@ import { getDevMiddleware, getMaxWorkers, getMimeType, + getRspackCacheConfig, parseUrl, resetPersistentCache, resolveProjectPath, @@ -21,6 +22,7 @@ import { setupEnvironment, setupInteractions, setupRspackEnvironment, + warnLegacyRspackCacheConfig, } from '../common/index.js'; import logo from '../common/logo.js'; import type { CliConfig, StartArguments } from '../types.js'; @@ -57,6 +59,12 @@ export async function start( reactNativePath: cliConfig.reactNativePath, }); + // Rspack 2 silently ignores the legacy `experiments.cache` option - + // warn the user so they migrate it to the top-level `cache` option + if (isRspack2(cliConfig.root)) { + warnLegacyRspackCacheConfig(configs); + } + // expose selected args as environment variables setupEnvironment(args); @@ -83,7 +91,7 @@ export async function start( resetPersistentCache({ bundler: 'rspack', rootDir: cliConfig.root, - cacheConfigs: configs.map((config) => config.experiments?.cache), + cacheConfigs: configs.map(getRspackCacheConfig), }); } @@ -96,7 +104,21 @@ export async function start( ); } - const compiler = new Compiler(configs, reporter, cliConfig.root); + // CAST - no clean solution available here: + // Re.Pack augments `Configuration.devServer` with its own dev server options + // (src/types/dev-server-options.d.ts), while Rspack 2 types `devServer` with + // its bundled `DevServer` type. The two are structurally incompatible solely + // because each pulls `proxy` types from a different copy of + // http-proxy-middleware, so no narrowing or `satisfies` can bridge them. + // Unlike `bundle`, `devServer` cannot be stripped from the config here - + // the dev server flow reads it back from `compiler.options`. At runtime + // Rspack accepts & preserves the key (validation is permissive, verified + // in agent_context/rspackv2-jul2026/07-verification-results.md). + const compiler = new Compiler( + configs as unknown as MultiRspackOptions, + reporter, + cliConfig.root + ); const { createServer } = await import('@callstack/repack-dev-server'); const { start, stop } = await createServer({ diff --git a/packages/repack/src/commands/types.ts b/packages/repack/src/commands/types.ts index 2cdc7b18e..d62d0ad9a 100644 --- a/packages/repack/src/commands/types.ts +++ b/packages/repack/src/commands/types.ts @@ -63,7 +63,9 @@ export type RemoveRecord = T extends infer U & Record type ConfigKeys = | 'name' + | 'cache' | 'context' + | 'experiments' | 'mode' | 'devServer' | 'entry' diff --git a/packages/repack/src/helpers/index.ts b/packages/repack/src/helpers/index.ts index 692f41e48..04c5885ee 100644 --- a/packages/repack/src/helpers/index.ts +++ b/packages/repack/src/helpers/index.ts @@ -1,2 +1,3 @@ export * from './errors.js'; export * from './helpers.js'; +export * from './rspackVersion.js'; diff --git a/packages/repack/src/helpers/rspackVersion.ts b/packages/repack/src/helpers/rspackVersion.ts new file mode 100644 index 000000000..1cca1d7f7 --- /dev/null +++ b/packages/repack/src/helpers/rspackVersion.ts @@ -0,0 +1,61 @@ +import type { Compiler as RspackCompiler } from '@rspack/core'; +import type { Compiler as WebpackCompiler } from 'webpack'; + +/** + * Reads the version of the installed `@rspack/core` package without loading it. + * + * Resolving `@rspack/core/package.json` instead of importing the package keeps + * this helper safe to call in any context: + * - `@rspack/core` v2 is ESM-only, so a CJS `require('@rspack/core')` throws + * `ERR_REQUIRE_ESM` on Node < 20.19, + * - `@rspack/core` is an optional peer dependency and may not be installed + * at all (webpack-only projects). + * + * @param context Optional directory to resolve `@rspack/core` from. Defaults + * to Re.Pack's own resolution paths. + * @returns Version string or `null` when `@rspack/core` is not resolvable. + */ +export function getRspackVersion(context?: string): string | null { + try { + const options = context ? { paths: [context] } : undefined; + const packageJsonPath = require.resolve( + '@rspack/core/package.json', + options + ); + const { version }: { version: string } = require(packageJsonPath); + return version; + } catch { + return null; + } +} + +/** + * Major version of the installed `@rspack/core` package, + * or `null` when it's not resolvable. + */ +export function getRspackMajorVersion(context?: string): number | null { + const version = getRspackVersion(context); + if (!version) return null; + return Number(version.split('.')[0]); +} + +/** + * Whether the installed `@rspack/core` package is version 2 or newer. + * Returns `false` when `@rspack/core` is not resolvable. + */ +export function isRspack2(context?: string): boolean { + return (getRspackMajorVersion(context) ?? 0) >= 2; +} + +/** + * Major version of Rspack derived from an already-created compiler instance. + * Returns `null` for webpack compilers. + */ +export function getRspackMajorVersionFromCompiler( + compiler: RspackCompiler | WebpackCompiler +): number | null { + if ('rspackVersion' in compiler.webpack && compiler.webpack.rspackVersion) { + return Number(compiler.webpack.rspackVersion.split('.')[0]); + } + return null; +} diff --git a/packages/repack/src/loaders/babelSwcLoader/__tests__/swc.test.ts b/packages/repack/src/loaders/babelSwcLoader/__tests__/swc.test.ts index c6413754c..605018841 100644 --- a/packages/repack/src/loaders/babelSwcLoader/__tests__/swc.test.ts +++ b/packages/repack/src/loaders/babelSwcLoader/__tests__/swc.test.ts @@ -1,5 +1,6 @@ -import { type SwcLoaderOptions, experiments } from '@rspack/core'; +import { experiments } from '@rspack/core'; import { buildFinalSwcConfig, partitionTransforms } from '../babelSwcLoader.js'; +import type { SwcConfig } from '../options.js'; import { addSwcComplementaryTransforms, getSupportedSwcConfigurableTransforms, @@ -84,7 +85,7 @@ describe('swc transforms support detection', () => { const { transformNames } = getSupportedSwcConfigurableTransforms( transforms, - baseSwcConfig as SwcLoaderOptions + baseSwcConfig as SwcConfig ); expect(transformNames).toEqual([ @@ -104,7 +105,7 @@ describe('swc transforms support detection', () => { ['transform-class-properties', { loose: true }], ['transform-private-methods', { loose: true }], ], - {} as SwcLoaderOptions + {} as SwcConfig ); expect(swcConfig.jsc?.assumptions).toEqual({ @@ -114,7 +115,7 @@ describe('swc transforms support detection', () => { }); it('applies loose mode to setSpreadProperties when not defined; preserves explicit true (snapshot)', () => { - const baseUndefined = {} as SwcLoaderOptions; + const baseUndefined = {} as SwcConfig; const { swcConfig: cfg1 } = getSupportedSwcConfigurableTransforms( [['transform-object-rest-spread', { loose: true }]], baseUndefined @@ -124,9 +125,9 @@ describe('swc transforms support detection', () => { 'object-rest-spread loose: setSpreadProperties' ); - const baseTrue: SwcLoaderOptions = { + const baseTrue: SwcConfig = { jsc: { assumptions: { setSpreadProperties: true } }, - } as SwcLoaderOptions; + } as SwcConfig; const { swcConfig: cfg2 } = getSupportedSwcConfigurableTransforms( [['transform-object-rest-spread', { loose: false }]], baseTrue @@ -138,9 +139,9 @@ describe('swc transforms support detection', () => { }); it('sets optional-chaining/nullish and for-of assumptions with loose mode and respects explicit values (snapshot)', () => { - const base: SwcLoaderOptions = { + const base: SwcConfig = { jsc: { assumptions: { noDocumentAll: true } }, - } as SwcLoaderOptions; + } as SwcConfig; const { swcConfig } = getSupportedSwcConfigurableTransforms( [ @@ -157,14 +158,14 @@ describe('swc transforms support detection', () => { }); it('updates both privateFieldsAsProperties and setPublicClassFields for private-property-in-object but does not override explicit true', () => { - const base: SwcLoaderOptions = { + const base: SwcConfig = { jsc: { assumptions: { privateFieldsAsProperties: true, setPublicClassFields: true, }, }, - } as SwcLoaderOptions; + } as SwcConfig; const { swcConfig, transformNames } = getSupportedSwcConfigurableTransforms( @@ -200,7 +201,7 @@ describe('swc transforms support detection', () => { const { transformNames } = getSupportedSwcCustomTransforms( transforms, - baseSwcConfig as SwcLoaderOptions + baseSwcConfig as SwcConfig ); expect(transformNames).toEqual([ @@ -214,7 +215,7 @@ describe('swc transforms support detection', () => { }); it('overrides react runtime and importSource from transform-react-jsx config (snapshot)', () => { - const inputConfig: SwcLoaderOptions = { + const inputConfig: SwcConfig = { jsc: { transform: { react: { runtime: 'classic', importSource: 'preact' } }, }, @@ -235,7 +236,7 @@ describe('swc transforms support detection', () => { }); it('should apply default react transform when plugin has no react transform options', () => { - const inputConfig: SwcLoaderOptions = { + const inputConfig: SwcConfig = { jsc: { transform: { react: {} }, }, @@ -252,7 +253,7 @@ describe('swc transforms support detection', () => { }); it('should preserve existing react transform config when plugin has none', () => { - const inputConfig: SwcLoaderOptions = { + const inputConfig: SwcConfig = { jsc: { transform: { react: { runtime: 'automatic', importSource: 'nativewind' }, @@ -271,7 +272,7 @@ describe('swc transforms support detection', () => { }); it('should use plugin importSource option for react transform', () => { - const inputConfig: SwcLoaderOptions = { + const inputConfig: SwcConfig = { jsc: { transform: { react: {}, @@ -295,7 +296,7 @@ describe('swc transforms support detection', () => { }); it('should use plugin importSource option for react transform and override existing importSource', () => { - const inputConfig: SwcLoaderOptions = { + const inputConfig: SwcConfig = { jsc: { transform: { react: { importSource: 'preact' }, @@ -319,7 +320,7 @@ describe('swc transforms support detection', () => { }); it('configures modules commonjs options based on provided config (snapshot)', () => { - const inputConfig: SwcLoaderOptions = {}; + const inputConfig: SwcConfig = {}; const { swcConfig } = getSupportedSwcCustomTransforms( [ [ @@ -333,7 +334,7 @@ describe('swc transforms support detection', () => { }); it('enables external helpers via transform-runtime (snapshot)', () => { - const inputConfig: SwcLoaderOptions = {}; + const inputConfig: SwcConfig = {}; const { swcConfig } = getSupportedSwcCustomTransforms( [['transform-runtime', {}]], inputConfig @@ -342,9 +343,9 @@ describe('swc transforms support detection', () => { }); it('sets exportDefaultFrom only for ecmascript parser; leaves typescript parser unchanged (snapshot)', () => { - const inputConfigTs: SwcLoaderOptions = { + const inputConfigTs: SwcConfig = { jsc: { parser: { syntax: 'typescript' } }, - } as SwcLoaderOptions; + } as SwcConfig; const { swcConfig: tsCfg } = getSupportedSwcCustomTransforms( [['proposal-export-default-from', {}]], @@ -352,9 +353,9 @@ describe('swc transforms support detection', () => { ); expect(tsCfg.jsc?.parser).toMatchSnapshot('parser: typescript unchanged'); - const inputConfigEcma: SwcLoaderOptions = { + const inputConfigEcma: SwcConfig = { jsc: { parser: { syntax: 'ecmascript' } }, - } as SwcLoaderOptions; + } as SwcConfig; const { swcConfig: ecmaCfg } = getSupportedSwcCustomTransforms( [['proposal-export-default-from', {}]], inputConfigEcma diff --git a/packages/repack/src/loaders/babelSwcLoader/babelSwcLoader.ts b/packages/repack/src/loaders/babelSwcLoader/babelSwcLoader.ts index 199a9a0ec..22b730d5f 100644 --- a/packages/repack/src/loaders/babelSwcLoader/babelSwcLoader.ts +++ b/packages/repack/src/loaders/babelSwcLoader/babelSwcLoader.ts @@ -1,7 +1,7 @@ import type { TransformOptions } from '@babel/core'; -import type { LoaderContext, SwcLoaderOptions } from '@rspack/core'; +import type { LoaderContext } from '@rspack/core'; import { transform } from '../babelLoader/babelLoader.js'; -import type { BabelSwcLoaderOptions } from './options.js'; +import type { BabelSwcLoaderOptions, SwcConfig } from './options.js'; import { addSwcComplementaryTransforms, getSupportedSwcConfigurableTransforms, @@ -30,7 +30,7 @@ export function partitionTransforms( let configurableTransforms: string[] = []; let customTransforms: string[] = []; - let swcConfig: SwcLoaderOptions = { + let swcConfig: SwcConfig = { jsc: { parser: getSwcParserConfig(filename), transform: { react: { useBuiltins: true } }, @@ -59,7 +59,7 @@ export function partitionTransforms( } export interface BuildFinalSwcConfigOptions { - swcConfig: SwcLoaderOptions; + swcConfig: SwcConfig; includedSwcTransforms: string[]; lazyImports: boolean | string[]; sourceType: 'module' | 'script' | undefined; @@ -67,7 +67,7 @@ export interface BuildFinalSwcConfigOptions { export function buildFinalSwcConfig( options: BuildFinalSwcConfigOptions -): SwcLoaderOptions { +): SwcConfig { const { swcConfig, includedSwcTransforms, lazyImports, sourceType } = options; return { ...swcConfig, @@ -163,8 +163,18 @@ export default async function babelSwcLoader( sourceType: babelResult.sourceType, }); + // `SwcConfig` can carry `builtin:swc-loader`-only options which the raw + // SWC transform API doesn't accept - split them off before calling it + const { + collectTypeScriptInfo: _collectTypeScriptInfo, + transformImport: _transformImport, + rspackExperiments: _rspackExperiments, + detectSyntax: _detectSyntax, + ...transformSwcConfig + } = finalSwcConfig; + const swcResult = swc.transformSync(babelResult?.code!, { - ...finalSwcConfig, + ...transformSwcConfig, caller: { name: '@callstack/repack' }, filename: this.resourcePath, configFile: false, diff --git a/packages/repack/src/loaders/babelSwcLoader/options.ts b/packages/repack/src/loaders/babelSwcLoader/options.ts index 674cf51a8..75668b301 100644 --- a/packages/repack/src/loaders/babelSwcLoader/options.ts +++ b/packages/repack/src/loaders/babelSwcLoader/options.ts @@ -1,9 +1,28 @@ import type { TransformOptions } from '@babel/core'; -import type { SwcLoaderOptions } from '@rspack/core'; +import type { SwcLoaderJscConfig, SwcLoaderOptions } from '@rspack/core'; import type { HermesParserOptions } from '../babelLoader/options.js'; +/** + * Rspack 2 turned `SwcLoaderOptions` into a union discriminated on + * `detectSyntax`, which cannot be spread & reassembled type-safely. + * Re.Pack never sets `detectSyntax`, so internal helpers operate on this + * non-union shape, which stays assignable to `SwcLoaderOptions`. + */ +export type SwcConfig = Omit & { + detectSyntax?: false; + jsc?: SwcLoaderJscConfig; +}; + type BabelOverrides = TransformOptions; -type SwcOverrides = Omit; +// overrides are passed to the raw SWC transform API, so +// `builtin:swc-loader`-only options are not accepted here +type SwcOverrides = Omit< + SwcConfig, + | 'rspackExperiments' + | 'transformImport' + | 'collectTypeScriptInfo' + | 'detectSyntax' +>; export type BabelSwcLoaderOptions = { hideParallelModeWarning?: boolean; diff --git a/packages/repack/src/loaders/babelSwcLoader/swc.ts b/packages/repack/src/loaders/babelSwcLoader/swc.ts index 35ab889ef..e346e1f5f 100644 --- a/packages/repack/src/loaders/babelSwcLoader/swc.ts +++ b/packages/repack/src/loaders/babelSwcLoader/swc.ts @@ -1,4 +1,4 @@ -import type { SwcLoaderOptions } from '@rspack/core'; +import type { SwcConfig } from './options.js'; const SWC_SUPPORTED_NORMAL_RULES = new Set([ 'transform-block-scoping', @@ -80,9 +80,7 @@ export function addSwcComplementaryTransforms( return finalTransforms; } -function getTransformRuntimeConfig( - swcConfig: SwcLoaderOptions -): SwcLoaderOptions { +function getTransformRuntimeConfig(swcConfig: SwcConfig): SwcConfig { return { ...swcConfig, jsc: { @@ -92,9 +90,7 @@ function getTransformRuntimeConfig( }; } -function getTransformReactDevelopmentConfig( - swcConfig: SwcLoaderOptions -): SwcLoaderOptions { +function getTransformReactDevelopmentConfig(swcConfig: SwcConfig): SwcConfig { return { ...swcConfig, jsc: { @@ -111,9 +107,9 @@ function getTransformReactDevelopmentConfig( } function getTransformReactRuntimeConfig( - swcConfig: SwcLoaderOptions, + swcConfig: SwcConfig, reactRuntimeConfig: Record = {} -): SwcLoaderOptions { +): SwcConfig { return { ...swcConfig, jsc: { @@ -137,13 +133,13 @@ function getTransformReactRuntimeConfig( } function getTransformModulesCommonjsConfig( - swcConfig: SwcLoaderOptions, + swcConfig: SwcConfig, moduleConfig: Record = { strict: true, strictMode: true, allowTopLevelThis: true, } -): SwcLoaderOptions { +): SwcConfig { return { ...swcConfig, module: { @@ -157,9 +153,7 @@ function getTransformModulesCommonjsConfig( }; } -function getTransformExportDefaultFromConfig( - swcConfig: SwcLoaderOptions -): SwcLoaderOptions { +function getTransformExportDefaultFromConfig(swcConfig: SwcConfig): SwcConfig { if (swcConfig.jsc?.parser?.syntax === 'typescript') { return swcConfig; } @@ -176,9 +170,7 @@ function getTransformExportDefaultFromConfig( }; } -function getTransformDynamicImportConfig( - swcConfig: SwcLoaderOptions -): SwcLoaderOptions { +function getTransformDynamicImportConfig(swcConfig: SwcConfig): SwcConfig { return { ...swcConfig, jsc: { @@ -193,9 +185,9 @@ function getTransformDynamicImportConfig( } function getTransformClassPropertiesConfig( - swcConfig: SwcLoaderOptions, + swcConfig: SwcConfig, ruleConfig: Record = { loose: false } -): SwcLoaderOptions { +): SwcConfig { return { ...swcConfig, jsc: { @@ -210,9 +202,9 @@ function getTransformClassPropertiesConfig( } function getTransformPrivateMethodsPropertyConfig( - swcConfig: SwcLoaderOptions, + swcConfig: SwcConfig, ruleConfig: Record = { loose: false } -): SwcLoaderOptions { +): SwcConfig { return { ...swcConfig, jsc: { @@ -230,9 +222,9 @@ function getTransformPrivateMethodsPropertyConfig( } function getTransformObjectRestSpreadConfig( - swcConfig: SwcLoaderOptions, + swcConfig: SwcConfig, ruleConfig: Record = { loose: false } -): SwcLoaderOptions { +): SwcConfig { return { ...swcConfig, jsc: { @@ -247,9 +239,9 @@ function getTransformObjectRestSpreadConfig( } function getTransformOptionalChainingNullishCoalescingConfig( - swcConfig: SwcLoaderOptions, + swcConfig: SwcConfig, ruleConfig: Record = { loose: false } -): SwcLoaderOptions { +): SwcConfig { return { ...swcConfig, jsc: { @@ -264,9 +256,9 @@ function getTransformOptionalChainingNullishCoalescingConfig( } function getTransformForOfConfig( - swcConfig: SwcLoaderOptions, + swcConfig: SwcConfig, ruleConfig: Record = { loose: false } -): SwcLoaderOptions { +): SwcConfig { return { ...swcConfig, jsc: { @@ -281,9 +273,7 @@ function getTransformForOfConfig( }; } -function getTransformTypescriptConfig( - swcConfig: SwcLoaderOptions -): SwcLoaderOptions { +function getTransformTypescriptConfig(swcConfig: SwcConfig): SwcConfig { // passthrough return swcConfig; } @@ -322,7 +312,7 @@ export function getSupportedSwcNormalTransforms( export function getSupportedSwcConfigurableTransforms( transforms: [string, Record | undefined][], - swcConfig: SwcLoaderOptions + swcConfig: SwcConfig ) { const transformNames = transforms .filter(([transform]) => SWC_SUPPORTED_CONFIGURABLE_RULES.has(transform)) @@ -341,7 +331,7 @@ export function getSupportedSwcConfigurableTransforms( export function getSupportedSwcCustomTransforms( transforms: [string, Record | undefined][], - swcConfig: SwcLoaderOptions + swcConfig: SwcConfig ) { const transformNames = transforms .filter(([transform]) => SWC_SUPPORTED_CUSTOM_RULES.has(transform)) diff --git a/packages/repack/src/loaders/babelSwcLoader/utils.ts b/packages/repack/src/loaders/babelSwcLoader/utils.ts index 10e19ba26..cf0410611 100644 --- a/packages/repack/src/loaders/babelSwcLoader/utils.ts +++ b/packages/repack/src/loaders/babelSwcLoader/utils.ts @@ -98,9 +98,22 @@ export function checkParallelModeAvailable( if (parallelModeWarningDisplayed || isWebpackBackend(loaderContext)) { return; } + // Rspack 2 removed `experiments.parallelLoader` (parallel loading is stable + // and opt-in per rule only), so there is no global flag to check against - + // running non-parallel is a valid choice there, not a misconfiguration + const rspackVersion = loaderContext._compiler?.webpack?.rspackVersion; + if (rspackVersion && Number(rspackVersion.split('.')[0]) >= 2) { + return; + } // in parallel mode compiler.options.experiments are not available // but since we're already running in parallel mode, we can ignore this check - if (loaderContext._compiler.options?.experiments?.parallelLoader) { + // ('in' narrowing: `parallelLoader` no longer exists in Rspack 2 types) + const experiments = loaderContext._compiler.options?.experiments; + if ( + experiments && + 'parallelLoader' in experiments && + experiments.parallelLoader + ) { parallelModeWarningDisplayed = true; logger.warn(disabledParalleModeWarning); } diff --git a/packages/repack/src/plugins/DevelopmentPlugin.ts b/packages/repack/src/plugins/DevelopmentPlugin.ts index be0e25ced..55720dea4 100644 --- a/packages/repack/src/plugins/DevelopmentPlugin.ts +++ b/packages/repack/src/plugins/DevelopmentPlugin.ts @@ -5,14 +5,20 @@ import type { Plugins, Compiler as RspackCompiler, } from '@rspack/core'; -import ReactRefreshPlugin from '@rspack/plugin-react-refresh'; import type { Compiler as WebpackCompiler } from 'webpack'; -import { isRspackCompiler, moveElementBefore } from '../helpers/index.js'; - -const [reactRefreshEntryPath, reactRefreshPath, refreshUtilsPath] = - ReactRefreshPlugin.deprecated_runtimePaths; +import { + getRspackMajorVersionFromCompiler, + isRspackCompiler, + moveElementBefore, +} from '../helpers/index.js'; type PackageJSON = { version: string }; + +// matches the file conditions of Re.Pack's JS transform rules +// (includes .flow files, unlike the react-refresh plugin defaults) +const REACT_REFRESH_LOADER_TEST = /\.([cm]js|[jt]sx?|flow)$/i; +const REACT_REFRESH_LOADER_EXCLUDE = /node_modules/i; + /** * {@link DevelopmentPlugin} configuration options. */ @@ -87,6 +93,113 @@ export class DevelopmentPlugin { return 'http'; } + private resolveReactRefreshPluginRequest(context: string, request: string) { + try { + return require.resolve(request, { paths: [context] }); + } catch { + try { + // fallback to Re.Pack's own resolution paths + return require.resolve(request); + } catch { + const error = new Error( + '[RepackDevelopmentPlugin] ' + + "Dependency named '@rspack/plugin-react-refresh' (version 2.x) is required " + + 'when using React Refresh with Rspack 2 but is not found in your project. ' + + 'Did you forget to install it?' + ); + // remove the stack trace to make the error more readable + error.stack = undefined; + throw error; + } + } + } + + /** + * Sets up React Refresh using the official `@rspack/plugin-react-refresh` (v2) + * with its integrator options: entry injection is left to Re.Pack (to control + * placement per entrypoint) and the loader is swapped for Re.Pack's own + * React Native-aware react-refresh-loader. + * + * The plugin package is ESM-only, so it's loaded lazily inside this branch - + * it must never be evaluated on setups that don't support `require(esm)` + * (webpack or Rspack 1 users on Node 18). + * + * @returns Path to the react-refresh entry module. + */ + private setupOfficialReactRefresh(compiler: RspackCompiler): string { + const pluginPath = this.resolveReactRefreshPluginRequest( + compiler.context, + '@rspack/plugin-react-refresh' + ); + // Rspack 2 requires Node >= 20.19 (enforced by Re.Pack commands), + // where require() of an ESM module is supported + const { ReactRefreshRspackPlugin } = require(pluginPath); + + new ReactRefreshRspackPlugin({ + // entries are injected by Re.Pack per entrypoint to control their order + injectEntry: false, + // DevelopmentPlugin gates on devServer.hot already - don't let + // the plugin second-guess based on `mode` + forceEnable: true, + reactRefreshLoader: '@callstack/repack/react-refresh-loader', + test: REACT_REFRESH_LOADER_TEST, + exclude: REACT_REFRESH_LOADER_EXCLUDE, + }).apply(compiler); + + return this.resolveReactRefreshPluginRequest( + compiler.context, + '@rspack/plugin-react-refresh/react-refresh-entry' + ); + } + + /** + * Sets up React Refresh manually using the client runtime files vendored + * from `@rspack/plugin-react-refresh` (package-root `vendor/` directory, + * shipped as-is) - used for webpack and Rspack 1 compilers, where the + * official v2 plugin cannot be applied. + * + * @returns Path to the react-refresh entry module. + */ + private setupManualReactRefresh(compiler: RspackCompiler): string { + // resolves from both src/plugins and dist/plugins to the package root + const reactRefreshPath = require.resolve( + '../../vendor/react-refresh/reactRefresh.js' + ); + const refreshUtilsPath = require.resolve( + '../../vendor/react-refresh/refreshUtils.js' + ); + const reactRefreshEntryPath = require.resolve( + '../../vendor/react-refresh/reactRefreshEntry.js' + ); + + new compiler.webpack.ProvidePlugin({ + $ReactRefreshRuntime$: reactRefreshPath, + }).apply(compiler); + + new compiler.webpack.DefinePlugin({ + __react_refresh_library__: JSON.stringify( + compiler.webpack.Template.toIdentifier( + compiler.options.output.uniqueName || compiler.options.output.library + ) + ), + // full reload on unrecoverable runtime errors is a web-oriented + // behavior - in React Native errors are surfaced through LogBox + __reload_on_runtime_errors__: false, + }).apply(compiler); + + new compiler.webpack.ProvidePlugin({ + __react_refresh_utils__: refreshUtilsPath, + }).apply(compiler); + + compiler.options.module.rules.unshift({ + test: REACT_REFRESH_LOADER_TEST, + exclude: REACT_REFRESH_LOADER_EXCLUDE, + use: '@callstack/repack/react-refresh-loader', + }); + + return reactRefreshEntryPath; + } + apply(compiler: RspackCompiler): void; apply(compiler: WebpackCompiler): void; @@ -121,38 +234,22 @@ export class DevelopmentPlugin { // setup HMR new compiler.webpack.HotModuleReplacementPlugin().apply(compiler); - // setup React Refresh manually instead of using the official plugin - // to avoid issues with placement of reactRefreshEntry - new compiler.webpack.ProvidePlugin({ - $ReactRefreshRuntime$: reactRefreshPath, - }).apply(compiler); - - new compiler.webpack.DefinePlugin({ - __react_refresh_error_overlay__: false, - __react_refresh_socket__: false, - __react_refresh_library__: JSON.stringify( - compiler.webpack.Template.toIdentifier( - compiler.options.output.uniqueName || - compiler.options.output.library - ) - ), - }).apply(compiler); - - new compiler.webpack.ProvidePlugin({ - __react_refresh_utils__: refreshUtilsPath, - }).apply(compiler); - + // alias react-refresh to Re.Pack's own copy to keep a single, + // version-controlled instance of the refresh runtime const refreshPath = path.dirname(require.resolve('react-refresh')); compiler.options.resolve.alias = { 'react-refresh': refreshPath, ...compiler.options.resolve.alias, }; - compiler.options.module.rules.unshift({ - include: /\.([cm]js|[jt]sx?|flow)$/i, - exclude: /node_modules/i, - use: '@callstack/repack/react-refresh-loader', - }); + // Rspack 2 gets the official react-refresh plugin (driven through + // its integrator options), webpack & Rspack 1 get manual wiring + // based on the vendored client runtime files + const rspackMajor = getRspackMajorVersionFromCompiler(compiler); + const reactRefreshEntryPath = + rspackMajor !== null && rspackMajor >= 2 + ? this.setupOfficialReactRefresh(compiler) + : this.setupManualReactRefresh(compiler); const devEntries = [ reactRefreshEntryPath, diff --git a/packages/repack/src/plugins/ModuleFederationPluginV1.ts b/packages/repack/src/plugins/ModuleFederationPluginV1.ts index 938cda335..ad7a25f38 100644 --- a/packages/repack/src/plugins/ModuleFederationPluginV1.ts +++ b/packages/repack/src/plugins/ModuleFederationPluginV1.ts @@ -1,6 +1,9 @@ import type { Compiler as RspackCompiler, container } from '@rspack/core'; import type { Compiler as WebpackCompiler } from 'webpack'; -import { isRspackCompiler } from '../helpers/index.js'; +import { + getRspackMajorVersionFromCompiler, + isRspackCompiler, +} from '../helpers/index.js'; import { Federated } from '../utils/federated.js'; type MFPluginV1 = typeof container.ModuleFederationPluginV1; @@ -125,6 +128,31 @@ export class ModuleFederationPluginV1 { return compiler.webpack.container.ModuleFederationPlugin; } + /** + * In Rspack 2, `@module-federation/runtime-tools` became an optional + * peer dependency of `@rspack/core` and is no longer installed + * automatically. The built-in ModuleFederationPluginV1 still needs it, + * so verify it's installed to fail with an actionable error instead of + * a raw module resolution error at build time. + */ + private ensureModuleFederationRuntimeToolsInstalled(context: string) { + try { + require.resolve('@module-federation/runtime-tools', { + paths: [context], + }); + } catch { + const error = new Error( + '[RepackModuleFederationPluginV1] ' + + "Dependency named '@module-federation/runtime-tools' is required when using Module Federation with Rspack 2 " + + '(it became an optional peer dependency of @rspack/core) but is not found in your project. ' + + 'Did you forget to install it?' + ); + // remove the stack trace to make the error more readable + error.stack = undefined; + throw error; + } + } + private replaceRemotes( remote: T ): T { @@ -280,6 +308,11 @@ export class ModuleFederationPluginV1 { apply(__compiler: unknown) { const compiler = __compiler as RspackCompiler; + const rspackMajor = getRspackMajorVersionFromCompiler(compiler); + if (rspackMajor !== null && rspackMajor >= 2) { + this.ensureModuleFederationRuntimeToolsInstalled(compiler.context); + } + const ModuleFederationPlugin = this.getModuleFederationPlugin(compiler); const filenameConfig = diff --git a/packages/repack/src/plugins/RepackTargetPlugin/RepackTargetPlugin.ts b/packages/repack/src/plugins/RepackTargetPlugin/RepackTargetPlugin.ts index a06c0b7ad..a2b10f184 100644 --- a/packages/repack/src/plugins/RepackTargetPlugin/RepackTargetPlugin.ts +++ b/packages/repack/src/plugins/RepackTargetPlugin/RepackTargetPlugin.ts @@ -117,7 +117,10 @@ export class RepackTargetPlugin { compiler, { chunkId: chunk.id ?? undefined, - hmrEnabled: !!compiler.options.devServer?.hot, + // `devServer` can also be `false` in Rspack 2 types + hmrEnabled: + typeof compiler.options.devServer === 'object' && + !!compiler.options.devServer.hot, } ); diff --git a/packages/repack/vendor/react-refresh/LICENSE b/packages/repack/vendor/react-refresh/LICENSE new file mode 100644 index 000000000..995a71fe4 --- /dev/null +++ b/packages/repack/vendor/react-refresh/LICENSE @@ -0,0 +1,63 @@ +These files are vendored from @rspack/plugin-react-refresh@2.0.2 +(https://github.com/rspack-contrib/rspack-plugin-react-refresh, the `client/` +runtime files), which is itself based on @pmmmwh/react-refresh-webpack-plugin +(https://github.com/pmmmwh/react-refresh-webpack-plugin). + +They are used by the manual React Refresh wiring in Re.Pack's +DevelopmentPlugin for webpack and Rspack 1 compilers - under Rspack 2 the +official @rspack/plugin-react-refresh plugin provides these files instead. + +Local changes relative to upstream v2.0.2 (re-derive on future bumps): +- provenance headers added to each file +- formatting aligned with this repository (no functional edits) +- note: upstream's `__reload_on_runtime_errors__` global is defined as + `false` by DevelopmentPlugin (full reload on unrecoverable runtime errors + is a web-oriented behavior; React Native surfaces errors through LogBox) + +-------------------------------------------------------------------------- + +MIT License + +Copyright (c) 2022-present Bytedance, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +-------------------------------------------------------------------------- + +MIT License (@pmmmwh/react-refresh-webpack-plugin) + +Copyright (c) 2019 Michael Mok + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/repack/vendor/react-refresh/reactRefresh.js b/packages/repack/vendor/react-refresh/reactRefresh.js new file mode 100644 index 000000000..7c9c5706d --- /dev/null +++ b/packages/repack/vendor/react-refresh/reactRefresh.js @@ -0,0 +1,36 @@ +/** + * Vendored from @rspack/plugin-react-refresh@2.0.2 (client runtime files), + * which is itself based on @pmmmwh/react-refresh-webpack-plugin. + * + * Used by the manual React Refresh wiring in DevelopmentPlugin for + * webpack and Rspack 1 compilers - under Rspack 2 the official + * @rspack/plugin-react-refresh plugin provides these files instead. + * + * MIT Licensed + * Copyright (c) 2019 Michael Mok (react-refresh-webpack-plugin) + * Copyright (c) 2022-present Bytedance, Inc. and its affiliates (rspack-plugin-react-refresh) + */ + +import { + createSignatureFunctionForTransform, + register, +} from 'react-refresh/runtime'; +import { executeRuntime, getModuleExports } from './refreshUtils.js'; + +function refresh(moduleId, hot) { + const currentExports = getModuleExports(moduleId); + const runRefresh = (moduleExports) => { + const testMode = + typeof __react_refresh_test__ !== 'undefined' + ? __react_refresh_test__ + : undefined; + executeRuntime(moduleExports, moduleId, hot, testMode); + }; + if (typeof Promise !== 'undefined' && currentExports instanceof Promise) { + currentExports.then(runRefresh); + } else { + runRefresh(currentExports); + } +} + +export { createSignatureFunctionForTransform, refresh, register }; diff --git a/packages/repack/vendor/react-refresh/reactRefreshEntry.js b/packages/repack/vendor/react-refresh/reactRefreshEntry.js new file mode 100644 index 000000000..3fabb7a3f --- /dev/null +++ b/packages/repack/vendor/react-refresh/reactRefreshEntry.js @@ -0,0 +1,59 @@ +/** + * Vendored from @rspack/plugin-react-refresh@2.0.2 (client runtime files), + * which is itself based on @pmmmwh/react-refresh-webpack-plugin. + * + * Used by the manual React Refresh wiring in DevelopmentPlugin for + * webpack and Rspack 1 compilers - under Rspack 2 the official + * @rspack/plugin-react-refresh plugin provides these files instead. + * + * MIT Licensed + * Copyright (c) 2019 Michael Mok (react-refresh-webpack-plugin) + * Copyright (c) 2022-present Bytedance, Inc. and its affiliates (rspack-plugin-react-refresh) + */ + +import { injectIntoGlobalHook } from 'react-refresh/runtime'; + +const safeThis = (() => { + const check = (it) => it && it.Math === Math && it; + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + // eslint-disable-next-line es/no-global-this -- safe + return ( + check(typeof globalThis === 'object' && globalThis) || + check(typeof window === 'object' && window) || + // eslint-disable-next-line no-restricted-globals -- safe + check(typeof self === 'object' && self) || + check(typeof __webpack_require__.g === 'object' && __webpack_require__.g) || + // eslint-disable-next-line no-new-func -- fallback + (function () { + return this; + })() || + this || + Function('return this')() + ); +})(); + +if (process.env.NODE_ENV !== 'production') { + if (typeof safeThis !== 'undefined') { + let $RefreshInjected$ = '__reactRefreshInjected'; + // Namespace the injected flag (if necessary) for monorepo compatibility + if ( + typeof __react_refresh_library__ !== 'undefined' && + __react_refresh_library__ + ) { + $RefreshInjected$ += `_${__react_refresh_library__}`; + } + + // Only inject the runtime if it hasn't been injected + if (!safeThis[$RefreshInjected$]) { + injectIntoGlobalHook(safeThis); + + // Empty implementation to avoid "ReferenceError: variable is not defined" in module which didn't pass builtin:react-refresh-loader + safeThis.$RefreshSig$ = () => (type) => type; + safeThis.$RefreshReg$ = () => {}; + + // Mark the runtime as injected to prevent double-injection + safeThis[$RefreshInjected$] = true; + } + } +} diff --git a/packages/repack/vendor/react-refresh/refreshUtils.js b/packages/repack/vendor/react-refresh/refreshUtils.js new file mode 100644 index 000000000..acf1c0b34 --- /dev/null +++ b/packages/repack/vendor/react-refresh/refreshUtils.js @@ -0,0 +1,297 @@ +/** + * Vendored from @rspack/plugin-react-refresh@2.0.2 (client runtime files), + * which is itself based on @pmmmwh/react-refresh-webpack-plugin. + * + * Used by the manual React Refresh wiring in DevelopmentPlugin for + * webpack and Rspack 1 compilers - under Rspack 2 the official + * @rspack/plugin-react-refresh plugin provides these files instead. + * + * MIT Licensed + * Copyright (c) 2019 Michael Mok (react-refresh-webpack-plugin) + * Copyright (c) 2022-present Bytedance, Inc. and its affiliates (rspack-plugin-react-refresh) + */ + +/* global __webpack_require__ */ +import { + getFamilyByType, + isLikelyComponentType, + performReactRefresh, + register, +} from 'react-refresh/runtime'; + +/** + * Extracts exports from a Rspack module object. + * @param {string} moduleId An Rspack module ID. + * @returns {*} An exports object from the module. + */ +function getModuleExports(moduleId) { + if (typeof moduleId === 'undefined') { + // `moduleId` is unavailable, which indicates that this module is not in the cache, + // which means we won't be able to capture any exports, + // and thus they cannot be refreshed safely. + // These are likely runtime or dynamically generated modules. + return {}; + } + + const maybeModule = __webpack_require__.c[moduleId]; + if (typeof maybeModule === 'undefined') { + // `moduleId` is available but the module in cache is unavailable, + // which indicates the module is somehow corrupted (e.g. broken Rspack `module` globals). + // We will warn the user (as this is likely a mistake) and assume they cannot be refreshed. + console.warn( + `[React Refresh] Failed to get exports for module: ${moduleId}.` + ); + return {}; + } + + const exportsOrPromise = maybeModule.exports; + if (typeof Promise !== 'undefined' && exportsOrPromise instanceof Promise) { + return exportsOrPromise.then((moduleExports) => moduleExports); + } + + return exportsOrPromise; +} + +/** + * Calculates the signature of a React refresh boundary. + * If this signature changes, it's unsafe to accept the boundary. + * + * This implementation is based on the one in [Metro](https://github.com/facebook/metro/blob/907d6af22ac6ebe58572be418e9253a90665ecbd/packages/metro/src/lib/polyfills/require.js#L795-L816). + * @param {*} moduleExports An Rspack module exports object. + * @returns {string[]} A React refresh boundary signature array. + */ +function getReactRefreshBoundarySignature(moduleExports) { + const signature = [getFamilyByType(moduleExports)]; + + if (moduleExports == null || typeof moduleExports !== 'object') { + // Exit if we can't iterate over exports. + return signature; + } + + for (const key in moduleExports) { + if (key === '__esModule') { + continue; + } + + signature.push(key); + signature.push(getFamilyByType(moduleExports[key])); + } + + return signature; +} + +/** + * Creates a helper that performs a delayed React refresh. + * @returns {function(function(): void): void} A debounced React refresh function. + */ +function createDebounceUpdate() { + /** + * A cached setTimeout handler. + * @type {number | undefined} + */ + let refreshTimeout; + + /** + * Performs React Refresh on a delay. + * @param {function(): void} [callback] + * @returns {void} + */ + const enqueueUpdate = (callback) => { + if (typeof refreshTimeout !== 'undefined') { + return; + } + + refreshTimeout = setTimeout(() => { + refreshTimeout = undefined; + performReactRefresh(); + if (callback) { + callback(); + } + }, 30); + }; + + return enqueueUpdate; +} + +/** + * Checks if all exports are likely a React component. + * + * This implementation is based on the one in [Metro](https://github.com/facebook/metro/blob/febdba2383113c88296c61e28e4ef6a7f4939fda/packages/metro/src/lib/polyfills/require.js#L748-L774). + * @param {*} moduleExports An Rspack module exports object. + * @returns {boolean} Whether the exports are React component like. + */ +function isReactRefreshBoundary(moduleExports) { + if (isLikelyComponentType(moduleExports)) { + return true; + } + if ( + moduleExports === undefined || + moduleExports === null || + typeof moduleExports !== 'object' + ) { + // Exit if we can't iterate over exports. + return false; + } + + let hasExports = false; + let areAllExportsComponents = true; + for (const key in moduleExports) { + hasExports = true; + + // This is the ES Module indicator flag + if (key === '__esModule') { + continue; + } + + // We can (and have to) safely execute getters here, + // as Rspack/webpack manually assigns ESM exports to getters, + // without any side-effects attached. + // Ref: https://github.com/webpack/webpack/blob/b93048643fe74de2a6931755911da1212df55897/lib/MainTemplate.js#L281 + const exportValue = moduleExports[key]; + if (!isLikelyComponentType(exportValue)) { + areAllExportsComponents = false; + } + } + + return hasExports && areAllExportsComponents; +} + +/** + * Checks if exports are likely a React component and registers them. + * + * This implementation is based on the one in [Metro](https://github.com/facebook/metro/blob/febdba2383113c88296c61e28e4ef6a7f4939fda/packages/metro/src/lib/polyfills/require.js#L818-L835). + * @param {*} moduleExports An Rspack module exports object. + * @param {string} moduleId An Rspack module ID. + * @returns {void} + */ +function registerExportsForReactRefresh(moduleExports, moduleId) { + if (isLikelyComponentType(moduleExports)) { + // Register module.exports if it is likely a component + register(moduleExports, `${moduleId} %exports%`); + } + + if ( + moduleExports === undefined || + moduleExports === null || + typeof moduleExports !== 'object' + ) { + // Exit if we can't iterate over the exports. + return; + } + + for (const key in moduleExports) { + // Skip registering the ES Module indicator + if (key === '__esModule') { + continue; + } + + const exportValue = moduleExports[key]; + if (isLikelyComponentType(exportValue)) { + const typeID = `${moduleId} %exports% ${key}`; + register(exportValue, typeID); + } + } +} + +/** + * Compares previous and next module objects to check for mutated boundaries. + * + * This implementation is based on the one in [Metro](https://github.com/facebook/metro/blob/907d6af22ac6ebe58572be418e9253a90665ecbd/packages/metro/src/lib/polyfills/require.js#L776-L792). + * @param {*} prevExports The current Rspack module exports object. + * @param {*} nextExports The next Rspack module exports object. + * @returns {boolean} Whether the React refresh boundary should be invalidated. + */ +function shouldInvalidateReactRefreshBoundary(prevExports, nextExports) { + const prevSignature = getReactRefreshBoundarySignature(prevExports); + const nextSignature = getReactRefreshBoundarySignature(nextExports); + + return ( + prevSignature.length !== nextSignature.length || + nextSignature.some( + (signatureItem, index) => prevSignature[index] !== signatureItem + ) + ); +} + +const enqueueUpdate = createDebounceUpdate(); + +function executeRuntime(moduleExports, moduleId, hot, isTest) { + registerExportsForReactRefresh(moduleExports, moduleId); + + if (hot) { + const isHotUpdate = Boolean(hot.data); + let prevExports; + if (isHotUpdate) { + prevExports = hot.data.prevExports; + } + + if (isReactRefreshBoundary(moduleExports)) { + /** + * A callback to perform a full refresh if React has unrecoverable errors, + * and also caches the to-be-disposed module. + * @param {*} data A hot module data object from Rspack HMR. + * @returns {void} + */ + const hotDisposeCallback = (data) => { + // We have to mutate the data object to get data registered and cached + data.prevExports = moduleExports; + }; + /** + * An error handler to allow self-recovering behaviors. + * @param {Error} error An error occurred during evaluation of a module. + * @returns {void} + */ + const hotErrorHandler = (error) => { + console.error(error); + if ( + __reload_on_runtime_errors__ && + isUnrecoverableRuntimeError(error) + ) { + location.reload(); + return; + } + + if ( + typeof isTest !== 'undefined' && + isTest && + window.onHotAcceptError + ) { + window.onHotAcceptError(error.message); + } + + __webpack_require__.c[moduleId].hot.accept(hotErrorHandler); + }; + + hot.dispose(hotDisposeCallback); + hot.accept(hotErrorHandler); + + if (isHotUpdate) { + if ( + isReactRefreshBoundary(prevExports) && + shouldInvalidateReactRefreshBoundary(prevExports, moduleExports) + ) { + hot.invalidate(); + } else { + enqueueUpdate(); + } + } + } else { + if (isHotUpdate && typeof prevExports !== 'undefined') { + hot.invalidate(); + } + } + } +} + +function isUnrecoverableRuntimeError(error) { + return error.message.startsWith('RuntimeError: factory is undefined'); +} + +export { + enqueueUpdate, + executeRuntime, + getModuleExports, + isReactRefreshBoundary, + registerExportsForReactRefresh, + shouldInvalidateReactRefreshBoundary, +}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af1b6547c..403e995f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,11 +10,14 @@ catalogs: specifier: ^0.6.3 version: 0.6.3 '@rspack/core': - specifier: ^1.6.0 - version: 1.6.0 + specifier: ^2.1.2 + version: 2.1.2 + '@rspack/plugin-react-refresh': + specifier: ^2.0.2 + version: 2.0.2 '@swc/helpers': - specifier: ~0.5.17 - version: 0.5.18 + specifier: ^0.5.23 + version: 0.5.23 '@types/node': specifier: ^20.19.31 version: 20.19.31 @@ -183,19 +186,22 @@ importers: version: 0.84.1 '@rsdoctor/rspack-plugin': specifier: ^1.5.2 - version: 1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) + version: 1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) '@rspack/core': specifier: 'catalog:' - version: 1.6.0(@swc/helpers@0.5.18) + version: 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) + '@rspack/plugin-react-refresh': + specifier: 'catalog:' + version: 2.0.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-refresh@0.18.0) '@svgr/webpack': specifier: ^8.1.0 version: 8.1.0(typescript@5.9.3) '@swc/core': specifier: ^1.13.3 - version: 1.13.3(@swc/helpers@0.5.18) + version: 1.13.3(@swc/helpers@0.5.23) '@swc/helpers': specifier: 'catalog:' - version: 0.5.18 + version: 0.5.23 '@types/jest': specifier: ^29.5.13 version: 29.5.14 @@ -219,19 +225,22 @@ importers: version: 8.5.6 postcss-loader: specifier: ^8.1.1 - version: 8.1.1(@rspack/core@1.6.0(@swc/helpers@0.5.18))(postcss@8.5.6)(typescript@5.9.3)(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) + version: 8.1.1(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(postcss@8.5.6)(typescript@5.9.3)(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) react-native-test-app: specifier: catalog:testers version: 5.1.0(react-native@0.84.1(@babel/core@7.25.2)(@react-native-community/cli@20.1.2(typescript@5.9.3))(@types/react@19.2.14)(react@19.2.3))(react@19.2.3) + react-refresh: + specifier: ^0.18.0 + version: 0.18.0 tailwindcss: specifier: ^3.4.17 version: 3.4.17 terser-webpack-plugin: specifier: 'catalog:' - version: 5.3.16(@swc/core@1.13.3(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) + version: 5.3.16(@swc/core@1.13.3(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) thread-loader: specifier: ^4.0.4 - version: 4.0.4(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) + version: 4.0.4(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) typescript: specifier: 'catalog:' version: 5.9.3 @@ -240,7 +249,7 @@ importers: version: 4.1.0(@types/node@20.19.31)(jiti@2.6.1)(lightningcss@1.28.2)(terser@5.31.3)(yaml@2.8.2) webpack: specifier: 'catalog:' - version: 5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)) + version: 5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)) apps/tester-federation: dependencies: @@ -289,13 +298,16 @@ importers: version: 0.84.1 '@rsdoctor/rspack-plugin': specifier: ^1.5.2 - version: 1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) + version: 1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) '@rspack/core': specifier: 'catalog:' - version: 1.6.0(@swc/helpers@0.5.18) + version: 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) + '@rspack/plugin-react-refresh': + specifier: 'catalog:' + version: 2.0.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-refresh@0.18.0) '@swc/helpers': specifier: 'catalog:' - version: 0.5.18 + version: 0.5.23 '@types/jest': specifier: ^29.5.13 version: 29.5.14 @@ -322,7 +334,7 @@ importers: version: link:../../packages/repack '@module-federation/enhanced': specifier: 2.1.0 - version: 2.1.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(react-dom@19.2.4(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(webpack@5.105.3) + version: 2.1.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-dom@19.2.4(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(webpack@5.105.3) '@module-federation/runtime': specifier: 2.1.0 version: 2.1.0 @@ -368,13 +380,16 @@ importers: version: 0.84.1 '@rsdoctor/rspack-plugin': specifier: ^1.5.2 - version: 1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) + version: 1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) '@rspack/core': specifier: 'catalog:' - version: 1.6.0(@swc/helpers@0.5.18) + version: 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) + '@rspack/plugin-react-refresh': + specifier: 'catalog:' + version: 2.0.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-refresh@0.18.0) '@swc/helpers': specifier: 'catalog:' - version: 0.5.18 + version: 0.5.23 '@types/jest': specifier: ^29.5.13 version: 29.5.14 @@ -514,7 +529,7 @@ importers: version: link:../repack '@rspack/core': specifier: 'catalog:' - version: 1.6.0(@swc/helpers@0.5.18) + version: 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) '@types/node': specifier: 'catalog:' version: 20.19.31 @@ -533,7 +548,7 @@ importers: version: link:../repack '@rspack/core': specifier: 'catalog:' - version: 1.6.0(@swc/helpers@0.5.18) + version: 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) '@types/dedent': specifier: 0.7.2 version: 0.7.2 @@ -561,7 +576,7 @@ importers: version: link:../repack '@rspack/core': specifier: 'catalog:' - version: 1.6.0(@swc/helpers@0.5.18) + version: 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) '@types/babel__core': specifier: 7.20.5 version: 7.20.5 @@ -583,9 +598,6 @@ importers: '@discoveryjs/json-ext': specifier: ^0.5.7 version: 0.5.7 - '@rspack/plugin-react-refresh': - specifier: 1.0.0 - version: 1.0.0(react-refresh@0.14.2) babel-loader: specifier: ^9.2.1 version: 9.2.1(@babel/core@7.25.2)(webpack@5.105.3) @@ -667,16 +679,22 @@ importers: version: 7.24.8(@babel/core@7.25.2) '@module-federation/enhanced': specifier: 0.8.9 - version: 0.8.9(@rspack/core@1.6.0(@swc/helpers@0.5.18))(react-dom@19.2.4(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(webpack@5.105.3) + version: 0.8.9(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-dom@19.2.4(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(webpack@5.105.3) '@module-federation/sdk': specifier: 0.6.10 version: 0.6.10 '@rspack/core': - specifier: 'catalog:' - version: 1.6.0(@swc/helpers@0.5.18) + specifier: ^2.1.2 + version: 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) + '@rspack/core-v1': + specifier: npm:@rspack/core@^1.7.12 + version: '@rspack/core@1.7.12(@swc/helpers@0.5.23)' + '@rspack/plugin-react-refresh': + specifier: ^2.0.2 + version: 2.0.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-refresh@0.14.2) '@swc/helpers': - specifier: 'catalog:' - version: 0.5.18 + specifier: ^0.5.23 + version: 0.5.23 '@types/babel__core': specifier: ^7.20.5 version: 7.20.5 @@ -713,6 +731,9 @@ importers: clang-format: specifier: ^1.8.0 version: 1.8.0 + cross-env: + specifier: ^7.0.3 + version: 7.0.3 jest: specifier: ^29.7.0 version: 29.7.0(@types/node@20.19.31) @@ -739,16 +760,16 @@ importers: version: link:../../packages/repack '@module-federation/enhanced': specifier: 2.0.1 - version: 2.0.1(@rspack/core@1.6.0(@swc/helpers@0.5.18))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3) + version: 2.0.1(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3) '@module-federation/enhanced-v15': specifier: npm:@module-federation/enhanced@0.15.0 - version: '@module-federation/enhanced@0.15.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3)' + version: '@module-federation/enhanced@0.15.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3)' '@module-federation/enhanced-v21': specifier: npm:@module-federation/enhanced@0.21.0 - version: '@module-federation/enhanced@0.21.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3)' + version: '@module-federation/enhanced@0.21.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3)' '@rspack/core': specifier: 'catalog:' - version: 1.6.0(@swc/helpers@0.5.18) + version: 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) '@types/node': specifier: 'catalog:' version: 20.19.31 @@ -1887,14 +1908,14 @@ packages: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} - '@emnapi/core@1.7.0': - resolution: {integrity: sha512-pJdKGq/1iquWYtv1RRSljZklxHCOCAJFJrImO5ZLKPJVJlVUcs8yFwNQlqS0Lo8xT1VAXXTCZocF9n26FWEKsw==} + '@emnapi/core@1.11.1': + resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==} - '@emnapi/runtime@1.7.0': - resolution: {integrity: sha512-oAYoQnCYaQZKVS53Fq23ceWMRxq5EhQsE0x0RdQ55jT7wagMu5k+fS39v1fiSLrtrLQlXwVINenqhLMtTrV/1Q==} + '@emnapi/runtime@1.11.1': + resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==} - '@emnapi/wasi-threads@1.1.0': - resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} + '@emnapi/wasi-threads@1.2.2': + resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} '@esbuild/aix-ppc64@0.25.5': resolution: {integrity: sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==} @@ -2743,8 +2764,8 @@ packages: '@module-federation/error-codes@0.21.0': resolution: {integrity: sha512-jZLvq4bkDUz9Qt5N+vKRGdJ1qSEt0W637xhAGgoaTNXY1aCoS99zeqWZzt1RCA6BAJjwVC+wz60VLMtZ+6ZQYw==} - '@module-federation/error-codes@0.21.2': - resolution: {integrity: sha512-mGbPAAApgjmQUl4J7WAt20aV04a26TyS21GDEpOGXFEQG5FqmZnSJ6FqB8K19HgTKioBT1+fF/Ctl5bGGao/EA==} + '@module-federation/error-codes@0.22.0': + resolution: {integrity: sha512-xF9SjnEy7vTdx+xekjPCV5cIHOGCkdn3pIxo9vU7gEZMIw0SvAEdsy6Uh17xaCpm8V0FWvR0SZoK9Ik6jGOaug==} '@module-federation/error-codes@0.8.9': resolution: {integrity: sha512-yUA3GZjOy8Ll6l193faXir2veexDaUiLdmptbzC9tIee/iSQiSwIlibdTafCfqaJ62cLZaytOUdmAFAKLv8QQw==} @@ -2879,8 +2900,8 @@ packages: '@module-federation/runtime-core@0.21.0': resolution: {integrity: sha512-qIvhfON6TQxbybZFNJzJZ0woi0kXaTWIavPdcUxi41LpxxB5Ax1voqpY5NXE2Zq0Uek88b2OgDgXyvIuKM50XQ==} - '@module-federation/runtime-core@0.21.2': - resolution: {integrity: sha512-LtDnccPxjR8Xqa3daRYr1cH/6vUzK3mQSzgvnfsUm1fXte5syX4ftWw3Eu55VdqNY3yREFRn77AXdu9PfPEZRw==} + '@module-federation/runtime-core@0.22.0': + resolution: {integrity: sha512-GR1TcD6/s7zqItfhC87zAp30PqzvceoeDGYTgF3Vx2TXvsfDrhP6Qw9T4vudDQL3uJRne6t7CzdT29YyVxlgIA==} '@module-federation/runtime-core@0.6.17': resolution: {integrity: sha512-PXFN/TT9f64Un6NQYqH1Z0QLhpytW15jkZvTEOV8W7Ed319BECFI0Rv4xAsAGa8zJGFoaM/c7QOQfdFXtKj5Og==} @@ -2900,8 +2921,8 @@ packages: '@module-federation/runtime-tools@0.21.0': resolution: {integrity: sha512-XOjd5yLUTD12ay35rgSEhB9JIqxDZuC1OB6/aNyHf7IWPUNB7s4XZ2JlGn1xW8c0Asq1VRm15DF+BXmyDf+XnQ==} - '@module-federation/runtime-tools@0.21.2': - resolution: {integrity: sha512-SgG9NWTYGNYcHSd5MepO3AXf6DNXriIo4sKKM4mu4RqfYhHyP+yNjnF/gvYJl52VD61g0nADmzLWzBqxOqk2tg==} + '@module-federation/runtime-tools@0.22.0': + resolution: {integrity: sha512-4ScUJ/aUfEernb+4PbLdhM/c60VHl698Gn1gY21m9vyC1Ucn69fPCA1y2EwcCB7IItseRMoNhdcWQnzt/OPCNA==} '@module-federation/runtime-tools@0.8.9': resolution: {integrity: sha512-xBUGx1oOZNuxXjPGdTMrLtAIDrbrN6jE2Mgb9w1qr2mQ4AW9b5TOlxbARBoX4q98xt9oFCGU6Q0eW5XJpsl8AQ==} @@ -2921,8 +2942,8 @@ packages: '@module-federation/runtime@0.21.0': resolution: {integrity: sha512-fl31G2x/+g8/KyMFAlxM8825inuAZu4FQiIg9X2wVKRD1Yx8svg12likGBiorVofO2gBTY7KQ+Nbc6Az90JKQQ==} - '@module-federation/runtime@0.21.2': - resolution: {integrity: sha512-97jlOx4RAnAHMBTfgU5FBK6+V/pfT6GNX0YjSf8G+uJ3lFy74Y6kg/BevEkChTGw5waCLAkw/pw4LmntYcNN7g==} + '@module-federation/runtime@0.22.0': + resolution: {integrity: sha512-38g5iPju2tPC3KHMPxRKmy4k4onNp6ypFPS1eKGsNLUkXgHsPMBFqAjDw96iEcjri91BrahG4XcdyKi97xZzlA==} '@module-federation/runtime@0.8.9': resolution: {integrity: sha512-i+a+/hoT/c+EE52mT+gJrbA6DhL86PY9cd/dIv/oKpLz9i+yYBlG+RA+puc7YsUEO4irbFLvnIMq6AGDUKVzYA==} @@ -2942,8 +2963,8 @@ packages: '@module-federation/sdk@0.21.0': resolution: {integrity: sha512-tWQ2j+zH6hLaERcie186gwAULyWI/js4WSyzTF2d52ti8vKf+357S7IL4/96+AaTrvwP50NWeR8Igc176kaGTA==} - '@module-federation/sdk@0.21.2': - resolution: {integrity: sha512-t2vHSJ1a9zjg7LLJoEghcytNLzeFCqOat5TbXTav5dgU0xXw82Cf0EfLrxiJL6uUpgbtyvUdqqa2DVAvMPjiiA==} + '@module-federation/sdk@0.22.0': + resolution: {integrity: sha512-x4aFNBKn2KVQRuNVC5A7SnrSCSqyfIWmm1DvubjbO9iKFe7ith5niw8dqSFBekYBg2Fwy+eMg4sEFNVvCAdo6g==} '@module-federation/sdk@0.6.10': resolution: {integrity: sha512-i6ofHnImB4zCn/bt7Ft0zh9o/PxvsJj8Wc88EAeJg4IrY6+bzwwo1G2h44w1Yt3go4skZZFQCK0UxoaV6l/t/A==} @@ -2981,8 +3002,8 @@ packages: '@module-federation/webpack-bundler-runtime@0.21.0': resolution: {integrity: sha512-kxXf7TB0CRdtqsXUGhoV/e5+1gZpcjMHt1C6ZZWhLCHZTSpESqPHm2GUk41yzKj/0qn/QyDJ39NGKjALWLws4A==} - '@module-federation/webpack-bundler-runtime@0.21.2': - resolution: {integrity: sha512-06R/NDY6Uh5RBIaBOFwYWzJCf1dIiQd/DFHToBVhejUT3ZFG7GzHEPIIsAGqMzne/JSmVsvjlXiJu7UthQ6rFA==} + '@module-federation/webpack-bundler-runtime@0.22.0': + resolution: {integrity: sha512-aM8gCqXu+/4wBmJtVeMeeMN5guw3chf+2i6HajKtQv7SJfxV/f4IyNQJUeUQu9HfiAZHjqtMV5Lvq/Lvh8LdyA==} '@module-federation/webpack-bundler-runtime@0.8.9': resolution: {integrity: sha512-DYLvVi4b2MUYu/B4g5wIC5SHxiODboKHkYGHYapOhCcqOchca/N16gtiAI8eSNjJPc+fgUXUGIyGiB18IlFEeQ==} @@ -2996,6 +3017,12 @@ packages: '@napi-rs/wasm-runtime@1.0.7': resolution: {integrity: sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==} + '@napi-rs/wasm-runtime@1.1.6': + resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + '@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3': resolution: {integrity: sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==} @@ -3422,8 +3449,8 @@ packages: cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-arm64@1.6.0': - resolution: {integrity: sha512-IrigOWnGvQgugsTZgf3dB5uko+y+lkNLYg/8w0DiobxkWhpLO97RAeR1w0ofIPXYVu3UWVf7dgHj3PjTqjC9Tw==} + '@rspack/binding-darwin-arm64@1.7.12': + resolution: {integrity: sha512-rbFprJaJiqrmfy8SHth8EsoRS0wg4bXcucwj9NiMzpGFq14Opw8c04iQ6H9BECYzgmN0PKZ9rh41LdVvhdZe4A==} cpu: [arm64] os: [darwin] @@ -3432,13 +3459,18 @@ packages: cpu: [arm64] os: [darwin] + '@rspack/binding-darwin-arm64@2.1.2': + resolution: {integrity: sha512-IYcxareUOYJZz+uNMSIwn+iDRiVyjZNOjoxO/zL4OFaPK8Ncrw0ka/9DqL9Gd7OpnAXN1zK3uS8yD0O1yIYI3Q==} + cpu: [arm64] + os: [darwin] + '@rspack/binding-darwin-x64@1.3.3': resolution: {integrity: sha512-OXtY2s4nlYtUXkeJt8TQKKNIcN7PI8yDq0nqI75OfJoS4u1ZmRXJ8IMeSALLo8I+xD2RAF79tf7yhM/Y/AaiKQ==} cpu: [x64] os: [darwin] - '@rspack/binding-darwin-x64@1.6.0': - resolution: {integrity: sha512-UYz+Y1XqbHGnkUOsaZRuwiuQaQaQ5rEPSboBPlIVDtblwmB71yxo3ET0nSoUhz8L/WXqQoARiraTCxUP6bvSIg==} + '@rspack/binding-darwin-x64@1.7.12': + resolution: {integrity: sha512-jnOp+/UXOJa9xqUb8KXH03sysoO2e4Ij6tw6MqDdmdj8n/A8PQENRPUbW9AwXpPtVDJPus9r4fi7b3+6e4B8Hg==} cpu: [x64] os: [darwin] @@ -3447,14 +3479,19 @@ packages: cpu: [x64] os: [darwin] + '@rspack/binding-darwin-x64@2.1.2': + resolution: {integrity: sha512-aoifkILvx/XEHyvg8yW57xu95nx7f9f/3ah1+RguHSNKcJMcoCep9VX1Ct1N0ftqg8MC0JUObc7xWL5W14hmjA==} + cpu: [x64] + os: [darwin] + '@rspack/binding-linux-arm64-gnu@1.3.3': resolution: {integrity: sha512-Lluq3RLYzyCMdXr/HyALKEPGsr+196x8Ccuy5AmIRosOdWuwtSiomSRH1Ka8REUFNHfYy5y9SzfmIZo/E0QEmg==} cpu: [arm64] os: [linux] libc: [glibc] - '@rspack/binding-linux-arm64-gnu@1.6.0': - resolution: {integrity: sha512-Jr7aaxrtwOnh7ge7tZP+Mjpo6uNltvQisL25WcjpP+8PnPT0C9jziKDJso7KxeOINXnQ2yRn2h65+HBNb7FQig==} + '@rspack/binding-linux-arm64-gnu@1.7.12': + resolution: {integrity: sha512-C8owWG+yvo7X0oVLIXetkoJhIFBP1LYNcAQqtgLmJnQLQDklGuP83dKC+zISGQWpjawHfZ1ER96vLgoTrxKZdw==} cpu: [arm64] os: [linux] libc: [glibc] @@ -3465,14 +3502,20 @@ packages: os: [linux] libc: [glibc] + '@rspack/binding-linux-arm64-gnu@2.1.2': + resolution: {integrity: sha512-My4m40tyJSgiCEf3bB2KIEX710q3nZg99LIjy+8Zxgi3oZTkg1bFmFRusFU5U4eN5408zfSqDDGvjDE3Yv7o4w==} + cpu: [arm64] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-arm64-musl@1.3.3': resolution: {integrity: sha512-PIsicXWjOqzmoOutUqxpMNkCoKo+8/wxDyKxHFeu+5WIAxVFphe2d3H5qvEjc2MasWSdRmAVn9XiuIj2LIXFzA==} cpu: [arm64] os: [linux] libc: [musl] - '@rspack/binding-linux-arm64-musl@1.6.0': - resolution: {integrity: sha512-hl17reUhkjgkcLao6ZvNiSRQFGFykqUpIj1//v/XtVd/2XAZ0Kt7jv9UUeaR+2zY8piH+tgCkwgefmjmajMeFg==} + '@rspack/binding-linux-arm64-musl@1.7.12': + resolution: {integrity: sha512-i51WWI64aRpsfSki6rN0aepPqXkVfS+vZM7+4bWDcmnhUmdMvhIPcYg0QRk3DtyJnu33jqNLM0WHY78k00NyfA==} cpu: [arm64] os: [linux] libc: [musl] @@ -3483,14 +3526,32 @@ packages: os: [linux] libc: [musl] + '@rspack/binding-linux-arm64-musl@2.1.2': + resolution: {integrity: sha512-yt+GGWUH7WPE8K97cRc8OpZhH7Pbj1vU+lkvKbDtF/rR8X9a/bJsA/nBqyUV2oBKOVbrp5I8rFZlnDskMqgvKw==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rspack/binding-linux-riscv64-gnu@2.1.2': + resolution: {integrity: sha512-uys8Jyw8Z3ralvICbN/L/nZfy5qELIwpOY72rhIqhoDYwFcL4fmMaY7WsvUcJOjCB2rqOcWPaWKuF2oPvo9iDQ==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-riscv64-musl@2.1.2': + resolution: {integrity: sha512-JYNVQwqCaRGQWvjHQYzZkIzQiwllMaJwh4Rdu3ww6W2OJcJUqT08sL1pkOtU0iCxT4VUYiRRcp93VGTGpHr8fg==} + cpu: [riscv64] + os: [linux] + libc: [musl] + '@rspack/binding-linux-x64-gnu@1.3.3': resolution: {integrity: sha512-BtksK73ZFdny2T/wU1x0kxBF4ruYUUArZDyeGfpO+vd/1nNYqzzdhGvOksKmtdvsO38ETr2gZ9+XZyr1vpy9uQ==} cpu: [x64] os: [linux] libc: [glibc] - '@rspack/binding-linux-x64-gnu@1.6.0': - resolution: {integrity: sha512-xdlb+ToerFU/YggndCfIrZI/S/C80CP9ZFw6lhnEFSTJDAG88KptxstsoKUh8YzyPTD45CYaOjYNtUtiv0nScg==} + '@rspack/binding-linux-x64-gnu@1.7.12': + resolution: {integrity: sha512-MSos0FuPEefqo9V92ULd5hggKG29EkSNg1zDcypy0OkpsKh5pfjVxTLYFXgTcVyFoUQQbdG8zFBzYbwmJ8V4ew==} cpu: [x64] os: [linux] libc: [glibc] @@ -3501,14 +3562,20 @@ packages: os: [linux] libc: [glibc] + '@rspack/binding-linux-x64-gnu@2.1.2': + resolution: {integrity: sha512-KDoPy0Msf/JLhxgPPrJQzZeB4Qpqd32em8AP5lSW2s6jR5I35dHgAe9xc2A++EQtnSrU4GTn6DBvFC7q84SihQ==} + cpu: [x64] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-x64-musl@1.3.3': resolution: {integrity: sha512-jx86CxkTmyBz/eHDqZp1mCqBwY+UTEtaPlPoWFyGkJUR5ey6nQnxS+fhG34Rqz63chW+q/afwpGNGyALYdgc8g==} cpu: [x64] os: [linux] libc: [musl] - '@rspack/binding-linux-x64-musl@1.6.0': - resolution: {integrity: sha512-IkXEW/FBPPz4EJJTLNZvA+94aLaW2HgUMYu7zCIw5YMc9JJ/UXexY1zjX/A7yidsCiZCRy/ZrB+veFJ5FkZv7w==} + '@rspack/binding-linux-x64-musl@1.7.12': + resolution: {integrity: sha512-JcAMVKXOnjfpC3coWjCFPWD3Yl8RBw6a+IXQQ8mfRlHaHMIiOv8IfZqx15XRxMUn49CtP7Z0Na8iiAg2aKrcfw==} cpu: [x64] os: [linux] libc: [musl] @@ -3519,21 +3586,31 @@ packages: os: [linux] libc: [musl] - '@rspack/binding-wasm32-wasi@1.6.0': - resolution: {integrity: sha512-XGwX35XXnoTYVUGwDBsKNOkkk/yUsT/RF59u9BwT3QBM5eSXk767xVw/ZeiiyJf5YfI/52HDW2E4QZyvlYyv7g==} + '@rspack/binding-linux-x64-musl@2.1.2': + resolution: {integrity: sha512-66hWmIGvn4zCKAYXJE9Bp5SNSLYnLFq2Ke/efE+ZtWy43Dd5vk9AAOmThVGBwdwmIxmGtHGCp+cAuS4G0wu0TA==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rspack/binding-wasm32-wasi@1.7.12': + resolution: {integrity: sha512-n+ZqP6ZMc0nhOgvadg5VhEs9ojtbES80AcWeFnmGkbzIszvGSO63GKNiRkXtjJ9KFuRzytbbmsCqkUVH+Tywxg==} cpu: [wasm32] '@rspack/binding-wasm32-wasi@2.0.0-alpha.1': resolution: {integrity: sha512-rppGiT7CtXlM8st+IgzBDqb7V//1xx5Oe0SY1sxxw0cfOGMpIQCwhJqx/uI6ioqJLZLGX/obt359+hPXyqGl4w==} cpu: [wasm32] + '@rspack/binding-wasm32-wasi@2.1.2': + resolution: {integrity: sha512-EB4SqH8DW/E/OmqssNQvnIVGQiVUyYNlA/pcc6Ia4MlTNwu6eNDppcNLrToH+kSZpL4CpHSFfSM3eIsSuar2Rw==} + cpu: [wasm32] + '@rspack/binding-win32-arm64-msvc@1.3.3': resolution: {integrity: sha512-uXAdDzajFToVrH3fCNVDP/uKQ9i5FQjJc2aYxsnhS9Su/CZB+UQsOecbq6MnIN2s0B9GBKBG8QdQEtS3RtC6Hg==} cpu: [arm64] os: [win32] - '@rspack/binding-win32-arm64-msvc@1.6.0': - resolution: {integrity: sha512-HOA/U7YC6EB74CpIrT2GrvPgd+TLr0anNuOp/8omw9hH1jjsP5cjUMgWeAGmWyXWxwoS8rRJ0xhRA+UIe3cL3g==} + '@rspack/binding-win32-arm64-msvc@1.7.12': + resolution: {integrity: sha512-8+h5fYDXYdmugbdfZ+D1y8IQ3rv2EhSfyGP7vBe+bjNyaMa4jWrpucmZbtxojUL1AzaeuHbvMdj9UO/gelk/+g==} cpu: [arm64] os: [win32] @@ -3542,13 +3619,18 @@ packages: cpu: [arm64] os: [win32] + '@rspack/binding-win32-arm64-msvc@2.1.2': + resolution: {integrity: sha512-T6Fs/g32MRja/UpCq4AdyPRj8tA0cOkcEa4PrAcn/ztUgK8b/qMVxj5mhMI+n7k+kHZQnpeB1Q4HqdSJi6OocA==} + cpu: [arm64] + os: [win32] + '@rspack/binding-win32-ia32-msvc@1.3.3': resolution: {integrity: sha512-VBE6XsJ3IiAlozAywAIxAZ1Aqc2QVnEwBo0gP9998KkwL7wxB6Bg/OJnPbH3Q0ZaNWAQViC99rPC+5hSIdeSxw==} cpu: [ia32] os: [win32] - '@rspack/binding-win32-ia32-msvc@1.6.0': - resolution: {integrity: sha512-ThczdltBOFcq+IrTflCE+8q0GvKoISt6pTupkuGnI1/bCnqhCxPP6kx8Z06fdJUFMhvBtpZa0gDJvhh3JBZrKA==} + '@rspack/binding-win32-ia32-msvc@1.7.12': + resolution: {integrity: sha512-cDMGwTRSa2p9fNBVe1wTRkF2AEXZ9ARWW36QeC5CkLaI0Ezz8lvhF2+CSOPnhaQ1O1qtn0L0SF+lFnrY+I7xGQ==} cpu: [ia32] os: [win32] @@ -3557,13 +3639,18 @@ packages: cpu: [ia32] os: [win32] + '@rspack/binding-win32-ia32-msvc@2.1.2': + resolution: {integrity: sha512-OtxkFVz14mVL4QK8QriSELn9B6PaYGHw1jGJwVDEzpu2ZxSHCTQPz9dVE1ekYtREEqZUkRU7Fp7VfhJSmjTt2Q==} + cpu: [ia32] + os: [win32] + '@rspack/binding-win32-x64-msvc@1.3.3': resolution: {integrity: sha512-rOsNz4/DFgSENjEh0t9kFn89feuXK14/9wbmmFlT8VMpYOCcj4tKcAHjWg+Nzzj4FL+NSOC/81SrUF9J+C2R7w==} cpu: [x64] os: [win32] - '@rspack/binding-win32-x64-msvc@1.6.0': - resolution: {integrity: sha512-Bhyvsh1m6kIpr1vqZlcdUDUTh0bheRe9SF+f6jw0kPDPbh8FfrRbshPKmRHpRZAUHt20NqgUKR2z2BaKb0IJvQ==} + '@rspack/binding-win32-x64-msvc@1.7.12': + resolution: {integrity: sha512-wIqFvlgFqrgUyj/6S/FJcvShnkZOmIeXTfqvheLY67MGq8qd8jb1YimQVKAIrmWB3yuJKUFACI3Ag1UBtEedEA==} cpu: [x64] os: [win32] @@ -3572,15 +3659,23 @@ packages: cpu: [x64] os: [win32] + '@rspack/binding-win32-x64-msvc@2.1.2': + resolution: {integrity: sha512-Am+nx9fLF3nzgD/K05Bs1Bb+WO8SFLWAYRbXkymaL1r+RQxjRj7jd5ap2PhGOCcfaNA4yVWkAFvmFP92eRu7bQ==} + cpu: [x64] + os: [win32] + '@rspack/binding@1.3.3': resolution: {integrity: sha512-zdwJ801tyC8k+Gu5RjNoc7bEtX0MgJzzVv9qpaMwcAUfUfwZgCzXPTqcGMDoNI+Z47Fw59/2fKCmgZhZn60AgA==} - '@rspack/binding@1.6.0': - resolution: {integrity: sha512-RqlCjvWg/LkJjHpsbI48ebo2SYpIBJsV1eh9SEMfXo1batAPvB5grhAbLX0MRUOtzuQOnZMCDGdr2v7l2L8Siw==} + '@rspack/binding@1.7.12': + resolution: {integrity: sha512-f4HHuLbvuld8Ba4iB/4ibse5XrKxFrgmM3S4P2AOKnPlekAFlBjmltCuaTL/W2ggYvILaVY+YcFXrEH1rrKeQA==} '@rspack/binding@2.0.0-alpha.1': resolution: {integrity: sha512-Glz0SNFYPtNVM+ExJ4ocSzW+oQhb1iHTmxqVEAILbL17Hq3N/nwZpo1cWEs6hJjn8cosJIb1VKbbgb/1goEtCQ==} + '@rspack/binding@2.1.2': + resolution: {integrity: sha512-/mFcRSUW7Pl19KeaBIujJvZYNJQu0wD5D3aa5h+Qcph26v7nmLYlX7eajIHGi8tt2qTZX1lXifw2KLIXKwYaRQ==} + '@rspack/core@1.3.3': resolution: {integrity: sha512-+mXVlFcYr0tWezZfJ/gR0fj8njRc7pzEMtTFa2NO5cfsNAKPF/SXm4rb55kfa63r0b3U3N7f2nKrJG9wyG7zMQ==} engines: {node: '>=16.0.0'} @@ -3593,8 +3688,8 @@ packages: '@swc/helpers': optional: true - '@rspack/core@1.6.0': - resolution: {integrity: sha512-u2GDSToEhmgIsy0QbOPA81i9tu87J2HgSsRA3HHZfWIR8Vt8KdlAriQnG8CatDnvFSY/UQEumVf5Z1HUAQwxCg==} + '@rspack/core@1.7.12': + resolution: {integrity: sha512-6CwFIHlhRmXfZoMj3v9MZ1SMTPBn+cHVXeMIeaGp5sufqinKsISbsqHu6ZMJu2wDSmZLdmQJX6zLxkhcAUlhkQ==} engines: {node: '>=18.12.0'} peerDependencies: '@swc/helpers': '>=0.5.1' @@ -3614,6 +3709,18 @@ packages: '@swc/helpers': optional: true + '@rspack/core@2.1.2': + resolution: {integrity: sha512-crpNQKhHfnzrIl4Sa4fjH30Ho5aAPgyqpmJZ41SkUFOzyKHdZKYfE5LF3CMh7MiFQFPPxiiKf5BcpxmtZZx4MQ==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 + '@swc/helpers': ^0.5.23 + peerDependenciesMeta: + '@module-federation/runtime-tools': + optional: true + '@swc/helpers': + optional: true + '@rspack/lite-tapable@1.0.1': resolution: {integrity: sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==} engines: {node: '>=16.0.0'} @@ -3621,21 +3728,22 @@ packages: '@rspack/lite-tapable@1.1.0': resolution: {integrity: sha512-E2B0JhYFmVAwdDiG14+DW0Di4Ze4Jg10Pc4/lILUrd5DRCaklduz2OvJ5HYQ6G+hd+WTzqQb3QnDNfK4yvAFYw==} - '@rspack/plugin-react-refresh@1.0.0': - resolution: {integrity: sha512-WvXkLewW5G0Mlo5H1b251yDh5FFiH4NDAbYlFpvFjcuXX2AchZRf9zdw57BDE/ADyWsJgA8kixN/zZWBTN3iYA==} + '@rspack/plugin-react-refresh@1.6.0': + resolution: {integrity: sha512-OO53gkrte/Ty4iRXxxM6lkwPGxsSsupFKdrPFnjwFIYrPvFLjeolAl5cTx+FzO5hYygJiGnw7iEKTmD+ptxqDA==} peerDependencies: react-refresh: '>=0.10.0 <1.0.0' + webpack-hot-middleware: 2.x peerDependenciesMeta: - react-refresh: + webpack-hot-middleware: optional: true - '@rspack/plugin-react-refresh@1.6.0': - resolution: {integrity: sha512-OO53gkrte/Ty4iRXxxM6lkwPGxsSsupFKdrPFnjwFIYrPvFLjeolAl5cTx+FzO5hYygJiGnw7iEKTmD+ptxqDA==} + '@rspack/plugin-react-refresh@2.0.2': + resolution: {integrity: sha512-dGNZiCxQxgAUI9sah7gd8u+O7OJZRCmqtEJNDOd8xW5RqcieC86F7p5qcShyw6onH5pKf57evpr2VjGbaFGkZg==} peerDependencies: + '@rspack/core': ^2.0.0 react-refresh: '>=0.10.0 <1.0.0' - webpack-hot-middleware: 2.x peerDependenciesMeta: - webpack-hot-middleware: + '@rspack/core': optional: true '@rspress/core@2.0.0': @@ -3864,8 +3972,8 @@ packages: '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} - '@swc/helpers@0.5.18': - resolution: {integrity: sha512-TXTnIcNJQEKwThMMqBXsZ4VGAza6bvN4pa41Rkqoio6QBKMvo+5lexeTMScGCIxtzgQJzElcvIltani+adC5PQ==} + '@swc/helpers@0.5.23': + resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} '@swc/types@0.1.24': resolution: {integrity: sha512-tjTMh3V4vAORHtdTprLlfoMptu1WfTZG9Rsca6yOKyNYsRr+MUXutKmliB17orgSZk5DpnDxs8GUdd/qwYxOng==} @@ -3874,8 +3982,8 @@ packages: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} - '@tybys/wasm-util@0.10.1': - resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} + '@tybys/wasm-util@0.10.3': + resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} '@types/babel__code-frame@7.0.6': resolution: {integrity: sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==} @@ -4802,6 +4910,11 @@ packages: resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} engines: {node: '>=12.0.0'} + cross-env@7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -9021,7 +9134,7 @@ snapshots: '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.2)': dependencies: @@ -10006,18 +10119,18 @@ snapshots: '@discoveryjs/json-ext@0.5.7': {} - '@emnapi/core@1.7.0': + '@emnapi/core@1.11.1': dependencies: - '@emnapi/wasi-threads': 1.1.0 + '@emnapi/wasi-threads': 1.2.2 tslib: 2.8.1 optional: true - '@emnapi/runtime@1.7.0': + '@emnapi/runtime@1.11.1': dependencies: tslib: 2.8.1 optional: true - '@emnapi/wasi-threads@1.1.0': + '@emnapi/wasi-threads@1.2.2': dependencies: tslib: 2.8.1 optional: true @@ -10596,25 +10709,25 @@ snapshots: '@modern-js/node-bundle-require@2.67.6': dependencies: '@modern-js/utils': 2.67.6 - '@swc/helpers': 0.5.18 + '@swc/helpers': 0.5.23 esbuild: 0.17.19 '@modern-js/node-bundle-require@2.68.2': dependencies: '@modern-js/utils': 2.68.2 - '@swc/helpers': 0.5.18 + '@swc/helpers': 0.5.23 esbuild: 0.25.5 '@modern-js/utils@2.67.6': dependencies: - '@swc/helpers': 0.5.18 + '@swc/helpers': 0.5.23 caniuse-lite: 1.0.30001774 lodash: 4.17.21 rslog: 1.3.2 '@modern-js/utils@2.68.2': dependencies: - '@swc/helpers': 0.5.18 + '@swc/helpers': 0.5.23 caniuse-lite: 1.0.30001774 lodash: 4.17.21 rslog: 1.3.2 @@ -10875,7 +10988,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@0.15.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3)': + '@module-federation/enhanced@0.15.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.15.0 '@module-federation/cli': 0.15.0(typescript@5.9.3) @@ -10885,7 +10998,7 @@ snapshots: '@module-federation/inject-external-runtime-core-plugin': 0.15.0(@module-federation/runtime-tools@0.15.0) '@module-federation/managers': 0.15.0 '@module-federation/manifest': 0.15.0(typescript@5.9.3) - '@module-federation/rspack': 0.15.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(typescript@5.9.3) + '@module-federation/rspack': 0.15.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(typescript@5.9.3) '@module-federation/runtime-tools': 0.15.0 '@module-federation/sdk': 0.15.0 btoa: 1.2.1 @@ -10903,7 +11016,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@0.21.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3)': + '@module-federation/enhanced@0.21.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.21.0 '@module-federation/cli': 0.21.0(typescript@5.9.3) @@ -10913,7 +11026,7 @@ snapshots: '@module-federation/inject-external-runtime-core-plugin': 0.21.0(@module-federation/runtime-tools@0.21.0) '@module-federation/managers': 0.21.0 '@module-federation/manifest': 0.21.0(typescript@5.9.3) - '@module-federation/rspack': 0.21.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(typescript@5.9.3) + '@module-federation/rspack': 0.21.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(typescript@5.9.3) '@module-federation/runtime-tools': 0.21.0 '@module-federation/sdk': 0.21.0 btoa: 1.2.1 @@ -10931,7 +11044,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@0.8.9(@rspack/core@1.6.0(@swc/helpers@0.5.18))(react-dom@19.2.4(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(webpack@5.105.3)': + '@module-federation/enhanced@0.8.9(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-dom@19.2.4(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(webpack@5.105.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.8.9 '@module-federation/data-prefetch': 0.8.9(react-dom@19.2.4(react@19.2.3))(react@19.2.3) @@ -10940,7 +11053,7 @@ snapshots: '@module-federation/inject-external-runtime-core-plugin': 0.8.9(@module-federation/runtime-tools@0.8.9) '@module-federation/managers': 0.8.9 '@module-federation/manifest': 0.8.9(typescript@5.9.3) - '@module-federation/rspack': 0.8.9(@rspack/core@1.6.0(@swc/helpers@0.5.18))(typescript@5.9.3) + '@module-federation/rspack': 0.8.9(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(typescript@5.9.3) '@module-federation/runtime-tools': 0.8.9 '@module-federation/sdk': 0.8.9 btoa: 1.2.1 @@ -10957,7 +11070,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@2.0.1(@rspack/core@1.6.0(@swc/helpers@0.5.18))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3)': + '@module-federation/enhanced@2.0.1(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(webpack@5.105.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 2.0.1 '@module-federation/cli': 2.0.1(typescript@5.9.3) @@ -10967,7 +11080,7 @@ snapshots: '@module-federation/inject-external-runtime-core-plugin': 2.0.1(@module-federation/runtime-tools@2.0.1) '@module-federation/managers': 2.0.1 '@module-federation/manifest': 2.0.1(typescript@5.9.3) - '@module-federation/rspack': 2.0.1(@rspack/core@1.6.0(@swc/helpers@0.5.18))(typescript@5.9.3) + '@module-federation/rspack': 2.0.1(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(typescript@5.9.3) '@module-federation/runtime-tools': 2.0.1 '@module-federation/sdk': 2.0.1 btoa: 1.2.1 @@ -10985,7 +11098,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@2.1.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(react-dom@19.2.4(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(webpack@5.105.3)': + '@module-federation/enhanced@2.1.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-dom@19.2.4(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(webpack@5.105.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 2.1.0 '@module-federation/cli': 2.1.0(typescript@5.9.3) @@ -10995,7 +11108,7 @@ snapshots: '@module-federation/inject-external-runtime-core-plugin': 2.1.0(@module-federation/runtime-tools@2.1.0) '@module-federation/managers': 2.1.0 '@module-federation/manifest': 2.1.0(typescript@5.9.3) - '@module-federation/rspack': 2.1.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(typescript@5.9.3) + '@module-federation/rspack': 2.1.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(typescript@5.9.3) '@module-federation/runtime-tools': 2.1.0 '@module-federation/sdk': 2.1.0 btoa: 1.2.1 @@ -11019,7 +11132,7 @@ snapshots: '@module-federation/error-codes@0.21.0': {} - '@module-federation/error-codes@0.21.2': {} + '@module-federation/error-codes@0.22.0': {} '@module-federation/error-codes@0.8.9': {} @@ -11152,7 +11265,7 @@ snapshots: - utf-8-validate - vue-tsc - '@module-federation/rspack@0.15.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(typescript@5.9.3)': + '@module-federation/rspack@0.15.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(typescript@5.9.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.15.0 '@module-federation/dts-plugin': 0.15.0(typescript@5.9.3) @@ -11161,7 +11274,7 @@ snapshots: '@module-federation/manifest': 0.15.0(typescript@5.9.3) '@module-federation/runtime-tools': 0.15.0 '@module-federation/sdk': 0.15.0 - '@rspack/core': 1.6.0(@swc/helpers@0.5.18) + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) btoa: 1.2.1 optionalDependencies: typescript: 5.9.3 @@ -11171,7 +11284,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/rspack@0.21.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(typescript@5.9.3)': + '@module-federation/rspack@0.21.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(typescript@5.9.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.21.0 '@module-federation/dts-plugin': 0.21.0(typescript@5.9.3) @@ -11180,7 +11293,7 @@ snapshots: '@module-federation/manifest': 0.21.0(typescript@5.9.3) '@module-federation/runtime-tools': 0.21.0 '@module-federation/sdk': 0.21.0 - '@rspack/core': 1.6.0(@swc/helpers@0.5.18) + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) btoa: 1.2.1 optionalDependencies: typescript: 5.9.3 @@ -11190,7 +11303,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/rspack@0.8.9(@rspack/core@1.6.0(@swc/helpers@0.5.18))(typescript@5.9.3)': + '@module-federation/rspack@0.8.9(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(typescript@5.9.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.8.9 '@module-federation/dts-plugin': 0.8.9(typescript@5.9.3) @@ -11199,7 +11312,7 @@ snapshots: '@module-federation/manifest': 0.8.9(typescript@5.9.3) '@module-federation/runtime-tools': 0.8.9 '@module-federation/sdk': 0.8.9 - '@rspack/core': 1.6.0(@swc/helpers@0.5.18) + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: @@ -11208,7 +11321,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/rspack@2.0.1(@rspack/core@1.6.0(@swc/helpers@0.5.18))(typescript@5.9.3)': + '@module-federation/rspack@2.0.1(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(typescript@5.9.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 2.0.1 '@module-federation/dts-plugin': 2.0.1(typescript@5.9.3) @@ -11217,7 +11330,7 @@ snapshots: '@module-federation/manifest': 2.0.1(typescript@5.9.3) '@module-federation/runtime-tools': 2.0.1 '@module-federation/sdk': 2.0.1 - '@rspack/core': 1.6.0(@swc/helpers@0.5.18) + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) btoa: 1.2.1 optionalDependencies: typescript: 5.9.3 @@ -11227,7 +11340,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/rspack@2.1.0(@rspack/core@1.6.0(@swc/helpers@0.5.18))(typescript@5.9.3)': + '@module-federation/rspack@2.1.0(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(typescript@5.9.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 2.1.0 '@module-federation/dts-plugin': 2.1.0(typescript@5.9.3) @@ -11236,7 +11349,7 @@ snapshots: '@module-federation/manifest': 2.1.0(typescript@5.9.3) '@module-federation/runtime-tools': 2.1.0 '@module-federation/sdk': 2.1.0 - '@rspack/core': 1.6.0(@swc/helpers@0.5.18) + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) btoa: 1.2.1 optionalDependencies: typescript: 5.9.3 @@ -11261,10 +11374,10 @@ snapshots: '@module-federation/error-codes': 0.21.0 '@module-federation/sdk': 0.21.0 - '@module-federation/runtime-core@0.21.2': + '@module-federation/runtime-core@0.22.0': dependencies: - '@module-federation/error-codes': 0.21.2 - '@module-federation/sdk': 0.21.2 + '@module-federation/error-codes': 0.22.0 + '@module-federation/sdk': 0.22.0 '@module-federation/runtime-core@0.6.17': dependencies: @@ -11296,10 +11409,10 @@ snapshots: '@module-federation/runtime': 0.21.0 '@module-federation/webpack-bundler-runtime': 0.21.0 - '@module-federation/runtime-tools@0.21.2': + '@module-federation/runtime-tools@0.22.0': dependencies: - '@module-federation/runtime': 0.21.2 - '@module-federation/webpack-bundler-runtime': 0.21.2 + '@module-federation/runtime': 0.22.0 + '@module-federation/webpack-bundler-runtime': 0.22.0 '@module-federation/runtime-tools@0.8.9': dependencies: @@ -11334,11 +11447,11 @@ snapshots: '@module-federation/runtime-core': 0.21.0 '@module-federation/sdk': 0.21.0 - '@module-federation/runtime@0.21.2': + '@module-federation/runtime@0.22.0': dependencies: - '@module-federation/error-codes': 0.21.2 - '@module-federation/runtime-core': 0.21.2 - '@module-federation/sdk': 0.21.2 + '@module-federation/error-codes': 0.22.0 + '@module-federation/runtime-core': 0.22.0 + '@module-federation/sdk': 0.22.0 '@module-federation/runtime@0.8.9': dependencies: @@ -11364,7 +11477,7 @@ snapshots: '@module-federation/sdk@0.21.0': {} - '@module-federation/sdk@0.21.2': {} + '@module-federation/sdk@0.22.0': {} '@module-federation/sdk@0.6.10': {} @@ -11421,10 +11534,10 @@ snapshots: '@module-federation/runtime': 0.21.0 '@module-federation/sdk': 0.21.0 - '@module-federation/webpack-bundler-runtime@0.21.2': + '@module-federation/webpack-bundler-runtime@0.22.0': dependencies: - '@module-federation/runtime': 0.21.2 - '@module-federation/sdk': 0.21.2 + '@module-federation/runtime': 0.22.0 + '@module-federation/sdk': 0.22.0 '@module-federation/webpack-bundler-runtime@0.8.9': dependencies: @@ -11443,9 +11556,16 @@ snapshots: '@napi-rs/wasm-runtime@1.0.7': dependencies: - '@emnapi/core': 1.7.0 - '@emnapi/runtime': 1.7.0 - '@tybys/wasm-util': 0.10.1 + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@tybys/wasm-util': 0.10.3 + optional: true + + '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@tybys/wasm-util': 0.10.3 optional: true '@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3': @@ -11882,9 +12002,9 @@ snapshots: '@rsbuild/core@1.3.5': dependencies: - '@rspack/core': 1.3.3(@swc/helpers@0.5.18) + '@rspack/core': 1.3.3(@swc/helpers@0.5.23) '@rspack/lite-tapable': 1.0.1 - '@swc/helpers': 0.5.18 + '@swc/helpers': 0.5.23 core-js: 3.41.0 jiti: 2.6.1 transitivePeerDependencies: @@ -11892,9 +12012,9 @@ snapshots: '@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0)': dependencies: - '@rspack/core': 2.0.0-alpha.1(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.18) + '@rspack/core': 2.0.0-alpha.1(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) '@rspack/lite-tapable': 1.1.0 - '@swc/helpers': 0.5.18 + '@swc/helpers': 0.5.23 jiti: 2.6.1 optionalDependencies: core-js: 3.41.0 @@ -11921,13 +12041,13 @@ snapshots: '@rsdoctor/client@1.5.2': {} - '@rsdoctor/core@1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)))': + '@rsdoctor/core@1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)))': dependencies: '@rsbuild/plugin-check-syntax': 1.6.1(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0)) - '@rsdoctor/graph': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) - '@rsdoctor/sdk': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) - '@rsdoctor/types': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) - '@rsdoctor/utils': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) + '@rsdoctor/graph': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) + '@rsdoctor/sdk': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) + '@rsdoctor/types': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) + '@rsdoctor/utils': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) browserslist-load-config: 1.0.1 enhanced-resolve: 5.12.0 es-toolkit: 1.44.0 @@ -11943,13 +12063,13 @@ snapshots: - utf-8-validate - webpack - '@rsdoctor/core@1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3)': + '@rsdoctor/core@1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3)': dependencies: '@rsbuild/plugin-check-syntax': 1.6.1(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0)) - '@rsdoctor/graph': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) - '@rsdoctor/sdk': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) - '@rsdoctor/types': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) - '@rsdoctor/utils': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) + '@rsdoctor/graph': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) + '@rsdoctor/sdk': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) + '@rsdoctor/types': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) + '@rsdoctor/utils': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) browserslist-load-config: 1.0.1 enhanced-resolve: 5.12.0 es-toolkit: 1.44.0 @@ -11965,10 +12085,10 @@ snapshots: - utf-8-validate - webpack - '@rsdoctor/graph@1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)))': + '@rsdoctor/graph@1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)))': dependencies: - '@rsdoctor/types': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) - '@rsdoctor/utils': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) + '@rsdoctor/types': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) + '@rsdoctor/utils': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) es-toolkit: 1.44.0 path-browserify: 1.0.1 source-map: 0.7.6 @@ -11976,10 +12096,10 @@ snapshots: - '@rspack/core' - webpack - '@rsdoctor/graph@1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3)': + '@rsdoctor/graph@1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3)': dependencies: - '@rsdoctor/types': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) - '@rsdoctor/utils': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) + '@rsdoctor/types': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) + '@rsdoctor/utils': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) es-toolkit: 1.44.0 path-browserify: 1.0.1 source-map: 0.7.6 @@ -11987,15 +12107,15 @@ snapshots: - '@rspack/core' - webpack - '@rsdoctor/rspack-plugin@1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)))': + '@rsdoctor/rspack-plugin@1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)))': dependencies: - '@rsdoctor/core': 1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) - '@rsdoctor/graph': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) - '@rsdoctor/sdk': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) - '@rsdoctor/types': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) - '@rsdoctor/utils': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) + '@rsdoctor/core': 1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) + '@rsdoctor/graph': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) + '@rsdoctor/sdk': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) + '@rsdoctor/types': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) + '@rsdoctor/utils': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) optionalDependencies: - '@rspack/core': 1.6.0(@swc/helpers@0.5.18) + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) transitivePeerDependencies: - '@rsbuild/core' - bufferutil @@ -12003,15 +12123,15 @@ snapshots: - utf-8-validate - webpack - '@rsdoctor/rspack-plugin@1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3)': + '@rsdoctor/rspack-plugin@1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3)': dependencies: - '@rsdoctor/core': 1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) - '@rsdoctor/graph': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) - '@rsdoctor/sdk': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) - '@rsdoctor/types': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) - '@rsdoctor/utils': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) + '@rsdoctor/core': 1.5.2(@rsbuild/core@2.0.0-alpha.4(@module-federation/runtime-tools@2.1.0)(core-js@3.41.0))(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) + '@rsdoctor/graph': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) + '@rsdoctor/sdk': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) + '@rsdoctor/types': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) + '@rsdoctor/utils': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) optionalDependencies: - '@rspack/core': 1.6.0(@swc/helpers@0.5.18) + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) transitivePeerDependencies: - '@rsbuild/core' - bufferutil @@ -12019,12 +12139,12 @@ snapshots: - utf-8-validate - webpack - '@rsdoctor/sdk@1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)))': + '@rsdoctor/sdk@1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)))': dependencies: '@rsdoctor/client': 1.5.2 - '@rsdoctor/graph': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) - '@rsdoctor/types': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) - '@rsdoctor/utils': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) + '@rsdoctor/graph': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) + '@rsdoctor/types': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) + '@rsdoctor/utils': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) safer-buffer: 2.1.2 socket.io: 4.8.1 tapable: 2.2.3 @@ -12035,12 +12155,12 @@ snapshots: - utf-8-validate - webpack - '@rsdoctor/sdk@1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3)': + '@rsdoctor/sdk@1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3)': dependencies: '@rsdoctor/client': 1.5.2 - '@rsdoctor/graph': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) - '@rsdoctor/types': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) - '@rsdoctor/utils': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) + '@rsdoctor/graph': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) + '@rsdoctor/types': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) + '@rsdoctor/utils': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) safer-buffer: 2.1.2 socket.io: 4.8.1 tapable: 2.2.3 @@ -12051,30 +12171,30 @@ snapshots: - utf-8-validate - webpack - '@rsdoctor/types@1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)))': + '@rsdoctor/types@1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)))': dependencies: '@types/connect': 3.4.38 '@types/estree': 1.0.5 '@types/tapable': 2.2.7 source-map: 0.7.6 optionalDependencies: - '@rspack/core': 1.6.0(@swc/helpers@0.5.18) - webpack: 5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)) + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) + webpack: 5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)) - '@rsdoctor/types@1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3)': + '@rsdoctor/types@1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3)': dependencies: '@types/connect': 3.4.38 '@types/estree': 1.0.5 '@types/tapable': 2.2.7 source-map: 0.7.6 optionalDependencies: - '@rspack/core': 1.6.0(@swc/helpers@0.5.18) + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) webpack: 5.105.3 - '@rsdoctor/utils@1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)))': + '@rsdoctor/utils@1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)))': dependencies: '@babel/code-frame': 7.26.2 - '@rsdoctor/types': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) + '@rsdoctor/types': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) '@types/estree': 1.0.5 acorn: 8.16.0 acorn-import-attributes: 1.9.5(acorn@8.16.0) @@ -12092,10 +12212,10 @@ snapshots: - '@rspack/core' - webpack - '@rsdoctor/utils@1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3)': + '@rsdoctor/utils@1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3)': dependencies: '@babel/code-frame': 7.26.2 - '@rsdoctor/types': 1.5.2(@rspack/core@1.6.0(@swc/helpers@0.5.18))(webpack@5.105.3) + '@rsdoctor/types': 1.5.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(webpack@5.105.3) '@types/estree': 1.0.5 acorn: 8.16.0 acorn-import-attributes: 1.9.5(acorn@8.16.0) @@ -12126,58 +12246,82 @@ snapshots: '@rspack/binding-darwin-arm64@1.3.3': optional: true - '@rspack/binding-darwin-arm64@1.6.0': + '@rspack/binding-darwin-arm64@1.7.12': optional: true '@rspack/binding-darwin-arm64@2.0.0-alpha.1': optional: true + '@rspack/binding-darwin-arm64@2.1.2': + optional: true + '@rspack/binding-darwin-x64@1.3.3': optional: true - '@rspack/binding-darwin-x64@1.6.0': + '@rspack/binding-darwin-x64@1.7.12': optional: true '@rspack/binding-darwin-x64@2.0.0-alpha.1': optional: true + '@rspack/binding-darwin-x64@2.1.2': + optional: true + '@rspack/binding-linux-arm64-gnu@1.3.3': optional: true - '@rspack/binding-linux-arm64-gnu@1.6.0': + '@rspack/binding-linux-arm64-gnu@1.7.12': optional: true '@rspack/binding-linux-arm64-gnu@2.0.0-alpha.1': optional: true + '@rspack/binding-linux-arm64-gnu@2.1.2': + optional: true + '@rspack/binding-linux-arm64-musl@1.3.3': optional: true - '@rspack/binding-linux-arm64-musl@1.6.0': + '@rspack/binding-linux-arm64-musl@1.7.12': optional: true '@rspack/binding-linux-arm64-musl@2.0.0-alpha.1': optional: true + '@rspack/binding-linux-arm64-musl@2.1.2': + optional: true + + '@rspack/binding-linux-riscv64-gnu@2.1.2': + optional: true + + '@rspack/binding-linux-riscv64-musl@2.1.2': + optional: true + '@rspack/binding-linux-x64-gnu@1.3.3': optional: true - '@rspack/binding-linux-x64-gnu@1.6.0': + '@rspack/binding-linux-x64-gnu@1.7.12': optional: true '@rspack/binding-linux-x64-gnu@2.0.0-alpha.1': optional: true + '@rspack/binding-linux-x64-gnu@2.1.2': + optional: true + '@rspack/binding-linux-x64-musl@1.3.3': optional: true - '@rspack/binding-linux-x64-musl@1.6.0': + '@rspack/binding-linux-x64-musl@1.7.12': optional: true '@rspack/binding-linux-x64-musl@2.0.0-alpha.1': optional: true - '@rspack/binding-wasm32-wasi@1.6.0': + '@rspack/binding-linux-x64-musl@2.1.2': + optional: true + + '@rspack/binding-wasm32-wasi@1.7.12': dependencies: '@napi-rs/wasm-runtime': 1.0.7 optional: true @@ -12187,33 +12331,49 @@ snapshots: '@napi-rs/wasm-runtime': 1.0.7 optional: true + '@rspack/binding-wasm32-wasi@2.1.2': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + optional: true + '@rspack/binding-win32-arm64-msvc@1.3.3': optional: true - '@rspack/binding-win32-arm64-msvc@1.6.0': + '@rspack/binding-win32-arm64-msvc@1.7.12': optional: true '@rspack/binding-win32-arm64-msvc@2.0.0-alpha.1': optional: true + '@rspack/binding-win32-arm64-msvc@2.1.2': + optional: true + '@rspack/binding-win32-ia32-msvc@1.3.3': optional: true - '@rspack/binding-win32-ia32-msvc@1.6.0': + '@rspack/binding-win32-ia32-msvc@1.7.12': optional: true '@rspack/binding-win32-ia32-msvc@2.0.0-alpha.1': optional: true + '@rspack/binding-win32-ia32-msvc@2.1.2': + optional: true + '@rspack/binding-win32-x64-msvc@1.3.3': optional: true - '@rspack/binding-win32-x64-msvc@1.6.0': + '@rspack/binding-win32-x64-msvc@1.7.12': optional: true '@rspack/binding-win32-x64-msvc@2.0.0-alpha.1': optional: true + '@rspack/binding-win32-x64-msvc@2.1.2': + optional: true + '@rspack/binding@1.3.3': optionalDependencies: '@rspack/binding-darwin-arm64': 1.3.3 @@ -12226,18 +12386,18 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 1.3.3 '@rspack/binding-win32-x64-msvc': 1.3.3 - '@rspack/binding@1.6.0': + '@rspack/binding@1.7.12': optionalDependencies: - '@rspack/binding-darwin-arm64': 1.6.0 - '@rspack/binding-darwin-x64': 1.6.0 - '@rspack/binding-linux-arm64-gnu': 1.6.0 - '@rspack/binding-linux-arm64-musl': 1.6.0 - '@rspack/binding-linux-x64-gnu': 1.6.0 - '@rspack/binding-linux-x64-musl': 1.6.0 - '@rspack/binding-wasm32-wasi': 1.6.0 - '@rspack/binding-win32-arm64-msvc': 1.6.0 - '@rspack/binding-win32-ia32-msvc': 1.6.0 - '@rspack/binding-win32-x64-msvc': 1.6.0 + '@rspack/binding-darwin-arm64': 1.7.12 + '@rspack/binding-darwin-x64': 1.7.12 + '@rspack/binding-linux-arm64-gnu': 1.7.12 + '@rspack/binding-linux-arm64-musl': 1.7.12 + '@rspack/binding-linux-x64-gnu': 1.7.12 + '@rspack/binding-linux-x64-musl': 1.7.12 + '@rspack/binding-wasm32-wasi': 1.7.12 + '@rspack/binding-win32-arm64-msvc': 1.7.12 + '@rspack/binding-win32-ia32-msvc': 1.7.12 + '@rspack/binding-win32-x64-msvc': 1.7.12 '@rspack/binding@2.0.0-alpha.1': optionalDependencies: @@ -12252,47 +12412,74 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 2.0.0-alpha.1 '@rspack/binding-win32-x64-msvc': 2.0.0-alpha.1 - '@rspack/core@1.3.3(@swc/helpers@0.5.18)': + '@rspack/binding@2.1.2': + optionalDependencies: + '@rspack/binding-darwin-arm64': 2.1.2 + '@rspack/binding-darwin-x64': 2.1.2 + '@rspack/binding-linux-arm64-gnu': 2.1.2 + '@rspack/binding-linux-arm64-musl': 2.1.2 + '@rspack/binding-linux-riscv64-gnu': 2.1.2 + '@rspack/binding-linux-riscv64-musl': 2.1.2 + '@rspack/binding-linux-x64-gnu': 2.1.2 + '@rspack/binding-linux-x64-musl': 2.1.2 + '@rspack/binding-wasm32-wasi': 2.1.2 + '@rspack/binding-win32-arm64-msvc': 2.1.2 + '@rspack/binding-win32-ia32-msvc': 2.1.2 + '@rspack/binding-win32-x64-msvc': 2.1.2 + + '@rspack/core@1.3.3(@swc/helpers@0.5.23)': dependencies: '@module-federation/runtime-tools': 0.11.2 '@rspack/binding': 1.3.3 '@rspack/lite-tapable': 1.0.1 caniuse-lite: 1.0.30001774 optionalDependencies: - '@swc/helpers': 0.5.18 + '@swc/helpers': 0.5.23 - '@rspack/core@1.6.0(@swc/helpers@0.5.18)': + '@rspack/core@1.7.12(@swc/helpers@0.5.23)': dependencies: - '@module-federation/runtime-tools': 0.21.2 - '@rspack/binding': 1.6.0 - '@rspack/lite-tapable': 1.0.1 + '@module-federation/runtime-tools': 0.22.0 + '@rspack/binding': 1.7.12 + '@rspack/lite-tapable': 1.1.0 optionalDependencies: - '@swc/helpers': 0.5.18 + '@swc/helpers': 0.5.23 - '@rspack/core@2.0.0-alpha.1(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.18)': + '@rspack/core@2.0.0-alpha.1(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23)': dependencies: '@rspack/binding': 2.0.0-alpha.1 '@rspack/lite-tapable': 1.1.0 optionalDependencies: '@module-federation/runtime-tools': 2.1.0 - '@swc/helpers': 0.5.18 + '@swc/helpers': 0.5.23 + + '@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23)': + dependencies: + '@rspack/binding': 2.1.2 + optionalDependencies: + '@module-federation/runtime-tools': 2.1.0 + '@swc/helpers': 0.5.23 '@rspack/lite-tapable@1.0.1': {} '@rspack/lite-tapable@1.1.0': {} - '@rspack/plugin-react-refresh@1.0.0(react-refresh@0.14.2)': + '@rspack/plugin-react-refresh@1.6.0(react-refresh@0.18.0)': dependencies: error-stack-parser: 2.1.4 html-entities: 2.6.0 - optionalDependencies: + react-refresh: 0.18.0 + + '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-refresh@0.14.2)': + dependencies: react-refresh: 0.14.2 + optionalDependencies: + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) - '@rspack/plugin-react-refresh@1.6.0(react-refresh@0.18.0)': + '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(react-refresh@0.18.0)': dependencies: - error-stack-parser: 2.1.4 - html-entities: 2.6.0 react-refresh: 0.18.0 + optionalDependencies: + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) '@rspress/core@2.0.0(@module-federation/runtime-tools@2.1.0)(@types/react@18.3.3)(core-js@3.41.0)': dependencies: @@ -12553,7 +12740,7 @@ snapshots: '@swc/core-win32-x64-msvc@1.13.3': optional: true - '@swc/core@1.13.3(@swc/helpers@0.5.18)': + '@swc/core@1.13.3(@swc/helpers@0.5.23)': dependencies: '@swc/counter': 0.1.3 '@swc/types': 0.1.24 @@ -12568,11 +12755,11 @@ snapshots: '@swc/core-win32-arm64-msvc': 1.13.3 '@swc/core-win32-ia32-msvc': 1.13.3 '@swc/core-win32-x64-msvc': 1.13.3 - '@swc/helpers': 0.5.18 + '@swc/helpers': 0.5.23 '@swc/counter@0.1.3': {} - '@swc/helpers@0.5.18': + '@swc/helpers@0.5.23': dependencies: tslib: 2.8.1 @@ -12582,7 +12769,7 @@ snapshots: '@trysound/sax@0.2.0': {} - '@tybys/wasm-util@0.10.1': + '@tybys/wasm-util@0.10.3': dependencies: tslib: 2.8.1 optional: true @@ -13565,6 +13752,10 @@ snapshots: dependencies: luxon: 3.5.0 + cross-env@7.0.3: + dependencies: + cross-spawn: 7.0.6 + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -16616,15 +16807,15 @@ snapshots: optionalDependencies: postcss: 8.5.6 - postcss-loader@8.1.1(@rspack/core@1.6.0(@swc/helpers@0.5.18))(postcss@8.5.6)(typescript@5.9.3)(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))): + postcss-loader@8.1.1(@rspack/core@2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23))(postcss@8.5.6)(typescript@5.9.3)(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))): dependencies: cosmiconfig: 9.0.0(typescript@5.9.3) jiti: 1.21.7 postcss: 8.5.6 semver: 7.7.4 optionalDependencies: - '@rspack/core': 1.6.0(@swc/helpers@0.5.18) - webpack: 5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)) + '@rspack/core': 2.1.2(@module-federation/runtime-tools@2.1.0)(@swc/helpers@0.5.23) + webpack: 5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)) transitivePeerDependencies: - typescript @@ -17698,16 +17889,16 @@ snapshots: term-size@2.2.1: {} - terser-webpack-plugin@5.3.16(@swc/core@1.13.3(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))): + terser-webpack-plugin@5.3.16(@swc/core@1.13.3(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 serialize-javascript: 6.0.2 terser: 5.31.3 - webpack: 5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)) + webpack: 5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)) optionalDependencies: - '@swc/core': 1.13.3(@swc/helpers@0.5.18) + '@swc/core': 1.13.3(@swc/helpers@0.5.23) terser-webpack-plugin@5.3.16(webpack@5.105.3): dependencies: @@ -17743,13 +17934,13 @@ snapshots: dependencies: tslib: 2.8.1 - thread-loader@4.0.4(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))): + thread-loader@4.0.4(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))): dependencies: json-parse-better-errors: 1.0.2 loader-runner: 4.3.1 neo-async: 2.6.2 schema-utils: 4.3.3 - webpack: 5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)) + webpack: 5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)) thread-stream@4.0.0: dependencies: @@ -18112,7 +18303,7 @@ snapshots: - esbuild - uglify-js - webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18)): + webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23)): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -18136,7 +18327,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.0 - terser-webpack-plugin: 5.3.16(@swc/core@1.13.3(@swc/helpers@0.5.18))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.18))) + terser-webpack-plugin: 5.3.16(@swc/core@1.13.3(@swc/helpers@0.5.23))(webpack@5.105.3(@swc/core@1.13.3(@swc/helpers@0.5.23))) watchpack: 2.5.1 webpack-sources: 3.3.4 transitivePeerDependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index c814f125b..988b9d2f9 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,9 @@ packages: - "packages/*" - "apps/*" + # standalone Rspack 1 lab - has its own node_modules and installs repack + # from a packed tarball, so workspace resolution never leaks into it + - "!apps/tester-app-rspack1" - "tests/*" - "website" @@ -19,10 +22,16 @@ allowBuilds: "core-js": true "esbuild": true +# Rspack 2 is the workspace default - it is the maintained line and what +# in-workspace apps actually run (repack's own @rspack/core@^2 devDependency +# shadows any app-level pin; see agent_context/rspackv2-jul2026/08). The +# Rspack 1 surfaces are the standalone apps/tester-app-rspack1 lab and +# repack's aliased @rspack/core-v1 jest lane (pnpm test:rspack1). catalog: - "@rspack/core": ^1.6.0 + "@rspack/core": ^2.1.2 + "@rspack/plugin-react-refresh": ^2.0.2 "@rslib/core": ^0.6.3 - "@swc/helpers": ~0.5.17 + "@swc/helpers": ^0.5.23 "@types/node": ^20.19.31 "terser-webpack-plugin": ^5.3.14 "typescript": ^5.9.3 diff --git a/tests/integration/src/plugins/NativeEntryPlugin.test.ts b/tests/integration/src/plugins/NativeEntryPlugin.test.ts index 0f08026b5..b72b1e8b4 100644 --- a/tests/integration/src/plugins/NativeEntryPlugin.test.ts +++ b/tests/integration/src/plugins/NativeEntryPlugin.test.ts @@ -54,14 +54,31 @@ function normalizeBundle(code: string): string { // Webpack mangles absolute paths into variable names with underscores const mangledRoot = REPO_ROOT.replaceAll(/[^a-zA-Z0-9]/g, '_'); const compactMangledRoot = mangledRoot.replaceAll(/_+/g, '_'); - return code - .replaceAll(REPO_ROOT, '') - .replaceAll(mangledRoot, '_rootDir_') - .replaceAll(compactMangledRoot, '_rootDir_') - .replace( - /\.federation\/entry\.[a-f0-9]+\.js/g, - '.federation/entry.HASH.js' - ); + return ( + code + .replaceAll( + // Rspack 2 colorizes the diagnostics it inlines into error-stub modules + // when the environment enables color (e.g. CI). The codes reach the + // bundle as escaped text (backslash-u001b) inside the stub error's + // string literal - strip both forms so snapshots are env-independent. + /(?:\u001b|\\u001b)\[[0-9;]*m/g, + '' + ) + .replaceAll(REPO_ROOT, '') + // MF v2's embed_federation_runtime (0.15.x/0.21.x) inlines a data: URI + // module whose URL-encoded source embeds the absolute path to + // @module-federation/webpack-bundler-runtime + .replaceAll( + encodeURIComponent(REPO_ROOT), + encodeURIComponent('') + ) + .replaceAll(mangledRoot, '_rootDir_') + .replaceAll(compactMangledRoot, '_rootDir_') + .replace( + /\.federation\/entry\.[a-f0-9]+\.js/g, + '.federation/entry.HASH.js' + ) + ); } /** @@ -152,6 +169,7 @@ function extractModuleIdByMarker(code: string, marker: string): string { if (moduleBody.includes(marker)) return moduleId; } + // Rspack 1 module factories: `id: (function (args) { ... }),` const rspackModuleRegex = /\n([^\s:\n]+):\s*\(function\s*\([^)]*\)\s*\{([\s\S]*?)\n\}\),/g; for (const match of code.matchAll(rspackModuleRegex)) { @@ -160,11 +178,19 @@ function extractModuleIdByMarker(code: string, marker: string): string { if (moduleBody.includes(marker)) return moduleId; } + // Rspack 2 module factories use shorthand method syntax: `id(args) { ... },` + const rspack2ModuleRegex = /\n([^\s:\n(]+)\([^)]*\)\s*\{([\s\S]*?)\n\},/g; + for (const match of code.matchAll(rspack2ModuleRegex)) { + const moduleId = normalizeModuleId(match[1]); + const moduleBody = match[2]; + if (moduleBody.includes(marker)) return moduleId; + } + throw new Error(`Could not find module id for marker "${marker}" in bundle`); } function extractRuntimePolyfillRequireIds(code: string): string[] { - const runtimeStart = code.indexOf('runtime/repack/polyfills'); + const runtimeStart = code.indexOf('repack/polyfills'); expect(runtimeStart).toBeGreaterThan(-1); const startupStart = code.indexOf('// startup', runtimeStart); expect(startupStart).toBeGreaterThan(runtimeStart); @@ -182,7 +208,7 @@ function getStartupSection(code: string): string { } function getRuntimeAndStartupSnippet(code: string): string { - const runtimeStart = code.indexOf('runtime/repack/polyfills'); + const runtimeStart = code.indexOf('repack/polyfills'); expect(runtimeStart).toBeGreaterThan(-1); return code.slice(runtimeStart, runtimeStart + 900); } @@ -224,7 +250,7 @@ describe('NativeEntryPlugin', () => { // Polyfills runtime module IIFE executes before inline startup entries expectBundleOrder(code, [ - 'webpack/runtime/repack/polyfills', + 'repack/polyfills', 'Load entry module and return exports', ]); @@ -331,7 +357,7 @@ describe('NativeEntryPlugin', () => { // With all-eager shared modules, MF v1 uses inline startup (no deferred wrapper) // Polyfills runtime module IIFE executes before inline startup entries expectBundleOrder(code, [ - 'webpack/runtime/repack/polyfills', + 'repack/polyfills', 'Load entry module and return exports', ]); @@ -394,14 +420,16 @@ describe('NativeEntryPlugin', () => { expect(code).toContain('__POLYFILL_2__'); if (bundlerType === 'rspack') { - // Rspack MF v2 wraps startup via embed_federation_runtime: - // 1. embed_federation_runtime saves original __webpack_require__.x and wraps it - // 2. repack/polyfills IIFE executes (polyfills loaded immediately) - // 3. __webpack_require__.x() called → MF init → original startup (polyfills are cache hits) + // Rspack MF v2 wraps startup via embed_federation_runtime: it saves + // the original __webpack_require__.x and wraps it, while the + // repack/polyfills IIFE executes during runtime-section evaluation. + // The relative order of the two runtime modules differs between + // Rspack majors (polyfills first on 2.x, embed first on 1.x) - the + // invariant is that polyfills execute before __webpack_require__.x() + // is invoked (MF init → original startup, polyfills are cache hits). expect(code).toContain('embed_federation_runtime'); expectBundleOrder(code, [ - 'embed_federation_runtime', - 'webpack/runtime/repack/polyfills', + 'repack/polyfills', '__webpack_require__.x()', ]); } else { @@ -409,10 +437,7 @@ describe('NativeEntryPlugin', () => { // 1. repack/polyfills IIFE executes (polyfills loaded immediately) // 2. Inline startup begins: federation entry, then polyfills (cache hits), then app expect(code).toContain('.federation/entry'); - expectBundleOrder(code, [ - 'webpack/runtime/repack/polyfills', - '.federation/entry', - ]); + expectBundleOrder(code, ['repack/polyfills', '.federation/entry']); } expect(normalizeBundle(code)).toMatchSnapshot(); diff --git a/tests/integration/src/plugins/__snapshots__/rspack/NativeEntryPlugin.test.ts.snap b/tests/integration/src/plugins/__snapshots__/rspack/NativeEntryPlugin.test.ts.snap index 410b2ec7b..f93e5d094 100644 --- a/tests/integration/src/plugins/__snapshots__/rspack/NativeEntryPlugin.test.ts.snap +++ b/tests/integration/src/plugins/__snapshots__/rspack/NativeEntryPlugin.test.ts.snap @@ -1,13 +1,9 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`NativeEntryPlugin > with Module Federation v1 > should execute polyfills runtime module before MF v1 startup 1`] = ` -"(() => { // webpackBootstrap +"(() => { var __webpack_modules__ = ({ -"../../../../packages/repack/dist/modules/IncludeModules.js": -/*!******************************************************************!*\\ - !*** ../../../../packages/repack/dist/modules/IncludeModules.js ***! - \\******************************************************************/ -(function () { +"../../../../packages/repack/dist/modules/IncludeModules.js"() { /* * This module is added as an entry module to prevent stripping of these React Native deep imports from the bundle. * We use require.resolve from Rspack/Webpack to ensure these modules are included even if not directly used. @@ -15,59 +11,38 @@ var __webpack_modules__ = ({ * These modules are required by assetsLoader and should be shared as deep imports when using ModuleFederation. */ -/*require.resolve*/(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetRegistry'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); -/*require.resolve*/(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetSourceResolver'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); +/*require.resolve*/(Object(function __rspack_missing_module() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetRegistry'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); +/*require.resolve*/(Object(function __rspack_missing_module() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetSourceResolver'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); -}), -"../../../../packages/repack/dist/modules/InitializeScriptManager.js": -/*!***************************************************************************!*\\ - !*** ../../../../packages/repack/dist/modules/InitializeScriptManager.js ***! - \\***************************************************************************/ -(function () { +}, +"../../../../packages/repack/dist/modules/InitializeScriptManager.js"() { throw new Error(" × Module parse failed:\\n ╰─▶ × JavaScript parse error: 'import', and 'export' cannot be used outside of module code\\n ╭─[1:0]\\n 1 │ import { ScriptManager } from './ScriptManager/ScriptManager.js';\\n · ──────\\n 2 │ ScriptManager.init();\\n ╰────\\n \\n help: \\n You may need an appropriate loader to handle this file type.\\n"); -}), -"./__fixtures__/react-native/Libraries/Core/InitializeCore.js": -/*!********************************************************************!*\\ - !*** ./__fixtures__/react-native/Libraries/Core/InitializeCore.js ***! - \\********************************************************************/ -(function () { +}, +"./__fixtures__/react-native/Libraries/Core/InitializeCore.js"() { globalThis.__INITIALIZE_CORE__ = true; -}), -"./__fixtures__/react-native/polyfill1.js": -/*!************************************************!*\\ - !*** ./__fixtures__/react-native/polyfill1.js ***! - \\************************************************/ -(function () { +}, +"./__fixtures__/react-native/polyfill1.js"() { globalThis.__POLYFILL_1__ = true; -}), -"./__fixtures__/react-native/polyfill2.js": -/*!************************************************!*\\ - !*** ./__fixtures__/react-native/polyfill2.js ***! - \\************************************************/ -(function () { +}, +"./__fixtures__/react-native/polyfill2.js"() { globalThis.__POLYFILL_2__ = true; -}), -"./index.js": -/*!******************!*\\ - !*** ./index.js ***! - \\******************/ -(function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { +}, +"./index.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); globalThis.__APP_ENTRY__ = true; -}), +}, }); -/************************************************************************/ // The module cache var __webpack_module_cache__ = {}; @@ -97,10 +72,108 @@ __webpack_require__.m = __webpack_modules__; // expose the module cache __webpack_require__.c = __webpack_module_cache__; -/************************************************************************/ +// webpack/runtime/ensure_chunk +(() => { +__webpack_require__.f = {}; +// This file contains only the entry chunk. +// The chunk loading function for additional chunks +__webpack_require__.e = (chunkId) => { + return Promise.all( + Object.keys(__webpack_require__.f).reduce((promises, key) => { + __webpack_require__.f[key](chunkId, promises); + return promises; + }, []) + ); +}; +})(); +// webpack/runtime/get javascript chunk filename +(() => { +// This function allow to reference chunks +__webpack_require__.u = (chunkId) => { + // return url for filenames not based on template + + // return url for filenames based on template + return "" + chunkId + ".javascript" +} +})(); +// webpack/runtime/global +(() => { +__webpack_require__.g = (() => { + if (typeof globalThis === 'object') return globalThis; + try { + return this || new Function('return this')(); + } catch (e) { + if (typeof window === 'object') return window; + } +})(); +})(); // webpack/runtime/has_own_property (() => { __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +})(); +// webpack/runtime/load_script +(() => { +var inProgress = {}; + + +// loadScript function to load a script via script tag +__webpack_require__.l = function (url, done, key, chunkId) { + if (inProgress[url]) { + inProgress[url].push(done); + return; + } + var script, needAttach; + if (key !== undefined) { + var scripts = document.getElementsByTagName("script"); + for (var i = 0; i < scripts.length; i++) { + var s = scripts[i]; + if (s.getAttribute("src") == url) { + script = s; + break; + } + } + } + if (!script) { + needAttach = true; + script = document.createElement('script'); + +script.timeout = 120; +if (__webpack_require__.nc) { + script.setAttribute("nonce", __webpack_require__.nc); +} + + + +script.src = url; + + + + } + inProgress[url] = [done]; + var onScriptComplete = function (prev, event) { + script.onerror = script.onload = null; + clearTimeout(timeout); + var doneFns = inProgress[url]; + delete inProgress[url]; + script.parentNode && script.parentNode.removeChild(script); + doneFns && + doneFns.forEach(function (fn) { + return fn(event); + }); + if (prev) return prev(event); + }; + var timeout = setTimeout( + onScriptComplete.bind(null, undefined, { + type: 'timeout', + target: script + }), + 120000 + ); + script.onerror = onScriptComplete.bind(null, script.onerror); + script.onload = onScriptComplete.bind(null, script.onload); + needAttach && document.head.appendChild(script); +}; + })(); // webpack/runtime/make_namespace_object (() => { @@ -112,10 +185,6 @@ __webpack_require__.r = (exports) => { Object.defineProperty(exports, '__esModule', { value: true }); }; })(); -// webpack/runtime/rspack_version -(() => { -__webpack_require__.rv = () => ("1.6.0") -})(); // webpack/runtime/sharing (() => { @@ -191,10 +260,38 @@ __webpack_require__.I = function(name, initScope) { })(); -// webpack/runtime/repack/polyfills +// repack/polyfills (() => { __webpack_require__("./__fixtures__/react-native/polyfill1.js"); __webpack_require__("./__fixtures__/react-native/polyfill2.js"); +})(); +// webpack/runtime/auto_public_path +(() => { +var scriptUrl; + +if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +var document = __webpack_require__.g.document; +if (!scriptUrl && document) { + // Technically we could use \`document.currentScript instanceof window.HTMLScriptElement\`, + // but an attacker could try to inject \`\` + // and use \`\` + if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') scriptUrl = document.currentScript.src; + if (!scriptUrl) { + var scripts = document.getElementsByTagName("script"); + if (scripts.length) { + var i = scripts.length - 1; + while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; + } + } +} + +// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration", +// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.', +if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\\?.*$/, "").replace(/\\/[^\\/]+$/, "/"); + +__webpack_require__.p = scriptUrl; + })(); // webpack/runtime/consumes_loading (() => { @@ -722,14 +819,128 @@ var resolveHandler = function(data) { return function() { return load.apply(null, args); } }; var installedModules = {}; +__webpack_require__.f.consumes = function(chunkId, promises) { + var moduleIdToConsumeDataMapping = __webpack_require__.consumesLoadingData.moduleIdToConsumeDataMapping + var chunkMapping = __webpack_require__.consumesLoadingData.chunkMapping; + if(__webpack_require__.o(chunkMapping, chunkId)) { + chunkMapping[chunkId].forEach(function(id) { + if(__webpack_require__.o(installedModules, id)) return promises.push(installedModules[id]); + var onFactory = function(factory) { + installedModules[id] = 0; + __webpack_require__.m[id] = function(module) { + delete __webpack_require__.c[id]; + module.exports = factory(); + } + }; + var onError = function(error) { + delete installedModules[id]; + __webpack_require__.m[id] = function(module) { + delete __webpack_require__.c[id]; + throw error; + } + }; + try { + var promise = resolveHandler(moduleIdToConsumeDataMapping[id])(); + if(promise.then) { + promises.push(installedModules[id] = promise.then(onFactory)['catch'](onError)); + } else onFactory(promise); + } catch(e) { onError(e); } + }); + } +} })(); -// webpack/runtime/rspack_unique_id +// webpack/runtime/jsonp_chunk_loading (() => { -__webpack_require__.ruid = "bundler=rspack@1.6.0"; + + // object to store loaded and loading chunks + // undefined = chunk not loaded, null = chunk preloaded/prefetched + // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded + var installedChunks = {"main": 0,}; + + __webpack_require__.f.j = function (chunkId, promises) { + // JSONP chunk loading for javascript +var installedChunkData = __webpack_require__.o(installedChunks, chunkId) + ? installedChunks[chunkId] + : undefined; +if (installedChunkData !== 0) { + // 0 means "already installed". + + // a Promise means "currently loading". + if (installedChunkData) { + promises.push(installedChunkData[2]); + } else { + if (true) { + // setup Promise in chunk cache + var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); + promises.push((installedChunkData[2] = promise)); + + // start chunk loading + var url = __webpack_require__.p + __webpack_require__.u(chunkId); + // create error before stack unwound to get useful stacktrace later + var error = new Error(); + var loadingEnded = function (event) { + if (__webpack_require__.o(installedChunks, chunkId)) { + installedChunkData = installedChunks[chunkId]; + if (installedChunkData !== 0) installedChunks[chunkId] = undefined; + if (installedChunkData) { + var errorType = + event && (event.type === 'load' ? 'missing' : event.type); + var realSrc = event && event.target && event.target.src; + error.message = + 'Loading chunk ' + + chunkId + + ' failed.\\n(' + + errorType + + ': ' + + realSrc + + ')'; + error.name = 'ChunkLoadError'; + error.type = errorType; + error.request = realSrc; + installedChunkData[1](error); + } + } + }; + __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); + } + } +} + + } + // install a JSONP callback for chunk loading +var __rspack_jsonp = (parentChunkLoadingFunction, data) => { + var [chunkIds, moreModules, runtime] = data; + // add "moreModules" to the modules object, + // then flag all "chunkIds" as loaded and fire callback + var moduleId, chunkId, i = 0; + if (chunkIds.some((id) => (installedChunks[id] !== 0))) { + for (moduleId in moreModules) { + if (__webpack_require__.o(moreModules, moduleId)) { + __webpack_require__.m[moduleId] = moreModules[moduleId]; + } + } + if (runtime) var result = runtime(__webpack_require__); + } + if (parentChunkLoadingFunction) parentChunkLoadingFunction(data); + for (; i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if ( + __webpack_require__.o(installedChunks, chunkId) && + installedChunks[chunkId] + ) { + installedChunks[chunkId][0](); + } + installedChunks[chunkId] = 0; + } + +}; + +var chunkLoadingGlobal = self["rspackChunk"] = self["rspackChunk"] || []; +chunkLoadingGlobal.forEach(__rspack_jsonp.bind(null, 0)); +chunkLoadingGlobal.push = __rspack_jsonp.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); })(); -/************************************************************************/ // module factories are used so entry inlining is disabled // startup // Load entry module and return exports @@ -744,22 +955,14 @@ var __webpack_exports__ = __webpack_require__("./index.js"); `; exports[`NativeEntryPlugin > with Module Federation v2 ('0.15.0') > should execute polyfills runtime module before MF v2 federation runtime 1`] = ` -"(() => { // webpackBootstrap +"(() => { var __webpack_modules__ = ({ -"@module-federation/runtime/rspack.js!=!data:text/javascript,import __module_federation_bundler_runtime__ from \\"/node_modules/.pnpm/@module-federation+webpack-bundler-runtime@0.15.0/node_modules/@module-federation/webpack-bundler-runtime/dist/index.cjs.cjs\\";const __module_federation_runtime_plugins__ = [];const __module_federation_remote_infos__ = {};const __module_federation_container_name__ = \\"testContainer\\";const __module_federation_share_strategy__ = \\"version-first\\";if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value===\\"object\\"&&value!==null){var _obj1,_key1;var _1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};var __webpack_require___remotesLoadingData_chunkMapping;const remotesLoadingChunkMapping=(__webpack_require___remotesLoadingData_chunkMapping=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&__webpack_require___remotesLoadingData_chunkMapping!==void 0?__webpack_require___remotesLoadingData_chunkMapping:{};var __webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping;const remotesLoadingModuleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping!==void 0?__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping:{};var __webpack_require___initializeSharingData_scopeToSharingDataMapping;const initializeSharingScopeToInitDataMapping=(__webpack_require___initializeSharingData_scopeToSharingDataMapping=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&__webpack_require___initializeSharingData_scopeToSharingDataMapping!==void 0?__webpack_require___initializeSharingData_scopeToSharingDataMapping:{};var __webpack_require___consumesLoadingData_chunkMapping;const consumesLoadingChunkMapping=(__webpack_require___consumesLoadingData_chunkMapping=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&__webpack_require___consumesLoadingData_chunkMapping!==void 0?__webpack_require___consumesLoadingData_chunkMapping:{};var __webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping;const consumesLoadingModuleToConsumeDataMapping=(__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping!==void 0?__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,\\"consumesLoadingModuleToHandlerMapping\\",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){consumesLoadingModuleToHandlerMapping[moduleId]={getter:data.fallback,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,\\"initOptions\\",()=>({}));early(__webpack_require__.federation.initOptions,\\"name\\",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,\\"shareStrategy\\",()=>__module_federation_share_strategy__);early(__webpack_require__.federation.initOptions,\\"shared\\",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage===\\"object\\"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!==\\"undefined\\"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,\\"remotes\\",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType===\\"script\\"));merge(__webpack_require__.federation.initOptions,\\"plugins\\",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,\\"bundlerRuntimeOptions\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,\\"remotes\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"chunkMapping\\",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"remoteInfos\\",()=>__module_federation_remote_infos__);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToExternalAndNameMapping\\",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"webpackRequire\\",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToRemoteMap\\",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,\\"S\\",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,\\"remotes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,\\"consumes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"I\\",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"initContainer\\",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"getContainer\\",(module1,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module1)?moduleMap[module1]():Promise.resolve().then(()=>{throw new Error('Module \\"'+module1+'\\" does not exist in container.')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}": -/*!*********************************************!*\\ - !*** external "globalThis.__MF_EXTERNAL__" ***! - \\*********************************************/ -(function (module) { +"@module-federation/runtime/rspack.js!=!data:text/javascript,import%20__module_federation_bundler_runtime__%20from%20%22%3CrootDir%3E%2Fnode_modules%2F.pnpm%2F%40module-federation%2Bwebpack-bundler-runtime%400.15.0%2Fnode_modules%2F%40module-federation%2Fwebpack-bundler-runtime%2Fdist%2Findex.cjs.cjs%22%3B%3Bconst%20__module_federation_runtime_plugins__%20%3D%20%5B%5D.filter((%7B%20plugin%20%7D)%20%3D%3E%20plugin).map((%7B%20plugin%2C%20params%20%7D)%20%3D%3E%20plugin(params))%3Bconst%20__module_federation_remote_infos__%20%3D%20%7B%7D%3Bconst%20__module_federation_container_name__%20%3D%20%22testContainer%22%3Bconst%20__module_federation_share_strategy__%20%3D%20%22version-first%22%3Bconst%20__module_federation_share_fallbacks__%20%3D%20undefined%3Bconst%20__module_federation_library_type__%20%3D%20%22var%22%3Bconst%20runtimeRequire%3D__webpack_require__%3Bif((runtimeRequire.initializeSharingData%7C%7CruntimeRequire.initializeExposesData)%26%26runtimeRequire.federation)%7Bvar%20_ref%2C_ref1%2C_ref2%2C_ref3%2C_ref4%3Bvar%20_runtimeRequire_remotesLoadingData%2C_runtimeRequire_remotesLoadingData1%2C_runtimeRequire_initializeSharingData%2C_runtimeRequire_consumesLoadingData%2C_runtimeRequire_consumesLoadingData1%2C_runtimeRequire_initializeExposesData%2C_runtimeRequire_consumesLoadingData2%3Bconst%20override%3D(obj%2Ckey%2Cvalue)%3D%3E%7Bif(!obj)return%3Bif(obj%5Bkey%5D)obj%5Bkey%5D%3Dvalue%7D%3Bconst%20merge%3D(obj%2Ckey%2Cfn)%3D%3E%7Bconst%20value%3Dfn()%3Bif(Array.isArray(value))%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3D%5B%5D%3Bobj%5Bkey%5D.push(...value)%7Delse%20if(typeof%20value%3D%3D%3D%22object%22%26%26value!%3D%3Dnull)%7Bvar%20_obj1%2C_key1%2C_1%3B(_1%3D(_obj1%3Dobj)%5B_key1%3Dkey%5D)!%3D%3Dnull%26%26_1!%3D%3Dvoid%200%3F_1%3A_obj1%5B_key1%5D%3D%7B%7D%3BObject.assign(obj%5Bkey%5D%2Cvalue)%7D%7D%3Bconst%20early%3D(obj%2Ckey%2Cinitial)%3D%3E%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3Dinitial()%7D%3Bconst%20remotesLoadingChunkMapping%3D(_ref%3D(_runtimeRequire_remotesLoadingData%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref!%3D%3Dvoid%200%3F_ref%3A%7B%7D%3Bconst%20remotesLoadingModuleIdToRemoteDataMapping%3D(_ref1%3D(_runtimeRequire_remotesLoadingData1%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData1.moduleIdToRemoteDataMapping)!%3D%3Dnull%26%26_ref1!%3D%3Dvoid%200%3F_ref1%3A%7B%7D%3Bconst%20initializeSharingScopeToInitDataMapping%3D(_ref2%3D(_runtimeRequire_initializeSharingData%3DruntimeRequire.initializeSharingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeSharingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeSharingData.scopeToSharingDataMapping)!%3D%3Dnull%26%26_ref2!%3D%3Dvoid%200%3F_ref2%3A%7B%7D%3Bconst%20consumesLoadingChunkMapping%3D(_ref3%3D(_runtimeRequire_consumesLoadingData%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref3!%3D%3Dvoid%200%3F_ref3%3A%7B%7D%3Bconst%20consumesLoadingModuleToConsumeDataMapping%3D(_ref4%3D(_runtimeRequire_consumesLoadingData1%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData1.moduleIdToConsumeDataMapping)!%3D%3Dnull%26%26_ref4!%3D%3Dvoid%200%3F_ref4%3A%7B%7D%3Bconst%20consumesLoadinginstalledModules%3D%7B%7D%3Bconst%20initializeSharingInitPromises%3D%5B%5D%3Bconst%20initializeSharingInitTokens%3D%7B%7D%3Bconst%20containerShareScope%3D(_runtimeRequire_initializeExposesData%3DruntimeRequire.initializeExposesData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeExposesData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeExposesData.shareScope%3Bfor(const%20key%20in%20__module_federation_bundler_runtime__)%7BruntimeRequire.federation%5Bkey%5D%3D__module_federation_bundler_runtime__%5Bkey%5D%7Dearly(runtimeRequire.federation%2C%22libraryType%22%2C()%3D%3E__module_federation_library_type__)%3Bearly(runtimeRequire.federation%2C%22sharedFallback%22%2C()%3D%3E__module_federation_share_fallbacks__)%3Bconst%20sharedFallback%3DruntimeRequire.federation.sharedFallback%3Bearly(runtimeRequire.federation%2C%22consumesLoadingModuleToHandlerMapping%22%2C()%3D%3E%7Bconst%20consumesLoadingModuleToHandlerMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(consumesLoadingModuleToConsumeDataMapping))%7Bvar%20_runtimeRequire_federation_bundlerRuntime%3BconsumesLoadingModuleToHandlerMapping%5BmoduleId%5D%3D%7Bgetter%3AsharedFallback%3F(_runtimeRequire_federation_bundlerRuntime%3DruntimeRequire.federation.bundlerRuntime)%3D%3D%3Dnull%7C%7C_runtimeRequire_federation_bundlerRuntime%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_federation_bundlerRuntime.getSharedFallbackGetter(%7BshareKey%3Adata.shareKey%2Cfactory%3Adata.fallback%2CwebpackRequire%3AruntimeRequire%2ClibraryType%3AruntimeRequire.federation.libraryType%7D)%3Adata.fallback%2CtreeShakingGetter%3AsharedFallback%3Fdata.fallback%3Aundefined%2CshareInfo%3A%7BshareConfig%3A%7BfixedDependencies%3Afalse%2CrequiredVersion%3Adata.requiredVersion%2CstrictVersion%3Adata.strictVersion%2Csingleton%3Adata.singleton%2Ceager%3Adata.eager%7D%2Cscope%3A%5Bdata.shareScope%5D%7D%2CshareKey%3Adata.shareKey%2CtreeShaking%3AruntimeRequire.federation.sharedFallback%3F%7Bget%3Adata.fallback%2Cmode%3Adata.treeShakingMode%7D%3Aundefined%7D%7Dreturn%20consumesLoadingModuleToHandlerMapping%7D)%3Bearly(runtimeRequire.federation%2C%22initOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.initOptions%2C%22name%22%2C()%3D%3E__module_federation_container_name__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shareStrategy%22%2C()%3D%3E__module_federation_share_strategy__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shared%22%2C()%3D%3E%7Bconst%20shared%3D%7B%7D%3Bfor(let%5Bscope%2Cstages%5Dof%20Object.entries(initializeSharingScopeToInitDataMapping))%7Bfor(let%20stage%20of%20stages)%7Bif(typeof%20stage%3D%3D%3D%22object%22%26%26stage!%3D%3Dnull)%7Bconst%7Bname%2Cversion%2Cfactory%2Ceager%2Csingleton%2CrequiredVersion%2CstrictVersion%2CtreeShakingMode%7D%3Dstage%3Bconst%20shareConfig%3D%7B%7D%3Bconst%20isValidValue%3Dfunction(val)%7Breturn%20typeof%20val!%3D%3D%22undefined%22%7D%3Bif(isValidValue(singleton))%7BshareConfig.singleton%3Dsingleton%7Dif(isValidValue(requiredVersion))%7BshareConfig.requiredVersion%3DrequiredVersion%7Dif(isValidValue(eager))%7BshareConfig.eager%3Deager%7Dif(isValidValue(strictVersion))%7BshareConfig.strictVersion%3DstrictVersion%7Dconst%20options%3D%7Bversion%2Cscope%3A%5Bscope%5D%2CshareConfig%2Cget%3Afactory%2CtreeShaking%3AtreeShakingMode%3F%7Bmode%3AtreeShakingMode%7D%3Aundefined%7D%3Bif(shared%5Bname%5D)%7Bshared%5Bname%5D.push(options)%7Delse%7Bshared%5Bname%5D%3D%5Boptions%5D%7D%7D%7D%7Dreturn%20shared%7D)%3Bmerge(runtimeRequire.federation.initOptions%2C%22remotes%22%2C()%3D%3EObject.values(__module_federation_remote_infos__).flat().filter(remote%3D%3Eremote.externalType%3D%3D%3D%22script%22))%3Bmerge(runtimeRequire.federation.initOptions%2C%22plugins%22%2C()%3D%3E__module_federation_runtime_plugins__)%3Bearly(runtimeRequire.federation%2C%22bundlerRuntimeOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions%2C%22remotes%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22chunkMapping%22%2C()%3D%3EremotesLoadingChunkMapping)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22remoteInfos%22%2C()%3D%3E__module_federation_remote_infos__)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToExternalAndNameMapping%22%2C()%3D%3E%7Bconst%20remotesLoadingIdToExternalAndNameMappingMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7BremotesLoadingIdToExternalAndNameMappingMapping%5BmoduleId%5D%3D%5Bdata.shareScope%2Cdata.name%2Cdata.externalModuleId%2Cdata.remoteName%5D%7Dreturn%20remotesLoadingIdToExternalAndNameMappingMapping%7D)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22webpackRequire%22%2C()%3D%3EruntimeRequire)%3Bmerge(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToRemoteMap%22%2C()%3D%3E%7Bconst%20idToRemoteMap%3D%7B%7D%3Bfor(let%5Bid%2CremoteData%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7Bconst%20info%3D__module_federation_remote_infos__%5BremoteData.remoteName%5D%3Bif(info)idToRemoteMap%5Bid%5D%3Dinfo%7Dreturn%20idToRemoteMap%7D)%3Boverride(runtimeRequire%2C%22S%22%2CruntimeRequire.federation.bundlerRuntime.S)%3Bif(runtimeRequire.federation.attachShareScopeMap)%7BruntimeRequire.federation.attachShareScopeMap(runtimeRequire)%7Doverride(runtimeRequire.f%2C%22remotes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.remotes(%7BchunkId%2Cpromises%2CchunkMapping%3AremotesLoadingChunkMapping%2CidToExternalAndNameMapping%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping%2CidToRemoteMap%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToRemoteMap%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire.f%2C%22consumes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.consumes(%7BchunkId%2Cpromises%2CchunkMapping%3AconsumesLoadingChunkMapping%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%2CinstalledModules%3AconsumesLoadinginstalledModules%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22I%22%2C(name%2CinitScope)%3D%3EruntimeRequire.federation.bundlerRuntime.I(%7BshareScopeName%3Aname%2CinitScope%2CinitPromises%3AinitializeSharingInitPromises%2CinitTokens%3AinitializeSharingInitTokens%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22initContainer%22%2C(shareScope%2CinitScope%2CremoteEntryInitOptions)%3D%3EruntimeRequire.federation.bundlerRuntime.initContainerEntry(%7BshareScope%2CinitScope%2CremoteEntryInitOptions%2CshareScopeKey%3AcontainerShareScope%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22getContainer%22%2C(module%2CgetScope)%3D%3E%7Bvar%20moduleMap%3DruntimeRequire.initializeExposesData.moduleMap%3BruntimeRequire.R%3DgetScope%3BgetScope%3DObject.prototype.hasOwnProperty.call(moduleMap%2Cmodule)%3FmoduleMap%5Bmodule%5D()%3APromise.resolve().then(()%3D%3E%7Bthrow%20new%20Error('Module%20%22'%2Bmodule%2B'%22%20does%20not%20exist%20in%20container.')%7D)%3BruntimeRequire.R%3Dundefined%3Breturn%20getScope%7D)%3BruntimeRequire.federation.instance%3DruntimeRequire.federation.bundlerRuntime.init(%7BwebpackRequire%3AruntimeRequire%7D)%3Bif((_runtimeRequire_consumesLoadingData2%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData2%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData2.initialConsumes)%7BruntimeRequire.federation.bundlerRuntime.installInitialConsumes(%7BwebpackRequire%3AruntimeRequire%2CinstalledModules%3AconsumesLoadinginstalledModules%2CinitialConsumes%3AruntimeRequire.consumesLoadingData.initialConsumes%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%7D)%7D%7D"(module) { "use strict"; module.exports = globalThis.__MF_EXTERNAL__; -}), -"../../../../packages/repack/dist/modules/IncludeModules.js": -/*!******************************************************************!*\\ - !*** ../../../../packages/repack/dist/modules/IncludeModules.js ***! - \\******************************************************************/ -(function () { +}, +"../../../../packages/repack/dist/modules/IncludeModules.js"() { /* * This module is added as an entry module to prevent stripping of these React Native deep imports from the bundle. * We use require.resolve from Rspack/Webpack to ensure these modules are included even if not directly used. @@ -767,59 +970,38 @@ module.exports = globalThis.__MF_EXTERNAL__; * These modules are required by assetsLoader and should be shared as deep imports when using ModuleFederation. */ -/*require.resolve*/(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetRegistry'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); -/*require.resolve*/(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetSourceResolver'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); +/*require.resolve*/(Object(function __rspack_missing_module() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetRegistry'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); +/*require.resolve*/(Object(function __rspack_missing_module() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetSourceResolver'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); -}), -"../../../../packages/repack/dist/modules/InitializeScriptManager.js": -/*!***************************************************************************!*\\ - !*** ../../../../packages/repack/dist/modules/InitializeScriptManager.js ***! - \\***************************************************************************/ -(function () { +}, +"../../../../packages/repack/dist/modules/InitializeScriptManager.js"() { throw new Error(" × Module parse failed:\\n ╰─▶ × JavaScript parse error: 'import', and 'export' cannot be used outside of module code\\n ╭─[1:0]\\n 1 │ import { ScriptManager } from './ScriptManager/ScriptManager.js';\\n · ──────\\n 2 │ ScriptManager.init();\\n ╰────\\n \\n help: \\n You may need an appropriate loader to handle this file type.\\n"); -}), -"./__fixtures__/react-native/Libraries/Core/InitializeCore.js": -/*!********************************************************************!*\\ - !*** ./__fixtures__/react-native/Libraries/Core/InitializeCore.js ***! - \\********************************************************************/ -(function () { +}, +"./__fixtures__/react-native/Libraries/Core/InitializeCore.js"() { globalThis.__INITIALIZE_CORE__ = true; -}), -"./__fixtures__/react-native/polyfill1.js": -/*!************************************************!*\\ - !*** ./__fixtures__/react-native/polyfill1.js ***! - \\************************************************/ -(function () { +}, +"./__fixtures__/react-native/polyfill1.js"() { globalThis.__POLYFILL_1__ = true; -}), -"./__fixtures__/react-native/polyfill2.js": -/*!************************************************!*\\ - !*** ./__fixtures__/react-native/polyfill2.js ***! - \\************************************************/ -(function () { +}, +"./__fixtures__/react-native/polyfill2.js"() { globalThis.__POLYFILL_2__ = true; -}), -"./index.js": -/*!******************!*\\ - !*** ./index.js ***! - \\******************/ -(function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { +}, +"./index.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); globalThis.__APP_ENTRY__ = true; -}), +}, }); -/************************************************************************/ // The module cache var __webpack_module_cache__ = {}; @@ -861,41 +1043,108 @@ var __webpack_exports__ = __webpack_require__("./index.js"); return __webpack_exports__ }; -/************************************************************************/ -// module_federation/runtime +// webpack/runtime/ensure_chunk (() => { - -if(!__webpack_require__.federation){ - __webpack_require__.federation = { - -chunkMatcher: function(chunkId) { - return true; -}, -rootOutputDir: "", - - }; +__webpack_require__.f = {}; +// This file contains only the entry chunk. +// The chunk loading function for additional chunks +__webpack_require__.e = (chunkId) => { + return Promise.all( + Object.keys(__webpack_require__.f).reduce((promises, key) => { + __webpack_require__.f[key](chunkId, promises); + return promises; + }, []) + ); +}; +})(); +// webpack/runtime/get javascript chunk filename +(() => { +// This function allow to reference chunks +__webpack_require__.u = (chunkId) => { + // return url for filenames not based on template + + // return url for filenames based on template + return "" + chunkId + ".javascript" } - })(); -// webpack/runtime/embed_federation_runtime +// webpack/runtime/global (() => { -var prevStartup = __webpack_require__.x; -var hasRun = false; -__webpack_require__.x = function() { - if (!hasRun) { - hasRun = true; - __webpack_require__("@module-federation/runtime/rspack.js!=!data:text/javascript,import __module_federation_bundler_runtime__ from \\"/node_modules/.pnpm/@module-federation+webpack-bundler-runtime@0.15.0/node_modules/@module-federation/webpack-bundler-runtime/dist/index.cjs.cjs\\";const __module_federation_runtime_plugins__ = [];const __module_federation_remote_infos__ = {};const __module_federation_container_name__ = \\"testContainer\\";const __module_federation_share_strategy__ = \\"version-first\\";if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value===\\"object\\"&&value!==null){var _obj1,_key1;var _1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};var __webpack_require___remotesLoadingData_chunkMapping;const remotesLoadingChunkMapping=(__webpack_require___remotesLoadingData_chunkMapping=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&__webpack_require___remotesLoadingData_chunkMapping!==void 0?__webpack_require___remotesLoadingData_chunkMapping:{};var __webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping;const remotesLoadingModuleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping!==void 0?__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping:{};var __webpack_require___initializeSharingData_scopeToSharingDataMapping;const initializeSharingScopeToInitDataMapping=(__webpack_require___initializeSharingData_scopeToSharingDataMapping=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&__webpack_require___initializeSharingData_scopeToSharingDataMapping!==void 0?__webpack_require___initializeSharingData_scopeToSharingDataMapping:{};var __webpack_require___consumesLoadingData_chunkMapping;const consumesLoadingChunkMapping=(__webpack_require___consumesLoadingData_chunkMapping=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&__webpack_require___consumesLoadingData_chunkMapping!==void 0?__webpack_require___consumesLoadingData_chunkMapping:{};var __webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping;const consumesLoadingModuleToConsumeDataMapping=(__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping!==void 0?__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,\\"consumesLoadingModuleToHandlerMapping\\",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){consumesLoadingModuleToHandlerMapping[moduleId]={getter:data.fallback,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,\\"initOptions\\",()=>({}));early(__webpack_require__.federation.initOptions,\\"name\\",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,\\"shareStrategy\\",()=>__module_federation_share_strategy__);early(__webpack_require__.federation.initOptions,\\"shared\\",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage===\\"object\\"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!==\\"undefined\\"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,\\"remotes\\",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType===\\"script\\"));merge(__webpack_require__.federation.initOptions,\\"plugins\\",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,\\"bundlerRuntimeOptions\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,\\"remotes\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"chunkMapping\\",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"remoteInfos\\",()=>__module_federation_remote_infos__);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToExternalAndNameMapping\\",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"webpackRequire\\",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToRemoteMap\\",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,\\"S\\",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,\\"remotes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,\\"consumes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"I\\",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"initContainer\\",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"getContainer\\",(module1,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module1)?moduleMap[module1]():Promise.resolve().then(()=>{throw new Error('Module \\"'+module1+'\\" does not exist in container.')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}") +__webpack_require__.g = (() => { + if (typeof globalThis === 'object') return globalThis; + try { + return this || new Function('return this')(); + } catch (e) { + if (typeof window === 'object') return window; } - if (typeof prevStartup === 'function') { - return prevStartup(); - } else { - console.warn('[MF] Invalid prevStartup'); - } -}; +})(); })(); // webpack/runtime/has_own_property (() => { __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +})(); +// webpack/runtime/load_script +(() => { +var inProgress = {}; + + +// loadScript function to load a script via script tag +__webpack_require__.l = function (url, done, key, chunkId) { + if (inProgress[url]) { + inProgress[url].push(done); + return; + } + var script, needAttach; + if (key !== undefined) { + var scripts = document.getElementsByTagName("script"); + for (var i = 0; i < scripts.length; i++) { + var s = scripts[i]; + if (s.getAttribute("src") == url) { + script = s; + break; + } + } + } + if (!script) { + needAttach = true; + script = document.createElement('script'); + +script.timeout = 120; +if (__webpack_require__.nc) { + script.setAttribute("nonce", __webpack_require__.nc); +} + + + +script.src = url; + + + + } + inProgress[url] = [done]; + var onScriptComplete = function (prev, event) { + script.onerror = script.onload = null; + clearTimeout(timeout); + var doneFns = inProgress[url]; + delete inProgress[url]; + script.parentNode && script.parentNode.removeChild(script); + doneFns && + doneFns.forEach(function (fn) { + return fn(event); + }); + if (prev) return prev(event); + }; + var timeout = setTimeout( + onScriptComplete.bind(null, undefined, { + type: 'timeout', + target: script + }), + 120000 + ); + script.onerror = onScriptComplete.bind(null, script.onerror); + script.onload = onScriptComplete.bind(null, script.onload); + needAttach && document.head.appendChild(script); +}; + })(); // webpack/runtime/make_namespace_object (() => { @@ -907,9 +1156,20 @@ __webpack_require__.r = (exports) => { Object.defineProperty(exports, '__esModule', { value: true }); }; })(); -// webpack/runtime/rspack_version +// webpack/runtime/module_federation/runtime (() => { -__webpack_require__.rv = () => ("1.6.0") + +if(!__webpack_require__.federation){ + __webpack_require__.federation = { + +chunkMatcher: function(chunkId) { + return true; +}, +rootOutputDir: "", + + }; +} + })(); // webpack/runtime/sharing (() => { @@ -919,23 +1179,152 @@ __webpack_require__.initializeSharingData = { scopeToSharingDataMapping: { }, u __webpack_require__.I = __webpack_require__.I || function() { throw new Error("should have __webpack_require__.I") } })(); -// webpack/runtime/repack/polyfills +// repack/polyfills (() => { __webpack_require__("./__fixtures__/react-native/polyfill1.js"); __webpack_require__("./__fixtures__/react-native/polyfill2.js"); +})(); +// webpack/runtime/auto_public_path +(() => { +var scriptUrl; + +if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +var document = __webpack_require__.g.document; +if (!scriptUrl && document) { + // Technically we could use \`document.currentScript instanceof window.HTMLScriptElement\`, + // but an attacker could try to inject \`\` + // and use \`\` + if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') scriptUrl = document.currentScript.src; + if (!scriptUrl) { + var scripts = document.getElementsByTagName("script"); + if (scripts.length) { + var i = scripts.length - 1; + while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; + } + } +} + +// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration", +// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.', +if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\\?.*$/, "").replace(/\\/[^\\/]+$/, "/"); + +__webpack_require__.p = scriptUrl; + })(); // webpack/runtime/consumes_loading (() => { __webpack_require__.consumesLoadingData = { chunkMapping: {}, moduleIdToConsumeDataMapping: {}, initialConsumes: [] }; +__webpack_require__.f.consumes = __webpack_require__.f.consumes || function() { throw new Error("should have __webpack_require__.f.consumes") } +})(); +// webpack/runtime/jsonp_chunk_loading +(() => { + + // object to store loaded and loading chunks + // undefined = chunk not loaded, null = chunk preloaded/prefetched + // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded + var installedChunks = {"main": 0,}; + + __webpack_require__.f.j = function (chunkId, promises) { + // JSONP chunk loading for javascript +var installedChunkData = __webpack_require__.o(installedChunks, chunkId) + ? installedChunks[chunkId] + : undefined; +if (installedChunkData !== 0) { + // 0 means "already installed". + + // a Promise means "currently loading". + if (installedChunkData) { + promises.push(installedChunkData[2]); + } else { + if (true) { + // setup Promise in chunk cache + var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); + promises.push((installedChunkData[2] = promise)); + + // start chunk loading + var url = __webpack_require__.p + __webpack_require__.u(chunkId); + // create error before stack unwound to get useful stacktrace later + var error = new Error(); + var loadingEnded = function (event) { + if (__webpack_require__.o(installedChunks, chunkId)) { + installedChunkData = installedChunks[chunkId]; + if (installedChunkData !== 0) installedChunks[chunkId] = undefined; + if (installedChunkData) { + var errorType = + event && (event.type === 'load' ? 'missing' : event.type); + var realSrc = event && event.target && event.target.src; + error.message = + 'Loading chunk ' + + chunkId + + ' failed.\\n(' + + errorType + + ': ' + + realSrc + + ')'; + error.name = 'ChunkLoadError'; + error.type = errorType; + error.request = realSrc; + installedChunkData[1](error); + } + } + }; + __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); + } + } +} + + } + // install a JSONP callback for chunk loading +var __rspack_jsonp = (parentChunkLoadingFunction, data) => { + var [chunkIds, moreModules, runtime] = data; + // add "moreModules" to the modules object, + // then flag all "chunkIds" as loaded and fire callback + var moduleId, chunkId, i = 0; + if (chunkIds.some((id) => (installedChunks[id] !== 0))) { + for (moduleId in moreModules) { + if (__webpack_require__.o(moreModules, moduleId)) { + __webpack_require__.m[moduleId] = moreModules[moduleId]; + } + } + if (runtime) var result = runtime(__webpack_require__); + } + if (parentChunkLoadingFunction) parentChunkLoadingFunction(data); + for (; i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if ( + __webpack_require__.o(installedChunks, chunkId) && + installedChunks[chunkId] + ) { + installedChunks[chunkId][0](); + } + installedChunks[chunkId] = 0; + } + +}; + +var chunkLoadingGlobal = self["rspackChunk"] = self["rspackChunk"] || []; +chunkLoadingGlobal.forEach(__rspack_jsonp.bind(null, 0)); +chunkLoadingGlobal.push = __rspack_jsonp.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); })(); -// webpack/runtime/rspack_unique_id +// webpack/runtime/embed_federation_runtime (() => { -__webpack_require__.ruid = "bundler=rspack@1.6.0"; +var prevStartup = __webpack_require__.x; +var hasRun = false; +__webpack_require__.x = function () { + if (!hasRun) { + hasRun = true; + __webpack_require__("@module-federation/runtime/rspack.js!=!data:text/javascript,import%20__module_federation_bundler_runtime__%20from%20%22%3CrootDir%3E%2Fnode_modules%2F.pnpm%2F%40module-federation%2Bwebpack-bundler-runtime%400.15.0%2Fnode_modules%2F%40module-federation%2Fwebpack-bundler-runtime%2Fdist%2Findex.cjs.cjs%22%3B%3Bconst%20__module_federation_runtime_plugins__%20%3D%20%5B%5D.filter((%7B%20plugin%20%7D)%20%3D%3E%20plugin).map((%7B%20plugin%2C%20params%20%7D)%20%3D%3E%20plugin(params))%3Bconst%20__module_federation_remote_infos__%20%3D%20%7B%7D%3Bconst%20__module_federation_container_name__%20%3D%20%22testContainer%22%3Bconst%20__module_federation_share_strategy__%20%3D%20%22version-first%22%3Bconst%20__module_federation_share_fallbacks__%20%3D%20undefined%3Bconst%20__module_federation_library_type__%20%3D%20%22var%22%3Bconst%20runtimeRequire%3D__webpack_require__%3Bif((runtimeRequire.initializeSharingData%7C%7CruntimeRequire.initializeExposesData)%26%26runtimeRequire.federation)%7Bvar%20_ref%2C_ref1%2C_ref2%2C_ref3%2C_ref4%3Bvar%20_runtimeRequire_remotesLoadingData%2C_runtimeRequire_remotesLoadingData1%2C_runtimeRequire_initializeSharingData%2C_runtimeRequire_consumesLoadingData%2C_runtimeRequire_consumesLoadingData1%2C_runtimeRequire_initializeExposesData%2C_runtimeRequire_consumesLoadingData2%3Bconst%20override%3D(obj%2Ckey%2Cvalue)%3D%3E%7Bif(!obj)return%3Bif(obj%5Bkey%5D)obj%5Bkey%5D%3Dvalue%7D%3Bconst%20merge%3D(obj%2Ckey%2Cfn)%3D%3E%7Bconst%20value%3Dfn()%3Bif(Array.isArray(value))%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3D%5B%5D%3Bobj%5Bkey%5D.push(...value)%7Delse%20if(typeof%20value%3D%3D%3D%22object%22%26%26value!%3D%3Dnull)%7Bvar%20_obj1%2C_key1%2C_1%3B(_1%3D(_obj1%3Dobj)%5B_key1%3Dkey%5D)!%3D%3Dnull%26%26_1!%3D%3Dvoid%200%3F_1%3A_obj1%5B_key1%5D%3D%7B%7D%3BObject.assign(obj%5Bkey%5D%2Cvalue)%7D%7D%3Bconst%20early%3D(obj%2Ckey%2Cinitial)%3D%3E%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3Dinitial()%7D%3Bconst%20remotesLoadingChunkMapping%3D(_ref%3D(_runtimeRequire_remotesLoadingData%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref!%3D%3Dvoid%200%3F_ref%3A%7B%7D%3Bconst%20remotesLoadingModuleIdToRemoteDataMapping%3D(_ref1%3D(_runtimeRequire_remotesLoadingData1%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData1.moduleIdToRemoteDataMapping)!%3D%3Dnull%26%26_ref1!%3D%3Dvoid%200%3F_ref1%3A%7B%7D%3Bconst%20initializeSharingScopeToInitDataMapping%3D(_ref2%3D(_runtimeRequire_initializeSharingData%3DruntimeRequire.initializeSharingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeSharingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeSharingData.scopeToSharingDataMapping)!%3D%3Dnull%26%26_ref2!%3D%3Dvoid%200%3F_ref2%3A%7B%7D%3Bconst%20consumesLoadingChunkMapping%3D(_ref3%3D(_runtimeRequire_consumesLoadingData%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref3!%3D%3Dvoid%200%3F_ref3%3A%7B%7D%3Bconst%20consumesLoadingModuleToConsumeDataMapping%3D(_ref4%3D(_runtimeRequire_consumesLoadingData1%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData1.moduleIdToConsumeDataMapping)!%3D%3Dnull%26%26_ref4!%3D%3Dvoid%200%3F_ref4%3A%7B%7D%3Bconst%20consumesLoadinginstalledModules%3D%7B%7D%3Bconst%20initializeSharingInitPromises%3D%5B%5D%3Bconst%20initializeSharingInitTokens%3D%7B%7D%3Bconst%20containerShareScope%3D(_runtimeRequire_initializeExposesData%3DruntimeRequire.initializeExposesData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeExposesData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeExposesData.shareScope%3Bfor(const%20key%20in%20__module_federation_bundler_runtime__)%7BruntimeRequire.federation%5Bkey%5D%3D__module_federation_bundler_runtime__%5Bkey%5D%7Dearly(runtimeRequire.federation%2C%22libraryType%22%2C()%3D%3E__module_federation_library_type__)%3Bearly(runtimeRequire.federation%2C%22sharedFallback%22%2C()%3D%3E__module_federation_share_fallbacks__)%3Bconst%20sharedFallback%3DruntimeRequire.federation.sharedFallback%3Bearly(runtimeRequire.federation%2C%22consumesLoadingModuleToHandlerMapping%22%2C()%3D%3E%7Bconst%20consumesLoadingModuleToHandlerMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(consumesLoadingModuleToConsumeDataMapping))%7Bvar%20_runtimeRequire_federation_bundlerRuntime%3BconsumesLoadingModuleToHandlerMapping%5BmoduleId%5D%3D%7Bgetter%3AsharedFallback%3F(_runtimeRequire_federation_bundlerRuntime%3DruntimeRequire.federation.bundlerRuntime)%3D%3D%3Dnull%7C%7C_runtimeRequire_federation_bundlerRuntime%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_federation_bundlerRuntime.getSharedFallbackGetter(%7BshareKey%3Adata.shareKey%2Cfactory%3Adata.fallback%2CwebpackRequire%3AruntimeRequire%2ClibraryType%3AruntimeRequire.federation.libraryType%7D)%3Adata.fallback%2CtreeShakingGetter%3AsharedFallback%3Fdata.fallback%3Aundefined%2CshareInfo%3A%7BshareConfig%3A%7BfixedDependencies%3Afalse%2CrequiredVersion%3Adata.requiredVersion%2CstrictVersion%3Adata.strictVersion%2Csingleton%3Adata.singleton%2Ceager%3Adata.eager%7D%2Cscope%3A%5Bdata.shareScope%5D%7D%2CshareKey%3Adata.shareKey%2CtreeShaking%3AruntimeRequire.federation.sharedFallback%3F%7Bget%3Adata.fallback%2Cmode%3Adata.treeShakingMode%7D%3Aundefined%7D%7Dreturn%20consumesLoadingModuleToHandlerMapping%7D)%3Bearly(runtimeRequire.federation%2C%22initOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.initOptions%2C%22name%22%2C()%3D%3E__module_federation_container_name__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shareStrategy%22%2C()%3D%3E__module_federation_share_strategy__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shared%22%2C()%3D%3E%7Bconst%20shared%3D%7B%7D%3Bfor(let%5Bscope%2Cstages%5Dof%20Object.entries(initializeSharingScopeToInitDataMapping))%7Bfor(let%20stage%20of%20stages)%7Bif(typeof%20stage%3D%3D%3D%22object%22%26%26stage!%3D%3Dnull)%7Bconst%7Bname%2Cversion%2Cfactory%2Ceager%2Csingleton%2CrequiredVersion%2CstrictVersion%2CtreeShakingMode%7D%3Dstage%3Bconst%20shareConfig%3D%7B%7D%3Bconst%20isValidValue%3Dfunction(val)%7Breturn%20typeof%20val!%3D%3D%22undefined%22%7D%3Bif(isValidValue(singleton))%7BshareConfig.singleton%3Dsingleton%7Dif(isValidValue(requiredVersion))%7BshareConfig.requiredVersion%3DrequiredVersion%7Dif(isValidValue(eager))%7BshareConfig.eager%3Deager%7Dif(isValidValue(strictVersion))%7BshareConfig.strictVersion%3DstrictVersion%7Dconst%20options%3D%7Bversion%2Cscope%3A%5Bscope%5D%2CshareConfig%2Cget%3Afactory%2CtreeShaking%3AtreeShakingMode%3F%7Bmode%3AtreeShakingMode%7D%3Aundefined%7D%3Bif(shared%5Bname%5D)%7Bshared%5Bname%5D.push(options)%7Delse%7Bshared%5Bname%5D%3D%5Boptions%5D%7D%7D%7D%7Dreturn%20shared%7D)%3Bmerge(runtimeRequire.federation.initOptions%2C%22remotes%22%2C()%3D%3EObject.values(__module_federation_remote_infos__).flat().filter(remote%3D%3Eremote.externalType%3D%3D%3D%22script%22))%3Bmerge(runtimeRequire.federation.initOptions%2C%22plugins%22%2C()%3D%3E__module_federation_runtime_plugins__)%3Bearly(runtimeRequire.federation%2C%22bundlerRuntimeOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions%2C%22remotes%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22chunkMapping%22%2C()%3D%3EremotesLoadingChunkMapping)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22remoteInfos%22%2C()%3D%3E__module_federation_remote_infos__)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToExternalAndNameMapping%22%2C()%3D%3E%7Bconst%20remotesLoadingIdToExternalAndNameMappingMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7BremotesLoadingIdToExternalAndNameMappingMapping%5BmoduleId%5D%3D%5Bdata.shareScope%2Cdata.name%2Cdata.externalModuleId%2Cdata.remoteName%5D%7Dreturn%20remotesLoadingIdToExternalAndNameMappingMapping%7D)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22webpackRequire%22%2C()%3D%3EruntimeRequire)%3Bmerge(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToRemoteMap%22%2C()%3D%3E%7Bconst%20idToRemoteMap%3D%7B%7D%3Bfor(let%5Bid%2CremoteData%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7Bconst%20info%3D__module_federation_remote_infos__%5BremoteData.remoteName%5D%3Bif(info)idToRemoteMap%5Bid%5D%3Dinfo%7Dreturn%20idToRemoteMap%7D)%3Boverride(runtimeRequire%2C%22S%22%2CruntimeRequire.federation.bundlerRuntime.S)%3Bif(runtimeRequire.federation.attachShareScopeMap)%7BruntimeRequire.federation.attachShareScopeMap(runtimeRequire)%7Doverride(runtimeRequire.f%2C%22remotes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.remotes(%7BchunkId%2Cpromises%2CchunkMapping%3AremotesLoadingChunkMapping%2CidToExternalAndNameMapping%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping%2CidToRemoteMap%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToRemoteMap%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire.f%2C%22consumes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.consumes(%7BchunkId%2Cpromises%2CchunkMapping%3AconsumesLoadingChunkMapping%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%2CinstalledModules%3AconsumesLoadinginstalledModules%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22I%22%2C(name%2CinitScope)%3D%3EruntimeRequire.federation.bundlerRuntime.I(%7BshareScopeName%3Aname%2CinitScope%2CinitPromises%3AinitializeSharingInitPromises%2CinitTokens%3AinitializeSharingInitTokens%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22initContainer%22%2C(shareScope%2CinitScope%2CremoteEntryInitOptions)%3D%3EruntimeRequire.federation.bundlerRuntime.initContainerEntry(%7BshareScope%2CinitScope%2CremoteEntryInitOptions%2CshareScopeKey%3AcontainerShareScope%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22getContainer%22%2C(module%2CgetScope)%3D%3E%7Bvar%20moduleMap%3DruntimeRequire.initializeExposesData.moduleMap%3BruntimeRequire.R%3DgetScope%3BgetScope%3DObject.prototype.hasOwnProperty.call(moduleMap%2Cmodule)%3FmoduleMap%5Bmodule%5D()%3APromise.resolve().then(()%3D%3E%7Bthrow%20new%20Error('Module%20%22'%2Bmodule%2B'%22%20does%20not%20exist%20in%20container.')%7D)%3BruntimeRequire.R%3Dundefined%3Breturn%20getScope%7D)%3BruntimeRequire.federation.instance%3DruntimeRequire.federation.bundlerRuntime.init(%7BwebpackRequire%3AruntimeRequire%7D)%3Bif((_runtimeRequire_consumesLoadingData2%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData2%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData2.initialConsumes)%7BruntimeRequire.federation.bundlerRuntime.installInitialConsumes(%7BwebpackRequire%3AruntimeRequire%2CinstalledModules%3AconsumesLoadinginstalledModules%2CinitialConsumes%3AruntimeRequire.consumesLoadingData.initialConsumes%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%7D)%7D%7D") + } + if (typeof prevStartup === "function") { + return prevStartup(); + } + console.warn("[MF] Invalid prevStartup"); +}; })(); -/************************************************************************/ // module factories are used so entry inlining is disabled // run startup var __webpack_exports__ = __webpack_require__.x(); @@ -944,22 +1333,14 @@ var __webpack_exports__ = __webpack_require__.x(); `; exports[`NativeEntryPlugin > with Module Federation v2 ('0.21.0') > should execute polyfills runtime module before MF v2 federation runtime 1`] = ` -"(() => { // webpackBootstrap +"(() => { var __webpack_modules__ = ({ -"@module-federation/runtime/rspack.js!=!data:text/javascript,import __module_federation_bundler_runtime__ from \\"/node_modules/.pnpm/@module-federation+webpack-bundler-runtime@0.21.0/node_modules/@module-federation/webpack-bundler-runtime/dist/index.cjs.cjs\\";const __module_federation_runtime_plugins__ = [];const __module_federation_remote_infos__ = {};const __module_federation_container_name__ = \\"testContainer\\";const __module_federation_share_strategy__ = \\"version-first\\";if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value===\\"object\\"&&value!==null){var _obj1,_key1;var _1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};var __webpack_require___remotesLoadingData_chunkMapping;const remotesLoadingChunkMapping=(__webpack_require___remotesLoadingData_chunkMapping=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&__webpack_require___remotesLoadingData_chunkMapping!==void 0?__webpack_require___remotesLoadingData_chunkMapping:{};var __webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping;const remotesLoadingModuleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping!==void 0?__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping:{};var __webpack_require___initializeSharingData_scopeToSharingDataMapping;const initializeSharingScopeToInitDataMapping=(__webpack_require___initializeSharingData_scopeToSharingDataMapping=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&__webpack_require___initializeSharingData_scopeToSharingDataMapping!==void 0?__webpack_require___initializeSharingData_scopeToSharingDataMapping:{};var __webpack_require___consumesLoadingData_chunkMapping;const consumesLoadingChunkMapping=(__webpack_require___consumesLoadingData_chunkMapping=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&__webpack_require___consumesLoadingData_chunkMapping!==void 0?__webpack_require___consumesLoadingData_chunkMapping:{};var __webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping;const consumesLoadingModuleToConsumeDataMapping=(__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping!==void 0?__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,\\"consumesLoadingModuleToHandlerMapping\\",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){consumesLoadingModuleToHandlerMapping[moduleId]={getter:data.fallback,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,\\"initOptions\\",()=>({}));early(__webpack_require__.federation.initOptions,\\"name\\",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,\\"shareStrategy\\",()=>__module_federation_share_strategy__);early(__webpack_require__.federation.initOptions,\\"shared\\",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage===\\"object\\"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!==\\"undefined\\"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,\\"remotes\\",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType===\\"script\\"));merge(__webpack_require__.federation.initOptions,\\"plugins\\",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,\\"bundlerRuntimeOptions\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,\\"remotes\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"chunkMapping\\",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"remoteInfos\\",()=>__module_federation_remote_infos__);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToExternalAndNameMapping\\",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"webpackRequire\\",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToRemoteMap\\",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,\\"S\\",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,\\"remotes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,\\"consumes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"I\\",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"initContainer\\",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"getContainer\\",(module1,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module1)?moduleMap[module1]():Promise.resolve().then(()=>{throw new Error('Module \\"'+module1+'\\" does not exist in container.')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}": -/*!*********************************************!*\\ - !*** external "globalThis.__MF_EXTERNAL__" ***! - \\*********************************************/ -(function (module) { +"@module-federation/runtime/rspack.js!=!data:text/javascript,import%20__module_federation_bundler_runtime__%20from%20%22%3CrootDir%3E%2Fnode_modules%2F.pnpm%2F%40module-federation%2Bwebpack-bundler-runtime%400.21.0%2Fnode_modules%2F%40module-federation%2Fwebpack-bundler-runtime%2Fdist%2Findex.cjs.cjs%22%3B%3Bconst%20__module_federation_runtime_plugins__%20%3D%20%5B%5D.filter((%7B%20plugin%20%7D)%20%3D%3E%20plugin).map((%7B%20plugin%2C%20params%20%7D)%20%3D%3E%20plugin(params))%3Bconst%20__module_federation_remote_infos__%20%3D%20%7B%7D%3Bconst%20__module_federation_container_name__%20%3D%20%22testContainer%22%3Bconst%20__module_federation_share_strategy__%20%3D%20%22version-first%22%3Bconst%20__module_federation_share_fallbacks__%20%3D%20undefined%3Bconst%20__module_federation_library_type__%20%3D%20%22var%22%3Bconst%20runtimeRequire%3D__webpack_require__%3Bif((runtimeRequire.initializeSharingData%7C%7CruntimeRequire.initializeExposesData)%26%26runtimeRequire.federation)%7Bvar%20_ref%2C_ref1%2C_ref2%2C_ref3%2C_ref4%3Bvar%20_runtimeRequire_remotesLoadingData%2C_runtimeRequire_remotesLoadingData1%2C_runtimeRequire_initializeSharingData%2C_runtimeRequire_consumesLoadingData%2C_runtimeRequire_consumesLoadingData1%2C_runtimeRequire_initializeExposesData%2C_runtimeRequire_consumesLoadingData2%3Bconst%20override%3D(obj%2Ckey%2Cvalue)%3D%3E%7Bif(!obj)return%3Bif(obj%5Bkey%5D)obj%5Bkey%5D%3Dvalue%7D%3Bconst%20merge%3D(obj%2Ckey%2Cfn)%3D%3E%7Bconst%20value%3Dfn()%3Bif(Array.isArray(value))%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3D%5B%5D%3Bobj%5Bkey%5D.push(...value)%7Delse%20if(typeof%20value%3D%3D%3D%22object%22%26%26value!%3D%3Dnull)%7Bvar%20_obj1%2C_key1%2C_1%3B(_1%3D(_obj1%3Dobj)%5B_key1%3Dkey%5D)!%3D%3Dnull%26%26_1!%3D%3Dvoid%200%3F_1%3A_obj1%5B_key1%5D%3D%7B%7D%3BObject.assign(obj%5Bkey%5D%2Cvalue)%7D%7D%3Bconst%20early%3D(obj%2Ckey%2Cinitial)%3D%3E%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3Dinitial()%7D%3Bconst%20remotesLoadingChunkMapping%3D(_ref%3D(_runtimeRequire_remotesLoadingData%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref!%3D%3Dvoid%200%3F_ref%3A%7B%7D%3Bconst%20remotesLoadingModuleIdToRemoteDataMapping%3D(_ref1%3D(_runtimeRequire_remotesLoadingData1%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData1.moduleIdToRemoteDataMapping)!%3D%3Dnull%26%26_ref1!%3D%3Dvoid%200%3F_ref1%3A%7B%7D%3Bconst%20initializeSharingScopeToInitDataMapping%3D(_ref2%3D(_runtimeRequire_initializeSharingData%3DruntimeRequire.initializeSharingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeSharingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeSharingData.scopeToSharingDataMapping)!%3D%3Dnull%26%26_ref2!%3D%3Dvoid%200%3F_ref2%3A%7B%7D%3Bconst%20consumesLoadingChunkMapping%3D(_ref3%3D(_runtimeRequire_consumesLoadingData%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref3!%3D%3Dvoid%200%3F_ref3%3A%7B%7D%3Bconst%20consumesLoadingModuleToConsumeDataMapping%3D(_ref4%3D(_runtimeRequire_consumesLoadingData1%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData1.moduleIdToConsumeDataMapping)!%3D%3Dnull%26%26_ref4!%3D%3Dvoid%200%3F_ref4%3A%7B%7D%3Bconst%20consumesLoadinginstalledModules%3D%7B%7D%3Bconst%20initializeSharingInitPromises%3D%5B%5D%3Bconst%20initializeSharingInitTokens%3D%7B%7D%3Bconst%20containerShareScope%3D(_runtimeRequire_initializeExposesData%3DruntimeRequire.initializeExposesData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeExposesData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeExposesData.shareScope%3Bfor(const%20key%20in%20__module_federation_bundler_runtime__)%7BruntimeRequire.federation%5Bkey%5D%3D__module_federation_bundler_runtime__%5Bkey%5D%7Dearly(runtimeRequire.federation%2C%22libraryType%22%2C()%3D%3E__module_federation_library_type__)%3Bearly(runtimeRequire.federation%2C%22sharedFallback%22%2C()%3D%3E__module_federation_share_fallbacks__)%3Bconst%20sharedFallback%3DruntimeRequire.federation.sharedFallback%3Bearly(runtimeRequire.federation%2C%22consumesLoadingModuleToHandlerMapping%22%2C()%3D%3E%7Bconst%20consumesLoadingModuleToHandlerMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(consumesLoadingModuleToConsumeDataMapping))%7Bvar%20_runtimeRequire_federation_bundlerRuntime%3BconsumesLoadingModuleToHandlerMapping%5BmoduleId%5D%3D%7Bgetter%3AsharedFallback%3F(_runtimeRequire_federation_bundlerRuntime%3DruntimeRequire.federation.bundlerRuntime)%3D%3D%3Dnull%7C%7C_runtimeRequire_federation_bundlerRuntime%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_federation_bundlerRuntime.getSharedFallbackGetter(%7BshareKey%3Adata.shareKey%2Cfactory%3Adata.fallback%2CwebpackRequire%3AruntimeRequire%2ClibraryType%3AruntimeRequire.federation.libraryType%7D)%3Adata.fallback%2CtreeShakingGetter%3AsharedFallback%3Fdata.fallback%3Aundefined%2CshareInfo%3A%7BshareConfig%3A%7BfixedDependencies%3Afalse%2CrequiredVersion%3Adata.requiredVersion%2CstrictVersion%3Adata.strictVersion%2Csingleton%3Adata.singleton%2Ceager%3Adata.eager%7D%2Cscope%3A%5Bdata.shareScope%5D%7D%2CshareKey%3Adata.shareKey%2CtreeShaking%3AruntimeRequire.federation.sharedFallback%3F%7Bget%3Adata.fallback%2Cmode%3Adata.treeShakingMode%7D%3Aundefined%7D%7Dreturn%20consumesLoadingModuleToHandlerMapping%7D)%3Bearly(runtimeRequire.federation%2C%22initOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.initOptions%2C%22name%22%2C()%3D%3E__module_federation_container_name__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shareStrategy%22%2C()%3D%3E__module_federation_share_strategy__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shared%22%2C()%3D%3E%7Bconst%20shared%3D%7B%7D%3Bfor(let%5Bscope%2Cstages%5Dof%20Object.entries(initializeSharingScopeToInitDataMapping))%7Bfor(let%20stage%20of%20stages)%7Bif(typeof%20stage%3D%3D%3D%22object%22%26%26stage!%3D%3Dnull)%7Bconst%7Bname%2Cversion%2Cfactory%2Ceager%2Csingleton%2CrequiredVersion%2CstrictVersion%2CtreeShakingMode%7D%3Dstage%3Bconst%20shareConfig%3D%7B%7D%3Bconst%20isValidValue%3Dfunction(val)%7Breturn%20typeof%20val!%3D%3D%22undefined%22%7D%3Bif(isValidValue(singleton))%7BshareConfig.singleton%3Dsingleton%7Dif(isValidValue(requiredVersion))%7BshareConfig.requiredVersion%3DrequiredVersion%7Dif(isValidValue(eager))%7BshareConfig.eager%3Deager%7Dif(isValidValue(strictVersion))%7BshareConfig.strictVersion%3DstrictVersion%7Dconst%20options%3D%7Bversion%2Cscope%3A%5Bscope%5D%2CshareConfig%2Cget%3Afactory%2CtreeShaking%3AtreeShakingMode%3F%7Bmode%3AtreeShakingMode%7D%3Aundefined%7D%3Bif(shared%5Bname%5D)%7Bshared%5Bname%5D.push(options)%7Delse%7Bshared%5Bname%5D%3D%5Boptions%5D%7D%7D%7D%7Dreturn%20shared%7D)%3Bmerge(runtimeRequire.federation.initOptions%2C%22remotes%22%2C()%3D%3EObject.values(__module_federation_remote_infos__).flat().filter(remote%3D%3Eremote.externalType%3D%3D%3D%22script%22))%3Bmerge(runtimeRequire.federation.initOptions%2C%22plugins%22%2C()%3D%3E__module_federation_runtime_plugins__)%3Bearly(runtimeRequire.federation%2C%22bundlerRuntimeOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions%2C%22remotes%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22chunkMapping%22%2C()%3D%3EremotesLoadingChunkMapping)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22remoteInfos%22%2C()%3D%3E__module_federation_remote_infos__)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToExternalAndNameMapping%22%2C()%3D%3E%7Bconst%20remotesLoadingIdToExternalAndNameMappingMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7BremotesLoadingIdToExternalAndNameMappingMapping%5BmoduleId%5D%3D%5Bdata.shareScope%2Cdata.name%2Cdata.externalModuleId%2Cdata.remoteName%5D%7Dreturn%20remotesLoadingIdToExternalAndNameMappingMapping%7D)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22webpackRequire%22%2C()%3D%3EruntimeRequire)%3Bmerge(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToRemoteMap%22%2C()%3D%3E%7Bconst%20idToRemoteMap%3D%7B%7D%3Bfor(let%5Bid%2CremoteData%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7Bconst%20info%3D__module_federation_remote_infos__%5BremoteData.remoteName%5D%3Bif(info)idToRemoteMap%5Bid%5D%3Dinfo%7Dreturn%20idToRemoteMap%7D)%3Boverride(runtimeRequire%2C%22S%22%2CruntimeRequire.federation.bundlerRuntime.S)%3Bif(runtimeRequire.federation.attachShareScopeMap)%7BruntimeRequire.federation.attachShareScopeMap(runtimeRequire)%7Doverride(runtimeRequire.f%2C%22remotes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.remotes(%7BchunkId%2Cpromises%2CchunkMapping%3AremotesLoadingChunkMapping%2CidToExternalAndNameMapping%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping%2CidToRemoteMap%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToRemoteMap%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire.f%2C%22consumes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.consumes(%7BchunkId%2Cpromises%2CchunkMapping%3AconsumesLoadingChunkMapping%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%2CinstalledModules%3AconsumesLoadinginstalledModules%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22I%22%2C(name%2CinitScope)%3D%3EruntimeRequire.federation.bundlerRuntime.I(%7BshareScopeName%3Aname%2CinitScope%2CinitPromises%3AinitializeSharingInitPromises%2CinitTokens%3AinitializeSharingInitTokens%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22initContainer%22%2C(shareScope%2CinitScope%2CremoteEntryInitOptions)%3D%3EruntimeRequire.federation.bundlerRuntime.initContainerEntry(%7BshareScope%2CinitScope%2CremoteEntryInitOptions%2CshareScopeKey%3AcontainerShareScope%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22getContainer%22%2C(module%2CgetScope)%3D%3E%7Bvar%20moduleMap%3DruntimeRequire.initializeExposesData.moduleMap%3BruntimeRequire.R%3DgetScope%3BgetScope%3DObject.prototype.hasOwnProperty.call(moduleMap%2Cmodule)%3FmoduleMap%5Bmodule%5D()%3APromise.resolve().then(()%3D%3E%7Bthrow%20new%20Error('Module%20%22'%2Bmodule%2B'%22%20does%20not%20exist%20in%20container.')%7D)%3BruntimeRequire.R%3Dundefined%3Breturn%20getScope%7D)%3BruntimeRequire.federation.instance%3DruntimeRequire.federation.bundlerRuntime.init(%7BwebpackRequire%3AruntimeRequire%7D)%3Bif((_runtimeRequire_consumesLoadingData2%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData2%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData2.initialConsumes)%7BruntimeRequire.federation.bundlerRuntime.installInitialConsumes(%7BwebpackRequire%3AruntimeRequire%2CinstalledModules%3AconsumesLoadinginstalledModules%2CinitialConsumes%3AruntimeRequire.consumesLoadingData.initialConsumes%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%7D)%7D%7D"(module) { "use strict"; module.exports = globalThis.__MF_EXTERNAL__; -}), -"../../../../packages/repack/dist/modules/IncludeModules.js": -/*!******************************************************************!*\\ - !*** ../../../../packages/repack/dist/modules/IncludeModules.js ***! - \\******************************************************************/ -(function () { +}, +"../../../../packages/repack/dist/modules/IncludeModules.js"() { /* * This module is added as an entry module to prevent stripping of these React Native deep imports from the bundle. * We use require.resolve from Rspack/Webpack to ensure these modules are included even if not directly used. @@ -967,59 +1348,38 @@ module.exports = globalThis.__MF_EXTERNAL__; * These modules are required by assetsLoader and should be shared as deep imports when using ModuleFederation. */ -/*require.resolve*/(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetRegistry'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); -/*require.resolve*/(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetSourceResolver'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); +/*require.resolve*/(Object(function __rspack_missing_module() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetRegistry'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); +/*require.resolve*/(Object(function __rspack_missing_module() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetSourceResolver'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); -}), -"../../../../packages/repack/dist/modules/InitializeScriptManager.js": -/*!***************************************************************************!*\\ - !*** ../../../../packages/repack/dist/modules/InitializeScriptManager.js ***! - \\***************************************************************************/ -(function () { +}, +"../../../../packages/repack/dist/modules/InitializeScriptManager.js"() { throw new Error(" × Module parse failed:\\n ╰─▶ × JavaScript parse error: 'import', and 'export' cannot be used outside of module code\\n ╭─[1:0]\\n 1 │ import { ScriptManager } from './ScriptManager/ScriptManager.js';\\n · ──────\\n 2 │ ScriptManager.init();\\n ╰────\\n \\n help: \\n You may need an appropriate loader to handle this file type.\\n"); -}), -"./__fixtures__/react-native/Libraries/Core/InitializeCore.js": -/*!********************************************************************!*\\ - !*** ./__fixtures__/react-native/Libraries/Core/InitializeCore.js ***! - \\********************************************************************/ -(function () { +}, +"./__fixtures__/react-native/Libraries/Core/InitializeCore.js"() { globalThis.__INITIALIZE_CORE__ = true; -}), -"./__fixtures__/react-native/polyfill1.js": -/*!************************************************!*\\ - !*** ./__fixtures__/react-native/polyfill1.js ***! - \\************************************************/ -(function () { +}, +"./__fixtures__/react-native/polyfill1.js"() { globalThis.__POLYFILL_1__ = true; -}), -"./__fixtures__/react-native/polyfill2.js": -/*!************************************************!*\\ - !*** ./__fixtures__/react-native/polyfill2.js ***! - \\************************************************/ -(function () { +}, +"./__fixtures__/react-native/polyfill2.js"() { globalThis.__POLYFILL_2__ = true; -}), -"./index.js": -/*!******************!*\\ - !*** ./index.js ***! - \\******************/ -(function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { +}, +"./index.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); globalThis.__APP_ENTRY__ = true; -}), +}, }); -/************************************************************************/ // The module cache var __webpack_module_cache__ = {}; @@ -1061,41 +1421,108 @@ var __webpack_exports__ = __webpack_require__("./index.js"); return __webpack_exports__ }; -/************************************************************************/ -// module_federation/runtime +// webpack/runtime/ensure_chunk (() => { - -if(!__webpack_require__.federation){ - __webpack_require__.federation = { - -chunkMatcher: function(chunkId) { - return true; -}, -rootOutputDir: "", - - }; +__webpack_require__.f = {}; +// This file contains only the entry chunk. +// The chunk loading function for additional chunks +__webpack_require__.e = (chunkId) => { + return Promise.all( + Object.keys(__webpack_require__.f).reduce((promises, key) => { + __webpack_require__.f[key](chunkId, promises); + return promises; + }, []) + ); +}; +})(); +// webpack/runtime/get javascript chunk filename +(() => { +// This function allow to reference chunks +__webpack_require__.u = (chunkId) => { + // return url for filenames not based on template + + // return url for filenames based on template + return "" + chunkId + ".javascript" } - })(); -// webpack/runtime/embed_federation_runtime +// webpack/runtime/global (() => { -var prevStartup = __webpack_require__.x; -var hasRun = false; -__webpack_require__.x = function() { - if (!hasRun) { - hasRun = true; - __webpack_require__("@module-federation/runtime/rspack.js!=!data:text/javascript,import __module_federation_bundler_runtime__ from \\"/node_modules/.pnpm/@module-federation+webpack-bundler-runtime@0.21.0/node_modules/@module-federation/webpack-bundler-runtime/dist/index.cjs.cjs\\";const __module_federation_runtime_plugins__ = [];const __module_federation_remote_infos__ = {};const __module_federation_container_name__ = \\"testContainer\\";const __module_federation_share_strategy__ = \\"version-first\\";if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value===\\"object\\"&&value!==null){var _obj1,_key1;var _1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};var __webpack_require___remotesLoadingData_chunkMapping;const remotesLoadingChunkMapping=(__webpack_require___remotesLoadingData_chunkMapping=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&__webpack_require___remotesLoadingData_chunkMapping!==void 0?__webpack_require___remotesLoadingData_chunkMapping:{};var __webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping;const remotesLoadingModuleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping!==void 0?__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping:{};var __webpack_require___initializeSharingData_scopeToSharingDataMapping;const initializeSharingScopeToInitDataMapping=(__webpack_require___initializeSharingData_scopeToSharingDataMapping=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&__webpack_require___initializeSharingData_scopeToSharingDataMapping!==void 0?__webpack_require___initializeSharingData_scopeToSharingDataMapping:{};var __webpack_require___consumesLoadingData_chunkMapping;const consumesLoadingChunkMapping=(__webpack_require___consumesLoadingData_chunkMapping=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&__webpack_require___consumesLoadingData_chunkMapping!==void 0?__webpack_require___consumesLoadingData_chunkMapping:{};var __webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping;const consumesLoadingModuleToConsumeDataMapping=(__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping!==void 0?__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,\\"consumesLoadingModuleToHandlerMapping\\",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){consumesLoadingModuleToHandlerMapping[moduleId]={getter:data.fallback,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,\\"initOptions\\",()=>({}));early(__webpack_require__.federation.initOptions,\\"name\\",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,\\"shareStrategy\\",()=>__module_federation_share_strategy__);early(__webpack_require__.federation.initOptions,\\"shared\\",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage===\\"object\\"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!==\\"undefined\\"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,\\"remotes\\",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType===\\"script\\"));merge(__webpack_require__.federation.initOptions,\\"plugins\\",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,\\"bundlerRuntimeOptions\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,\\"remotes\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"chunkMapping\\",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"remoteInfos\\",()=>__module_federation_remote_infos__);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToExternalAndNameMapping\\",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"webpackRequire\\",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToRemoteMap\\",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,\\"S\\",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,\\"remotes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,\\"consumes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"I\\",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"initContainer\\",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"getContainer\\",(module1,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module1)?moduleMap[module1]():Promise.resolve().then(()=>{throw new Error('Module \\"'+module1+'\\" does not exist in container.')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}") - } - if (typeof prevStartup === 'function') { - return prevStartup(); - } else { - console.warn('[MF] Invalid prevStartup'); +__webpack_require__.g = (() => { + if (typeof globalThis === 'object') return globalThis; + try { + return this || new Function('return this')(); + } catch (e) { + if (typeof window === 'object') return window; } -}; +})(); })(); // webpack/runtime/has_own_property (() => { __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +})(); +// webpack/runtime/load_script +(() => { +var inProgress = {}; + + +// loadScript function to load a script via script tag +__webpack_require__.l = function (url, done, key, chunkId) { + if (inProgress[url]) { + inProgress[url].push(done); + return; + } + var script, needAttach; + if (key !== undefined) { + var scripts = document.getElementsByTagName("script"); + for (var i = 0; i < scripts.length; i++) { + var s = scripts[i]; + if (s.getAttribute("src") == url) { + script = s; + break; + } + } + } + if (!script) { + needAttach = true; + script = document.createElement('script'); + +script.timeout = 120; +if (__webpack_require__.nc) { + script.setAttribute("nonce", __webpack_require__.nc); +} + + + +script.src = url; + + + + } + inProgress[url] = [done]; + var onScriptComplete = function (prev, event) { + script.onerror = script.onload = null; + clearTimeout(timeout); + var doneFns = inProgress[url]; + delete inProgress[url]; + script.parentNode && script.parentNode.removeChild(script); + doneFns && + doneFns.forEach(function (fn) { + return fn(event); + }); + if (prev) return prev(event); + }; + var timeout = setTimeout( + onScriptComplete.bind(null, undefined, { + type: 'timeout', + target: script + }), + 120000 + ); + script.onerror = onScriptComplete.bind(null, script.onerror); + script.onload = onScriptComplete.bind(null, script.onload); + needAttach && document.head.appendChild(script); +}; + })(); // webpack/runtime/make_namespace_object (() => { @@ -1107,9 +1534,20 @@ __webpack_require__.r = (exports) => { Object.defineProperty(exports, '__esModule', { value: true }); }; })(); -// webpack/runtime/rspack_version +// webpack/runtime/module_federation/runtime (() => { -__webpack_require__.rv = () => ("1.6.0") + +if(!__webpack_require__.federation){ + __webpack_require__.federation = { + +chunkMatcher: function(chunkId) { + return true; +}, +rootOutputDir: "", + + }; +} + })(); // webpack/runtime/sharing (() => { @@ -1119,23 +1557,152 @@ __webpack_require__.initializeSharingData = { scopeToSharingDataMapping: { }, u __webpack_require__.I = __webpack_require__.I || function() { throw new Error("should have __webpack_require__.I") } })(); -// webpack/runtime/repack/polyfills +// repack/polyfills (() => { __webpack_require__("./__fixtures__/react-native/polyfill1.js"); __webpack_require__("./__fixtures__/react-native/polyfill2.js"); +})(); +// webpack/runtime/auto_public_path +(() => { +var scriptUrl; + +if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +var document = __webpack_require__.g.document; +if (!scriptUrl && document) { + // Technically we could use \`document.currentScript instanceof window.HTMLScriptElement\`, + // but an attacker could try to inject \`\` + // and use \`\` + if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') scriptUrl = document.currentScript.src; + if (!scriptUrl) { + var scripts = document.getElementsByTagName("script"); + if (scripts.length) { + var i = scripts.length - 1; + while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; + } + } +} + +// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration", +// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.', +if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\\?.*$/, "").replace(/\\/[^\\/]+$/, "/"); + +__webpack_require__.p = scriptUrl; + })(); // webpack/runtime/consumes_loading (() => { __webpack_require__.consumesLoadingData = { chunkMapping: {}, moduleIdToConsumeDataMapping: {}, initialConsumes: [] }; +__webpack_require__.f.consumes = __webpack_require__.f.consumes || function() { throw new Error("should have __webpack_require__.f.consumes") } +})(); +// webpack/runtime/jsonp_chunk_loading +(() => { + + // object to store loaded and loading chunks + // undefined = chunk not loaded, null = chunk preloaded/prefetched + // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded + var installedChunks = {"main": 0,}; + + __webpack_require__.f.j = function (chunkId, promises) { + // JSONP chunk loading for javascript +var installedChunkData = __webpack_require__.o(installedChunks, chunkId) + ? installedChunks[chunkId] + : undefined; +if (installedChunkData !== 0) { + // 0 means "already installed". + + // a Promise means "currently loading". + if (installedChunkData) { + promises.push(installedChunkData[2]); + } else { + if (true) { + // setup Promise in chunk cache + var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); + promises.push((installedChunkData[2] = promise)); + + // start chunk loading + var url = __webpack_require__.p + __webpack_require__.u(chunkId); + // create error before stack unwound to get useful stacktrace later + var error = new Error(); + var loadingEnded = function (event) { + if (__webpack_require__.o(installedChunks, chunkId)) { + installedChunkData = installedChunks[chunkId]; + if (installedChunkData !== 0) installedChunks[chunkId] = undefined; + if (installedChunkData) { + var errorType = + event && (event.type === 'load' ? 'missing' : event.type); + var realSrc = event && event.target && event.target.src; + error.message = + 'Loading chunk ' + + chunkId + + ' failed.\\n(' + + errorType + + ': ' + + realSrc + + ')'; + error.name = 'ChunkLoadError'; + error.type = errorType; + error.request = realSrc; + installedChunkData[1](error); + } + } + }; + __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); + } + } +} + + } + // install a JSONP callback for chunk loading +var __rspack_jsonp = (parentChunkLoadingFunction, data) => { + var [chunkIds, moreModules, runtime] = data; + // add "moreModules" to the modules object, + // then flag all "chunkIds" as loaded and fire callback + var moduleId, chunkId, i = 0; + if (chunkIds.some((id) => (installedChunks[id] !== 0))) { + for (moduleId in moreModules) { + if (__webpack_require__.o(moreModules, moduleId)) { + __webpack_require__.m[moduleId] = moreModules[moduleId]; + } + } + if (runtime) var result = runtime(__webpack_require__); + } + if (parentChunkLoadingFunction) parentChunkLoadingFunction(data); + for (; i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if ( + __webpack_require__.o(installedChunks, chunkId) && + installedChunks[chunkId] + ) { + installedChunks[chunkId][0](); + } + installedChunks[chunkId] = 0; + } + +}; + +var chunkLoadingGlobal = self["rspackChunk"] = self["rspackChunk"] || []; +chunkLoadingGlobal.forEach(__rspack_jsonp.bind(null, 0)); +chunkLoadingGlobal.push = __rspack_jsonp.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); })(); -// webpack/runtime/rspack_unique_id +// webpack/runtime/embed_federation_runtime (() => { -__webpack_require__.ruid = "bundler=rspack@1.6.0"; +var prevStartup = __webpack_require__.x; +var hasRun = false; +__webpack_require__.x = function () { + if (!hasRun) { + hasRun = true; + __webpack_require__("@module-federation/runtime/rspack.js!=!data:text/javascript,import%20__module_federation_bundler_runtime__%20from%20%22%3CrootDir%3E%2Fnode_modules%2F.pnpm%2F%40module-federation%2Bwebpack-bundler-runtime%400.21.0%2Fnode_modules%2F%40module-federation%2Fwebpack-bundler-runtime%2Fdist%2Findex.cjs.cjs%22%3B%3Bconst%20__module_federation_runtime_plugins__%20%3D%20%5B%5D.filter((%7B%20plugin%20%7D)%20%3D%3E%20plugin).map((%7B%20plugin%2C%20params%20%7D)%20%3D%3E%20plugin(params))%3Bconst%20__module_federation_remote_infos__%20%3D%20%7B%7D%3Bconst%20__module_federation_container_name__%20%3D%20%22testContainer%22%3Bconst%20__module_federation_share_strategy__%20%3D%20%22version-first%22%3Bconst%20__module_federation_share_fallbacks__%20%3D%20undefined%3Bconst%20__module_federation_library_type__%20%3D%20%22var%22%3Bconst%20runtimeRequire%3D__webpack_require__%3Bif((runtimeRequire.initializeSharingData%7C%7CruntimeRequire.initializeExposesData)%26%26runtimeRequire.federation)%7Bvar%20_ref%2C_ref1%2C_ref2%2C_ref3%2C_ref4%3Bvar%20_runtimeRequire_remotesLoadingData%2C_runtimeRequire_remotesLoadingData1%2C_runtimeRequire_initializeSharingData%2C_runtimeRequire_consumesLoadingData%2C_runtimeRequire_consumesLoadingData1%2C_runtimeRequire_initializeExposesData%2C_runtimeRequire_consumesLoadingData2%3Bconst%20override%3D(obj%2Ckey%2Cvalue)%3D%3E%7Bif(!obj)return%3Bif(obj%5Bkey%5D)obj%5Bkey%5D%3Dvalue%7D%3Bconst%20merge%3D(obj%2Ckey%2Cfn)%3D%3E%7Bconst%20value%3Dfn()%3Bif(Array.isArray(value))%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3D%5B%5D%3Bobj%5Bkey%5D.push(...value)%7Delse%20if(typeof%20value%3D%3D%3D%22object%22%26%26value!%3D%3Dnull)%7Bvar%20_obj1%2C_key1%2C_1%3B(_1%3D(_obj1%3Dobj)%5B_key1%3Dkey%5D)!%3D%3Dnull%26%26_1!%3D%3Dvoid%200%3F_1%3A_obj1%5B_key1%5D%3D%7B%7D%3BObject.assign(obj%5Bkey%5D%2Cvalue)%7D%7D%3Bconst%20early%3D(obj%2Ckey%2Cinitial)%3D%3E%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3Dinitial()%7D%3Bconst%20remotesLoadingChunkMapping%3D(_ref%3D(_runtimeRequire_remotesLoadingData%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref!%3D%3Dvoid%200%3F_ref%3A%7B%7D%3Bconst%20remotesLoadingModuleIdToRemoteDataMapping%3D(_ref1%3D(_runtimeRequire_remotesLoadingData1%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData1.moduleIdToRemoteDataMapping)!%3D%3Dnull%26%26_ref1!%3D%3Dvoid%200%3F_ref1%3A%7B%7D%3Bconst%20initializeSharingScopeToInitDataMapping%3D(_ref2%3D(_runtimeRequire_initializeSharingData%3DruntimeRequire.initializeSharingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeSharingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeSharingData.scopeToSharingDataMapping)!%3D%3Dnull%26%26_ref2!%3D%3Dvoid%200%3F_ref2%3A%7B%7D%3Bconst%20consumesLoadingChunkMapping%3D(_ref3%3D(_runtimeRequire_consumesLoadingData%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref3!%3D%3Dvoid%200%3F_ref3%3A%7B%7D%3Bconst%20consumesLoadingModuleToConsumeDataMapping%3D(_ref4%3D(_runtimeRequire_consumesLoadingData1%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData1.moduleIdToConsumeDataMapping)!%3D%3Dnull%26%26_ref4!%3D%3Dvoid%200%3F_ref4%3A%7B%7D%3Bconst%20consumesLoadinginstalledModules%3D%7B%7D%3Bconst%20initializeSharingInitPromises%3D%5B%5D%3Bconst%20initializeSharingInitTokens%3D%7B%7D%3Bconst%20containerShareScope%3D(_runtimeRequire_initializeExposesData%3DruntimeRequire.initializeExposesData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeExposesData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeExposesData.shareScope%3Bfor(const%20key%20in%20__module_federation_bundler_runtime__)%7BruntimeRequire.federation%5Bkey%5D%3D__module_federation_bundler_runtime__%5Bkey%5D%7Dearly(runtimeRequire.federation%2C%22libraryType%22%2C()%3D%3E__module_federation_library_type__)%3Bearly(runtimeRequire.federation%2C%22sharedFallback%22%2C()%3D%3E__module_federation_share_fallbacks__)%3Bconst%20sharedFallback%3DruntimeRequire.federation.sharedFallback%3Bearly(runtimeRequire.federation%2C%22consumesLoadingModuleToHandlerMapping%22%2C()%3D%3E%7Bconst%20consumesLoadingModuleToHandlerMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(consumesLoadingModuleToConsumeDataMapping))%7Bvar%20_runtimeRequire_federation_bundlerRuntime%3BconsumesLoadingModuleToHandlerMapping%5BmoduleId%5D%3D%7Bgetter%3AsharedFallback%3F(_runtimeRequire_federation_bundlerRuntime%3DruntimeRequire.federation.bundlerRuntime)%3D%3D%3Dnull%7C%7C_runtimeRequire_federation_bundlerRuntime%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_federation_bundlerRuntime.getSharedFallbackGetter(%7BshareKey%3Adata.shareKey%2Cfactory%3Adata.fallback%2CwebpackRequire%3AruntimeRequire%2ClibraryType%3AruntimeRequire.federation.libraryType%7D)%3Adata.fallback%2CtreeShakingGetter%3AsharedFallback%3Fdata.fallback%3Aundefined%2CshareInfo%3A%7BshareConfig%3A%7BfixedDependencies%3Afalse%2CrequiredVersion%3Adata.requiredVersion%2CstrictVersion%3Adata.strictVersion%2Csingleton%3Adata.singleton%2Ceager%3Adata.eager%7D%2Cscope%3A%5Bdata.shareScope%5D%7D%2CshareKey%3Adata.shareKey%2CtreeShaking%3AruntimeRequire.federation.sharedFallback%3F%7Bget%3Adata.fallback%2Cmode%3Adata.treeShakingMode%7D%3Aundefined%7D%7Dreturn%20consumesLoadingModuleToHandlerMapping%7D)%3Bearly(runtimeRequire.federation%2C%22initOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.initOptions%2C%22name%22%2C()%3D%3E__module_federation_container_name__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shareStrategy%22%2C()%3D%3E__module_federation_share_strategy__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shared%22%2C()%3D%3E%7Bconst%20shared%3D%7B%7D%3Bfor(let%5Bscope%2Cstages%5Dof%20Object.entries(initializeSharingScopeToInitDataMapping))%7Bfor(let%20stage%20of%20stages)%7Bif(typeof%20stage%3D%3D%3D%22object%22%26%26stage!%3D%3Dnull)%7Bconst%7Bname%2Cversion%2Cfactory%2Ceager%2Csingleton%2CrequiredVersion%2CstrictVersion%2CtreeShakingMode%7D%3Dstage%3Bconst%20shareConfig%3D%7B%7D%3Bconst%20isValidValue%3Dfunction(val)%7Breturn%20typeof%20val!%3D%3D%22undefined%22%7D%3Bif(isValidValue(singleton))%7BshareConfig.singleton%3Dsingleton%7Dif(isValidValue(requiredVersion))%7BshareConfig.requiredVersion%3DrequiredVersion%7Dif(isValidValue(eager))%7BshareConfig.eager%3Deager%7Dif(isValidValue(strictVersion))%7BshareConfig.strictVersion%3DstrictVersion%7Dconst%20options%3D%7Bversion%2Cscope%3A%5Bscope%5D%2CshareConfig%2Cget%3Afactory%2CtreeShaking%3AtreeShakingMode%3F%7Bmode%3AtreeShakingMode%7D%3Aundefined%7D%3Bif(shared%5Bname%5D)%7Bshared%5Bname%5D.push(options)%7Delse%7Bshared%5Bname%5D%3D%5Boptions%5D%7D%7D%7D%7Dreturn%20shared%7D)%3Bmerge(runtimeRequire.federation.initOptions%2C%22remotes%22%2C()%3D%3EObject.values(__module_federation_remote_infos__).flat().filter(remote%3D%3Eremote.externalType%3D%3D%3D%22script%22))%3Bmerge(runtimeRequire.federation.initOptions%2C%22plugins%22%2C()%3D%3E__module_federation_runtime_plugins__)%3Bearly(runtimeRequire.federation%2C%22bundlerRuntimeOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions%2C%22remotes%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22chunkMapping%22%2C()%3D%3EremotesLoadingChunkMapping)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22remoteInfos%22%2C()%3D%3E__module_federation_remote_infos__)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToExternalAndNameMapping%22%2C()%3D%3E%7Bconst%20remotesLoadingIdToExternalAndNameMappingMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7BremotesLoadingIdToExternalAndNameMappingMapping%5BmoduleId%5D%3D%5Bdata.shareScope%2Cdata.name%2Cdata.externalModuleId%2Cdata.remoteName%5D%7Dreturn%20remotesLoadingIdToExternalAndNameMappingMapping%7D)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22webpackRequire%22%2C()%3D%3EruntimeRequire)%3Bmerge(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToRemoteMap%22%2C()%3D%3E%7Bconst%20idToRemoteMap%3D%7B%7D%3Bfor(let%5Bid%2CremoteData%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7Bconst%20info%3D__module_federation_remote_infos__%5BremoteData.remoteName%5D%3Bif(info)idToRemoteMap%5Bid%5D%3Dinfo%7Dreturn%20idToRemoteMap%7D)%3Boverride(runtimeRequire%2C%22S%22%2CruntimeRequire.federation.bundlerRuntime.S)%3Bif(runtimeRequire.federation.attachShareScopeMap)%7BruntimeRequire.federation.attachShareScopeMap(runtimeRequire)%7Doverride(runtimeRequire.f%2C%22remotes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.remotes(%7BchunkId%2Cpromises%2CchunkMapping%3AremotesLoadingChunkMapping%2CidToExternalAndNameMapping%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping%2CidToRemoteMap%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToRemoteMap%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire.f%2C%22consumes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.consumes(%7BchunkId%2Cpromises%2CchunkMapping%3AconsumesLoadingChunkMapping%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%2CinstalledModules%3AconsumesLoadinginstalledModules%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22I%22%2C(name%2CinitScope)%3D%3EruntimeRequire.federation.bundlerRuntime.I(%7BshareScopeName%3Aname%2CinitScope%2CinitPromises%3AinitializeSharingInitPromises%2CinitTokens%3AinitializeSharingInitTokens%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22initContainer%22%2C(shareScope%2CinitScope%2CremoteEntryInitOptions)%3D%3EruntimeRequire.federation.bundlerRuntime.initContainerEntry(%7BshareScope%2CinitScope%2CremoteEntryInitOptions%2CshareScopeKey%3AcontainerShareScope%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22getContainer%22%2C(module%2CgetScope)%3D%3E%7Bvar%20moduleMap%3DruntimeRequire.initializeExposesData.moduleMap%3BruntimeRequire.R%3DgetScope%3BgetScope%3DObject.prototype.hasOwnProperty.call(moduleMap%2Cmodule)%3FmoduleMap%5Bmodule%5D()%3APromise.resolve().then(()%3D%3E%7Bthrow%20new%20Error('Module%20%22'%2Bmodule%2B'%22%20does%20not%20exist%20in%20container.')%7D)%3BruntimeRequire.R%3Dundefined%3Breturn%20getScope%7D)%3BruntimeRequire.federation.instance%3DruntimeRequire.federation.bundlerRuntime.init(%7BwebpackRequire%3AruntimeRequire%7D)%3Bif((_runtimeRequire_consumesLoadingData2%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData2%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData2.initialConsumes)%7BruntimeRequire.federation.bundlerRuntime.installInitialConsumes(%7BwebpackRequire%3AruntimeRequire%2CinstalledModules%3AconsumesLoadinginstalledModules%2CinitialConsumes%3AruntimeRequire.consumesLoadingData.initialConsumes%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%7D)%7D%7D") + } + if (typeof prevStartup === "function") { + return prevStartup(); + } + console.warn("[MF] Invalid prevStartup"); +}; })(); -/************************************************************************/ // module factories are used so entry inlining is disabled // run startup var __webpack_exports__ = __webpack_require__.x(); @@ -1144,22 +1711,14 @@ var __webpack_exports__ = __webpack_require__.x(); `; exports[`NativeEntryPlugin > with Module Federation v2 ('2.0.1') > should execute polyfills runtime module before MF v2 federation runtime 1`] = ` -"(() => { // webpackBootstrap +"(() => { var __webpack_modules__ = ({ -"@module-federation/runtime/rspack.js!=!data:text/javascript,import __module_federation_bundler_runtime__ from \\"/node_modules/.pnpm/@module-federation+webpack-bundler-runtime@2.0.1/node_modules/@module-federation/webpack-bundler-runtime/dist/index.cjs.cjs\\";const __module_federation_runtime_plugins__ = [];const __module_federation_remote_infos__ = {};const __module_federation_container_name__ = \\"testContainer\\";const __module_federation_share_strategy__ = \\"version-first\\";if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value===\\"object\\"&&value!==null){var _obj1,_key1;var _1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};var __webpack_require___remotesLoadingData_chunkMapping;const remotesLoadingChunkMapping=(__webpack_require___remotesLoadingData_chunkMapping=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&__webpack_require___remotesLoadingData_chunkMapping!==void 0?__webpack_require___remotesLoadingData_chunkMapping:{};var __webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping;const remotesLoadingModuleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping!==void 0?__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping:{};var __webpack_require___initializeSharingData_scopeToSharingDataMapping;const initializeSharingScopeToInitDataMapping=(__webpack_require___initializeSharingData_scopeToSharingDataMapping=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&__webpack_require___initializeSharingData_scopeToSharingDataMapping!==void 0?__webpack_require___initializeSharingData_scopeToSharingDataMapping:{};var __webpack_require___consumesLoadingData_chunkMapping;const consumesLoadingChunkMapping=(__webpack_require___consumesLoadingData_chunkMapping=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&__webpack_require___consumesLoadingData_chunkMapping!==void 0?__webpack_require___consumesLoadingData_chunkMapping:{};var __webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping;const consumesLoadingModuleToConsumeDataMapping=(__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping!==void 0?__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,\\"consumesLoadingModuleToHandlerMapping\\",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){consumesLoadingModuleToHandlerMapping[moduleId]={getter:data.fallback,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,\\"initOptions\\",()=>({}));early(__webpack_require__.federation.initOptions,\\"name\\",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,\\"shareStrategy\\",()=>__module_federation_share_strategy__);early(__webpack_require__.federation.initOptions,\\"shared\\",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage===\\"object\\"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!==\\"undefined\\"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,\\"remotes\\",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType===\\"script\\"));merge(__webpack_require__.federation.initOptions,\\"plugins\\",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,\\"bundlerRuntimeOptions\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,\\"remotes\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"chunkMapping\\",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"remoteInfos\\",()=>__module_federation_remote_infos__);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToExternalAndNameMapping\\",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"webpackRequire\\",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToRemoteMap\\",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,\\"S\\",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,\\"remotes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,\\"consumes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"I\\",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"initContainer\\",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"getContainer\\",(module1,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module1)?moduleMap[module1]():Promise.resolve().then(()=>{throw new Error('Module \\"'+module1+'\\" does not exist in container.')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}": -/*!*********************************************!*\\ - !*** external "globalThis.__MF_EXTERNAL__" ***! - \\*********************************************/ -(function (module) { +"@module-federation/runtime/rspack.js!=!data:text/javascript,import%20__module_federation_bundler_runtime__%20from%20%22%3CrootDir%3E%2Fnode_modules%2F.pnpm%2F%40module-federation%2Bwebpack-bundler-runtime%402.0.1%2Fnode_modules%2F%40module-federation%2Fwebpack-bundler-runtime%2Fdist%2Findex.cjs.cjs%22%3B%3Bconst%20__module_federation_runtime_plugins__%20%3D%20%5B%5D.filter((%7B%20plugin%20%7D)%20%3D%3E%20plugin).map((%7B%20plugin%2C%20params%20%7D)%20%3D%3E%20plugin(params))%3Bconst%20__module_federation_remote_infos__%20%3D%20%7B%7D%3Bconst%20__module_federation_container_name__%20%3D%20%22testContainer%22%3Bconst%20__module_federation_share_strategy__%20%3D%20%22version-first%22%3Bconst%20__module_federation_share_fallbacks__%20%3D%20undefined%3Bconst%20__module_federation_library_type__%20%3D%20%22var%22%3Bconst%20runtimeRequire%3D__webpack_require__%3Bif((runtimeRequire.initializeSharingData%7C%7CruntimeRequire.initializeExposesData)%26%26runtimeRequire.federation)%7Bvar%20_ref%2C_ref1%2C_ref2%2C_ref3%2C_ref4%3Bvar%20_runtimeRequire_remotesLoadingData%2C_runtimeRequire_remotesLoadingData1%2C_runtimeRequire_initializeSharingData%2C_runtimeRequire_consumesLoadingData%2C_runtimeRequire_consumesLoadingData1%2C_runtimeRequire_initializeExposesData%2C_runtimeRequire_consumesLoadingData2%3Bconst%20override%3D(obj%2Ckey%2Cvalue)%3D%3E%7Bif(!obj)return%3Bif(obj%5Bkey%5D)obj%5Bkey%5D%3Dvalue%7D%3Bconst%20merge%3D(obj%2Ckey%2Cfn)%3D%3E%7Bconst%20value%3Dfn()%3Bif(Array.isArray(value))%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3D%5B%5D%3Bobj%5Bkey%5D.push(...value)%7Delse%20if(typeof%20value%3D%3D%3D%22object%22%26%26value!%3D%3Dnull)%7Bvar%20_obj1%2C_key1%2C_1%3B(_1%3D(_obj1%3Dobj)%5B_key1%3Dkey%5D)!%3D%3Dnull%26%26_1!%3D%3Dvoid%200%3F_1%3A_obj1%5B_key1%5D%3D%7B%7D%3BObject.assign(obj%5Bkey%5D%2Cvalue)%7D%7D%3Bconst%20early%3D(obj%2Ckey%2Cinitial)%3D%3E%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3Dinitial()%7D%3Bconst%20remotesLoadingChunkMapping%3D(_ref%3D(_runtimeRequire_remotesLoadingData%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref!%3D%3Dvoid%200%3F_ref%3A%7B%7D%3Bconst%20remotesLoadingModuleIdToRemoteDataMapping%3D(_ref1%3D(_runtimeRequire_remotesLoadingData1%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData1.moduleIdToRemoteDataMapping)!%3D%3Dnull%26%26_ref1!%3D%3Dvoid%200%3F_ref1%3A%7B%7D%3Bconst%20initializeSharingScopeToInitDataMapping%3D(_ref2%3D(_runtimeRequire_initializeSharingData%3DruntimeRequire.initializeSharingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeSharingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeSharingData.scopeToSharingDataMapping)!%3D%3Dnull%26%26_ref2!%3D%3Dvoid%200%3F_ref2%3A%7B%7D%3Bconst%20consumesLoadingChunkMapping%3D(_ref3%3D(_runtimeRequire_consumesLoadingData%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref3!%3D%3Dvoid%200%3F_ref3%3A%7B%7D%3Bconst%20consumesLoadingModuleToConsumeDataMapping%3D(_ref4%3D(_runtimeRequire_consumesLoadingData1%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData1.moduleIdToConsumeDataMapping)!%3D%3Dnull%26%26_ref4!%3D%3Dvoid%200%3F_ref4%3A%7B%7D%3Bconst%20consumesLoadinginstalledModules%3D%7B%7D%3Bconst%20initializeSharingInitPromises%3D%5B%5D%3Bconst%20initializeSharingInitTokens%3D%7B%7D%3Bconst%20containerShareScope%3D(_runtimeRequire_initializeExposesData%3DruntimeRequire.initializeExposesData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeExposesData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeExposesData.shareScope%3Bfor(const%20key%20in%20__module_federation_bundler_runtime__)%7BruntimeRequire.federation%5Bkey%5D%3D__module_federation_bundler_runtime__%5Bkey%5D%7Dearly(runtimeRequire.federation%2C%22libraryType%22%2C()%3D%3E__module_federation_library_type__)%3Bearly(runtimeRequire.federation%2C%22sharedFallback%22%2C()%3D%3E__module_federation_share_fallbacks__)%3Bconst%20sharedFallback%3DruntimeRequire.federation.sharedFallback%3Bearly(runtimeRequire.federation%2C%22consumesLoadingModuleToHandlerMapping%22%2C()%3D%3E%7Bconst%20consumesLoadingModuleToHandlerMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(consumesLoadingModuleToConsumeDataMapping))%7Bvar%20_runtimeRequire_federation_bundlerRuntime%3BconsumesLoadingModuleToHandlerMapping%5BmoduleId%5D%3D%7Bgetter%3AsharedFallback%3F(_runtimeRequire_federation_bundlerRuntime%3DruntimeRequire.federation.bundlerRuntime)%3D%3D%3Dnull%7C%7C_runtimeRequire_federation_bundlerRuntime%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_federation_bundlerRuntime.getSharedFallbackGetter(%7BshareKey%3Adata.shareKey%2Cfactory%3Adata.fallback%2CwebpackRequire%3AruntimeRequire%2ClibraryType%3AruntimeRequire.federation.libraryType%7D)%3Adata.fallback%2CtreeShakingGetter%3AsharedFallback%3Fdata.fallback%3Aundefined%2CshareInfo%3A%7BshareConfig%3A%7BfixedDependencies%3Afalse%2CrequiredVersion%3Adata.requiredVersion%2CstrictVersion%3Adata.strictVersion%2Csingleton%3Adata.singleton%2Ceager%3Adata.eager%7D%2Cscope%3A%5Bdata.shareScope%5D%7D%2CshareKey%3Adata.shareKey%2CtreeShaking%3AruntimeRequire.federation.sharedFallback%3F%7Bget%3Adata.fallback%2Cmode%3Adata.treeShakingMode%7D%3Aundefined%7D%7Dreturn%20consumesLoadingModuleToHandlerMapping%7D)%3Bearly(runtimeRequire.federation%2C%22initOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.initOptions%2C%22name%22%2C()%3D%3E__module_federation_container_name__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shareStrategy%22%2C()%3D%3E__module_federation_share_strategy__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shared%22%2C()%3D%3E%7Bconst%20shared%3D%7B%7D%3Bfor(let%5Bscope%2Cstages%5Dof%20Object.entries(initializeSharingScopeToInitDataMapping))%7Bfor(let%20stage%20of%20stages)%7Bif(typeof%20stage%3D%3D%3D%22object%22%26%26stage!%3D%3Dnull)%7Bconst%7Bname%2Cversion%2Cfactory%2Ceager%2Csingleton%2CrequiredVersion%2CstrictVersion%2CtreeShakingMode%7D%3Dstage%3Bconst%20shareConfig%3D%7B%7D%3Bconst%20isValidValue%3Dfunction(val)%7Breturn%20typeof%20val!%3D%3D%22undefined%22%7D%3Bif(isValidValue(singleton))%7BshareConfig.singleton%3Dsingleton%7Dif(isValidValue(requiredVersion))%7BshareConfig.requiredVersion%3DrequiredVersion%7Dif(isValidValue(eager))%7BshareConfig.eager%3Deager%7Dif(isValidValue(strictVersion))%7BshareConfig.strictVersion%3DstrictVersion%7Dconst%20options%3D%7Bversion%2Cscope%3A%5Bscope%5D%2CshareConfig%2Cget%3Afactory%2CtreeShaking%3AtreeShakingMode%3F%7Bmode%3AtreeShakingMode%7D%3Aundefined%7D%3Bif(shared%5Bname%5D)%7Bshared%5Bname%5D.push(options)%7Delse%7Bshared%5Bname%5D%3D%5Boptions%5D%7D%7D%7D%7Dreturn%20shared%7D)%3Bmerge(runtimeRequire.federation.initOptions%2C%22remotes%22%2C()%3D%3EObject.values(__module_federation_remote_infos__).flat().filter(remote%3D%3Eremote.externalType%3D%3D%3D%22script%22))%3Bmerge(runtimeRequire.federation.initOptions%2C%22plugins%22%2C()%3D%3E__module_federation_runtime_plugins__)%3Bearly(runtimeRequire.federation%2C%22bundlerRuntimeOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions%2C%22remotes%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22chunkMapping%22%2C()%3D%3EremotesLoadingChunkMapping)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22remoteInfos%22%2C()%3D%3E__module_federation_remote_infos__)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToExternalAndNameMapping%22%2C()%3D%3E%7Bconst%20remotesLoadingIdToExternalAndNameMappingMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7BremotesLoadingIdToExternalAndNameMappingMapping%5BmoduleId%5D%3D%5Bdata.shareScope%2Cdata.name%2Cdata.externalModuleId%2Cdata.remoteName%5D%7Dreturn%20remotesLoadingIdToExternalAndNameMappingMapping%7D)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22webpackRequire%22%2C()%3D%3EruntimeRequire)%3Bmerge(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToRemoteMap%22%2C()%3D%3E%7Bconst%20idToRemoteMap%3D%7B%7D%3Bfor(let%5Bid%2CremoteData%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7Bconst%20info%3D__module_federation_remote_infos__%5BremoteData.remoteName%5D%3Bif(info)idToRemoteMap%5Bid%5D%3Dinfo%7Dreturn%20idToRemoteMap%7D)%3Boverride(runtimeRequire%2C%22S%22%2CruntimeRequire.federation.bundlerRuntime.S)%3Bif(runtimeRequire.federation.attachShareScopeMap)%7BruntimeRequire.federation.attachShareScopeMap(runtimeRequire)%7Doverride(runtimeRequire.f%2C%22remotes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.remotes(%7BchunkId%2Cpromises%2CchunkMapping%3AremotesLoadingChunkMapping%2CidToExternalAndNameMapping%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping%2CidToRemoteMap%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToRemoteMap%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire.f%2C%22consumes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.consumes(%7BchunkId%2Cpromises%2CchunkMapping%3AconsumesLoadingChunkMapping%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%2CinstalledModules%3AconsumesLoadinginstalledModules%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22I%22%2C(name%2CinitScope)%3D%3EruntimeRequire.federation.bundlerRuntime.I(%7BshareScopeName%3Aname%2CinitScope%2CinitPromises%3AinitializeSharingInitPromises%2CinitTokens%3AinitializeSharingInitTokens%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22initContainer%22%2C(shareScope%2CinitScope%2CremoteEntryInitOptions)%3D%3EruntimeRequire.federation.bundlerRuntime.initContainerEntry(%7BshareScope%2CinitScope%2CremoteEntryInitOptions%2CshareScopeKey%3AcontainerShareScope%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22getContainer%22%2C(module%2CgetScope)%3D%3E%7Bvar%20moduleMap%3DruntimeRequire.initializeExposesData.moduleMap%3BruntimeRequire.R%3DgetScope%3BgetScope%3DObject.prototype.hasOwnProperty.call(moduleMap%2Cmodule)%3FmoduleMap%5Bmodule%5D()%3APromise.resolve().then(()%3D%3E%7Bthrow%20new%20Error('Module%20%22'%2Bmodule%2B'%22%20does%20not%20exist%20in%20container.')%7D)%3BruntimeRequire.R%3Dundefined%3Breturn%20getScope%7D)%3BruntimeRequire.federation.instance%3DruntimeRequire.federation.bundlerRuntime.init(%7BwebpackRequire%3AruntimeRequire%7D)%3Bif((_runtimeRequire_consumesLoadingData2%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData2%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData2.initialConsumes)%7BruntimeRequire.federation.bundlerRuntime.installInitialConsumes(%7BwebpackRequire%3AruntimeRequire%2CinstalledModules%3AconsumesLoadinginstalledModules%2CinitialConsumes%3AruntimeRequire.consumesLoadingData.initialConsumes%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%7D)%7D%7D"(module) { "use strict"; module.exports = globalThis.__MF_EXTERNAL__; -}), -"../../../../packages/repack/dist/modules/IncludeModules.js": -/*!******************************************************************!*\\ - !*** ../../../../packages/repack/dist/modules/IncludeModules.js ***! - \\******************************************************************/ -(function () { +}, +"../../../../packages/repack/dist/modules/IncludeModules.js"() { /* * This module is added as an entry module to prevent stripping of these React Native deep imports from the bundle. * We use require.resolve from Rspack/Webpack to ensure these modules are included even if not directly used. @@ -1167,59 +1726,38 @@ module.exports = globalThis.__MF_EXTERNAL__; * These modules are required by assetsLoader and should be shared as deep imports when using ModuleFederation. */ -/*require.resolve*/(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetRegistry'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); -/*require.resolve*/(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetSourceResolver'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); +/*require.resolve*/(Object(function __rspack_missing_module() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetRegistry'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); +/*require.resolve*/(Object(function __rspack_missing_module() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetSourceResolver'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); -}), -"../../../../packages/repack/dist/modules/InitializeScriptManager.js": -/*!***************************************************************************!*\\ - !*** ../../../../packages/repack/dist/modules/InitializeScriptManager.js ***! - \\***************************************************************************/ -(function () { +}, +"../../../../packages/repack/dist/modules/InitializeScriptManager.js"() { throw new Error(" × Module parse failed:\\n ╰─▶ × JavaScript parse error: 'import', and 'export' cannot be used outside of module code\\n ╭─[1:0]\\n 1 │ import { ScriptManager } from './ScriptManager/ScriptManager.js';\\n · ──────\\n 2 │ ScriptManager.init();\\n ╰────\\n \\n help: \\n You may need an appropriate loader to handle this file type.\\n"); -}), -"./__fixtures__/react-native/Libraries/Core/InitializeCore.js": -/*!********************************************************************!*\\ - !*** ./__fixtures__/react-native/Libraries/Core/InitializeCore.js ***! - \\********************************************************************/ -(function () { +}, +"./__fixtures__/react-native/Libraries/Core/InitializeCore.js"() { globalThis.__INITIALIZE_CORE__ = true; -}), -"./__fixtures__/react-native/polyfill1.js": -/*!************************************************!*\\ - !*** ./__fixtures__/react-native/polyfill1.js ***! - \\************************************************/ -(function () { +}, +"./__fixtures__/react-native/polyfill1.js"() { globalThis.__POLYFILL_1__ = true; -}), -"./__fixtures__/react-native/polyfill2.js": -/*!************************************************!*\\ - !*** ./__fixtures__/react-native/polyfill2.js ***! - \\************************************************/ -(function () { +}, +"./__fixtures__/react-native/polyfill2.js"() { globalThis.__POLYFILL_2__ = true; -}), -"./index.js": -/*!******************!*\\ - !*** ./index.js ***! - \\******************/ -(function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { +}, +"./index.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); globalThis.__APP_ENTRY__ = true; -}), +}, }); -/************************************************************************/ // The module cache var __webpack_module_cache__ = {}; @@ -1261,41 +1799,108 @@ var __webpack_exports__ = __webpack_require__("./index.js"); return __webpack_exports__ }; -/************************************************************************/ -// module_federation/runtime +// webpack/runtime/ensure_chunk (() => { - -if(!__webpack_require__.federation){ - __webpack_require__.federation = { - -chunkMatcher: function(chunkId) { - return true; -}, -rootOutputDir: "", - - }; +__webpack_require__.f = {}; +// This file contains only the entry chunk. +// The chunk loading function for additional chunks +__webpack_require__.e = (chunkId) => { + return Promise.all( + Object.keys(__webpack_require__.f).reduce((promises, key) => { + __webpack_require__.f[key](chunkId, promises); + return promises; + }, []) + ); +}; +})(); +// webpack/runtime/get javascript chunk filename +(() => { +// This function allow to reference chunks +__webpack_require__.u = (chunkId) => { + // return url for filenames not based on template + + // return url for filenames based on template + return "" + chunkId + ".javascript" } - })(); -// webpack/runtime/embed_federation_runtime +// webpack/runtime/global (() => { -var prevStartup = __webpack_require__.x; -var hasRun = false; -__webpack_require__.x = function() { - if (!hasRun) { - hasRun = true; - __webpack_require__("@module-federation/runtime/rspack.js!=!data:text/javascript,import __module_federation_bundler_runtime__ from \\"/node_modules/.pnpm/@module-federation+webpack-bundler-runtime@2.0.1/node_modules/@module-federation/webpack-bundler-runtime/dist/index.cjs.cjs\\";const __module_federation_runtime_plugins__ = [];const __module_federation_remote_infos__ = {};const __module_federation_container_name__ = \\"testContainer\\";const __module_federation_share_strategy__ = \\"version-first\\";if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value===\\"object\\"&&value!==null){var _obj1,_key1;var _1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};var __webpack_require___remotesLoadingData_chunkMapping;const remotesLoadingChunkMapping=(__webpack_require___remotesLoadingData_chunkMapping=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&__webpack_require___remotesLoadingData_chunkMapping!==void 0?__webpack_require___remotesLoadingData_chunkMapping:{};var __webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping;const remotesLoadingModuleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping!==void 0?__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping:{};var __webpack_require___initializeSharingData_scopeToSharingDataMapping;const initializeSharingScopeToInitDataMapping=(__webpack_require___initializeSharingData_scopeToSharingDataMapping=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&__webpack_require___initializeSharingData_scopeToSharingDataMapping!==void 0?__webpack_require___initializeSharingData_scopeToSharingDataMapping:{};var __webpack_require___consumesLoadingData_chunkMapping;const consumesLoadingChunkMapping=(__webpack_require___consumesLoadingData_chunkMapping=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&__webpack_require___consumesLoadingData_chunkMapping!==void 0?__webpack_require___consumesLoadingData_chunkMapping:{};var __webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping;const consumesLoadingModuleToConsumeDataMapping=(__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping!==void 0?__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,\\"consumesLoadingModuleToHandlerMapping\\",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){consumesLoadingModuleToHandlerMapping[moduleId]={getter:data.fallback,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,\\"initOptions\\",()=>({}));early(__webpack_require__.federation.initOptions,\\"name\\",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,\\"shareStrategy\\",()=>__module_federation_share_strategy__);early(__webpack_require__.federation.initOptions,\\"shared\\",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage===\\"object\\"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!==\\"undefined\\"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,\\"remotes\\",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType===\\"script\\"));merge(__webpack_require__.federation.initOptions,\\"plugins\\",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,\\"bundlerRuntimeOptions\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,\\"remotes\\",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"chunkMapping\\",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"remoteInfos\\",()=>__module_federation_remote_infos__);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToExternalAndNameMapping\\",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"webpackRequire\\",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,\\"idToRemoteMap\\",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,\\"S\\",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,\\"remotes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,\\"consumes\\",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"I\\",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"initContainer\\",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,\\"getContainer\\",(module1,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module1)?moduleMap[module1]():Promise.resolve().then(()=>{throw new Error('Module \\"'+module1+'\\" does not exist in container.')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}") +__webpack_require__.g = (() => { + if (typeof globalThis === 'object') return globalThis; + try { + return this || new Function('return this')(); + } catch (e) { + if (typeof window === 'object') return window; } - if (typeof prevStartup === 'function') { - return prevStartup(); - } else { - console.warn('[MF] Invalid prevStartup'); - } -}; +})(); })(); // webpack/runtime/has_own_property (() => { __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +})(); +// webpack/runtime/load_script +(() => { +var inProgress = {}; + + +// loadScript function to load a script via script tag +__webpack_require__.l = function (url, done, key, chunkId) { + if (inProgress[url]) { + inProgress[url].push(done); + return; + } + var script, needAttach; + if (key !== undefined) { + var scripts = document.getElementsByTagName("script"); + for (var i = 0; i < scripts.length; i++) { + var s = scripts[i]; + if (s.getAttribute("src") == url) { + script = s; + break; + } + } + } + if (!script) { + needAttach = true; + script = document.createElement('script'); + +script.timeout = 120; +if (__webpack_require__.nc) { + script.setAttribute("nonce", __webpack_require__.nc); +} + + + +script.src = url; + + + + } + inProgress[url] = [done]; + var onScriptComplete = function (prev, event) { + script.onerror = script.onload = null; + clearTimeout(timeout); + var doneFns = inProgress[url]; + delete inProgress[url]; + script.parentNode && script.parentNode.removeChild(script); + doneFns && + doneFns.forEach(function (fn) { + return fn(event); + }); + if (prev) return prev(event); + }; + var timeout = setTimeout( + onScriptComplete.bind(null, undefined, { + type: 'timeout', + target: script + }), + 120000 + ); + script.onerror = onScriptComplete.bind(null, script.onerror); + script.onload = onScriptComplete.bind(null, script.onload); + needAttach && document.head.appendChild(script); +}; + })(); // webpack/runtime/make_namespace_object (() => { @@ -1307,9 +1912,20 @@ __webpack_require__.r = (exports) => { Object.defineProperty(exports, '__esModule', { value: true }); }; })(); -// webpack/runtime/rspack_version +// webpack/runtime/module_federation/runtime (() => { -__webpack_require__.rv = () => ("1.6.0") + +if(!__webpack_require__.federation){ + __webpack_require__.federation = { + +chunkMatcher: function(chunkId) { + return true; +}, +rootOutputDir: "", + + }; +} + })(); // webpack/runtime/sharing (() => { @@ -1319,23 +1935,152 @@ __webpack_require__.initializeSharingData = { scopeToSharingDataMapping: { }, u __webpack_require__.I = __webpack_require__.I || function() { throw new Error("should have __webpack_require__.I") } })(); -// webpack/runtime/repack/polyfills +// repack/polyfills (() => { __webpack_require__("./__fixtures__/react-native/polyfill1.js"); __webpack_require__("./__fixtures__/react-native/polyfill2.js"); +})(); +// webpack/runtime/auto_public_path +(() => { +var scriptUrl; + +if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +var document = __webpack_require__.g.document; +if (!scriptUrl && document) { + // Technically we could use \`document.currentScript instanceof window.HTMLScriptElement\`, + // but an attacker could try to inject \`\` + // and use \`\` + if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') scriptUrl = document.currentScript.src; + if (!scriptUrl) { + var scripts = document.getElementsByTagName("script"); + if (scripts.length) { + var i = scripts.length - 1; + while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; + } + } +} + +// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration", +// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.', +if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\\?.*$/, "").replace(/\\/[^\\/]+$/, "/"); + +__webpack_require__.p = scriptUrl; + })(); // webpack/runtime/consumes_loading (() => { __webpack_require__.consumesLoadingData = { chunkMapping: {}, moduleIdToConsumeDataMapping: {}, initialConsumes: [] }; +__webpack_require__.f.consumes = __webpack_require__.f.consumes || function() { throw new Error("should have __webpack_require__.f.consumes") } +})(); +// webpack/runtime/jsonp_chunk_loading +(() => { + + // object to store loaded and loading chunks + // undefined = chunk not loaded, null = chunk preloaded/prefetched + // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded + var installedChunks = {"main": 0,}; + + __webpack_require__.f.j = function (chunkId, promises) { + // JSONP chunk loading for javascript +var installedChunkData = __webpack_require__.o(installedChunks, chunkId) + ? installedChunks[chunkId] + : undefined; +if (installedChunkData !== 0) { + // 0 means "already installed". + + // a Promise means "currently loading". + if (installedChunkData) { + promises.push(installedChunkData[2]); + } else { + if (true) { + // setup Promise in chunk cache + var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); + promises.push((installedChunkData[2] = promise)); + + // start chunk loading + var url = __webpack_require__.p + __webpack_require__.u(chunkId); + // create error before stack unwound to get useful stacktrace later + var error = new Error(); + var loadingEnded = function (event) { + if (__webpack_require__.o(installedChunks, chunkId)) { + installedChunkData = installedChunks[chunkId]; + if (installedChunkData !== 0) installedChunks[chunkId] = undefined; + if (installedChunkData) { + var errorType = + event && (event.type === 'load' ? 'missing' : event.type); + var realSrc = event && event.target && event.target.src; + error.message = + 'Loading chunk ' + + chunkId + + ' failed.\\n(' + + errorType + + ': ' + + realSrc + + ')'; + error.name = 'ChunkLoadError'; + error.type = errorType; + error.request = realSrc; + installedChunkData[1](error); + } + } + }; + __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); + } + } +} + + } + // install a JSONP callback for chunk loading +var __rspack_jsonp = (parentChunkLoadingFunction, data) => { + var [chunkIds, moreModules, runtime] = data; + // add "moreModules" to the modules object, + // then flag all "chunkIds" as loaded and fire callback + var moduleId, chunkId, i = 0; + if (chunkIds.some((id) => (installedChunks[id] !== 0))) { + for (moduleId in moreModules) { + if (__webpack_require__.o(moreModules, moduleId)) { + __webpack_require__.m[moduleId] = moreModules[moduleId]; + } + } + if (runtime) var result = runtime(__webpack_require__); + } + if (parentChunkLoadingFunction) parentChunkLoadingFunction(data); + for (; i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if ( + __webpack_require__.o(installedChunks, chunkId) && + installedChunks[chunkId] + ) { + installedChunks[chunkId][0](); + } + installedChunks[chunkId] = 0; + } + +}; + +var chunkLoadingGlobal = self["rspackChunk"] = self["rspackChunk"] || []; +chunkLoadingGlobal.forEach(__rspack_jsonp.bind(null, 0)); +chunkLoadingGlobal.push = __rspack_jsonp.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); })(); -// webpack/runtime/rspack_unique_id +// webpack/runtime/embed_federation_runtime (() => { -__webpack_require__.ruid = "bundler=rspack@1.6.0"; +var prevStartup = __webpack_require__.x; +var hasRun = false; +__webpack_require__.x = function () { + if (!hasRun) { + hasRun = true; + __webpack_require__("@module-federation/runtime/rspack.js!=!data:text/javascript,import%20__module_federation_bundler_runtime__%20from%20%22%3CrootDir%3E%2Fnode_modules%2F.pnpm%2F%40module-federation%2Bwebpack-bundler-runtime%402.0.1%2Fnode_modules%2F%40module-federation%2Fwebpack-bundler-runtime%2Fdist%2Findex.cjs.cjs%22%3B%3Bconst%20__module_federation_runtime_plugins__%20%3D%20%5B%5D.filter((%7B%20plugin%20%7D)%20%3D%3E%20plugin).map((%7B%20plugin%2C%20params%20%7D)%20%3D%3E%20plugin(params))%3Bconst%20__module_federation_remote_infos__%20%3D%20%7B%7D%3Bconst%20__module_federation_container_name__%20%3D%20%22testContainer%22%3Bconst%20__module_federation_share_strategy__%20%3D%20%22version-first%22%3Bconst%20__module_federation_share_fallbacks__%20%3D%20undefined%3Bconst%20__module_federation_library_type__%20%3D%20%22var%22%3Bconst%20runtimeRequire%3D__webpack_require__%3Bif((runtimeRequire.initializeSharingData%7C%7CruntimeRequire.initializeExposesData)%26%26runtimeRequire.federation)%7Bvar%20_ref%2C_ref1%2C_ref2%2C_ref3%2C_ref4%3Bvar%20_runtimeRequire_remotesLoadingData%2C_runtimeRequire_remotesLoadingData1%2C_runtimeRequire_initializeSharingData%2C_runtimeRequire_consumesLoadingData%2C_runtimeRequire_consumesLoadingData1%2C_runtimeRequire_initializeExposesData%2C_runtimeRequire_consumesLoadingData2%3Bconst%20override%3D(obj%2Ckey%2Cvalue)%3D%3E%7Bif(!obj)return%3Bif(obj%5Bkey%5D)obj%5Bkey%5D%3Dvalue%7D%3Bconst%20merge%3D(obj%2Ckey%2Cfn)%3D%3E%7Bconst%20value%3Dfn()%3Bif(Array.isArray(value))%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3D%5B%5D%3Bobj%5Bkey%5D.push(...value)%7Delse%20if(typeof%20value%3D%3D%3D%22object%22%26%26value!%3D%3Dnull)%7Bvar%20_obj1%2C_key1%2C_1%3B(_1%3D(_obj1%3Dobj)%5B_key1%3Dkey%5D)!%3D%3Dnull%26%26_1!%3D%3Dvoid%200%3F_1%3A_obj1%5B_key1%5D%3D%7B%7D%3BObject.assign(obj%5Bkey%5D%2Cvalue)%7D%7D%3Bconst%20early%3D(obj%2Ckey%2Cinitial)%3D%3E%7Bvar%20_obj%2C_key%2C_%3B(_%3D(_obj%3Dobj)%5B_key%3Dkey%5D)!%3D%3Dnull%26%26_!%3D%3Dvoid%200%3F_%3A_obj%5B_key%5D%3Dinitial()%7D%3Bconst%20remotesLoadingChunkMapping%3D(_ref%3D(_runtimeRequire_remotesLoadingData%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref!%3D%3Dvoid%200%3F_ref%3A%7B%7D%3Bconst%20remotesLoadingModuleIdToRemoteDataMapping%3D(_ref1%3D(_runtimeRequire_remotesLoadingData1%3DruntimeRequire.remotesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_remotesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_remotesLoadingData1.moduleIdToRemoteDataMapping)!%3D%3Dnull%26%26_ref1!%3D%3Dvoid%200%3F_ref1%3A%7B%7D%3Bconst%20initializeSharingScopeToInitDataMapping%3D(_ref2%3D(_runtimeRequire_initializeSharingData%3DruntimeRequire.initializeSharingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeSharingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeSharingData.scopeToSharingDataMapping)!%3D%3Dnull%26%26_ref2!%3D%3Dvoid%200%3F_ref2%3A%7B%7D%3Bconst%20consumesLoadingChunkMapping%3D(_ref3%3D(_runtimeRequire_consumesLoadingData%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData.chunkMapping)!%3D%3Dnull%26%26_ref3!%3D%3Dvoid%200%3F_ref3%3A%7B%7D%3Bconst%20consumesLoadingModuleToConsumeDataMapping%3D(_ref4%3D(_runtimeRequire_consumesLoadingData1%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData1%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData1.moduleIdToConsumeDataMapping)!%3D%3Dnull%26%26_ref4!%3D%3Dvoid%200%3F_ref4%3A%7B%7D%3Bconst%20consumesLoadinginstalledModules%3D%7B%7D%3Bconst%20initializeSharingInitPromises%3D%5B%5D%3Bconst%20initializeSharingInitTokens%3D%7B%7D%3Bconst%20containerShareScope%3D(_runtimeRequire_initializeExposesData%3DruntimeRequire.initializeExposesData)%3D%3D%3Dnull%7C%7C_runtimeRequire_initializeExposesData%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_initializeExposesData.shareScope%3Bfor(const%20key%20in%20__module_federation_bundler_runtime__)%7BruntimeRequire.federation%5Bkey%5D%3D__module_federation_bundler_runtime__%5Bkey%5D%7Dearly(runtimeRequire.federation%2C%22libraryType%22%2C()%3D%3E__module_federation_library_type__)%3Bearly(runtimeRequire.federation%2C%22sharedFallback%22%2C()%3D%3E__module_federation_share_fallbacks__)%3Bconst%20sharedFallback%3DruntimeRequire.federation.sharedFallback%3Bearly(runtimeRequire.federation%2C%22consumesLoadingModuleToHandlerMapping%22%2C()%3D%3E%7Bconst%20consumesLoadingModuleToHandlerMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(consumesLoadingModuleToConsumeDataMapping))%7Bvar%20_runtimeRequire_federation_bundlerRuntime%3BconsumesLoadingModuleToHandlerMapping%5BmoduleId%5D%3D%7Bgetter%3AsharedFallback%3F(_runtimeRequire_federation_bundlerRuntime%3DruntimeRequire.federation.bundlerRuntime)%3D%3D%3Dnull%7C%7C_runtimeRequire_federation_bundlerRuntime%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_federation_bundlerRuntime.getSharedFallbackGetter(%7BshareKey%3Adata.shareKey%2Cfactory%3Adata.fallback%2CwebpackRequire%3AruntimeRequire%2ClibraryType%3AruntimeRequire.federation.libraryType%7D)%3Adata.fallback%2CtreeShakingGetter%3AsharedFallback%3Fdata.fallback%3Aundefined%2CshareInfo%3A%7BshareConfig%3A%7BfixedDependencies%3Afalse%2CrequiredVersion%3Adata.requiredVersion%2CstrictVersion%3Adata.strictVersion%2Csingleton%3Adata.singleton%2Ceager%3Adata.eager%7D%2Cscope%3A%5Bdata.shareScope%5D%7D%2CshareKey%3Adata.shareKey%2CtreeShaking%3AruntimeRequire.federation.sharedFallback%3F%7Bget%3Adata.fallback%2Cmode%3Adata.treeShakingMode%7D%3Aundefined%7D%7Dreturn%20consumesLoadingModuleToHandlerMapping%7D)%3Bearly(runtimeRequire.federation%2C%22initOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.initOptions%2C%22name%22%2C()%3D%3E__module_federation_container_name__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shareStrategy%22%2C()%3D%3E__module_federation_share_strategy__)%3Bearly(runtimeRequire.federation.initOptions%2C%22shared%22%2C()%3D%3E%7Bconst%20shared%3D%7B%7D%3Bfor(let%5Bscope%2Cstages%5Dof%20Object.entries(initializeSharingScopeToInitDataMapping))%7Bfor(let%20stage%20of%20stages)%7Bif(typeof%20stage%3D%3D%3D%22object%22%26%26stage!%3D%3Dnull)%7Bconst%7Bname%2Cversion%2Cfactory%2Ceager%2Csingleton%2CrequiredVersion%2CstrictVersion%2CtreeShakingMode%7D%3Dstage%3Bconst%20shareConfig%3D%7B%7D%3Bconst%20isValidValue%3Dfunction(val)%7Breturn%20typeof%20val!%3D%3D%22undefined%22%7D%3Bif(isValidValue(singleton))%7BshareConfig.singleton%3Dsingleton%7Dif(isValidValue(requiredVersion))%7BshareConfig.requiredVersion%3DrequiredVersion%7Dif(isValidValue(eager))%7BshareConfig.eager%3Deager%7Dif(isValidValue(strictVersion))%7BshareConfig.strictVersion%3DstrictVersion%7Dconst%20options%3D%7Bversion%2Cscope%3A%5Bscope%5D%2CshareConfig%2Cget%3Afactory%2CtreeShaking%3AtreeShakingMode%3F%7Bmode%3AtreeShakingMode%7D%3Aundefined%7D%3Bif(shared%5Bname%5D)%7Bshared%5Bname%5D.push(options)%7Delse%7Bshared%5Bname%5D%3D%5Boptions%5D%7D%7D%7D%7Dreturn%20shared%7D)%3Bmerge(runtimeRequire.federation.initOptions%2C%22remotes%22%2C()%3D%3EObject.values(__module_federation_remote_infos__).flat().filter(remote%3D%3Eremote.externalType%3D%3D%3D%22script%22))%3Bmerge(runtimeRequire.federation.initOptions%2C%22plugins%22%2C()%3D%3E__module_federation_runtime_plugins__)%3Bearly(runtimeRequire.federation%2C%22bundlerRuntimeOptions%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions%2C%22remotes%22%2C()%3D%3E(%7B%7D))%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22chunkMapping%22%2C()%3D%3EremotesLoadingChunkMapping)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22remoteInfos%22%2C()%3D%3E__module_federation_remote_infos__)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToExternalAndNameMapping%22%2C()%3D%3E%7Bconst%20remotesLoadingIdToExternalAndNameMappingMapping%3D%7B%7D%3Bfor(let%5BmoduleId%2Cdata%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7BremotesLoadingIdToExternalAndNameMappingMapping%5BmoduleId%5D%3D%5Bdata.shareScope%2Cdata.name%2Cdata.externalModuleId%2Cdata.remoteName%5D%7Dreturn%20remotesLoadingIdToExternalAndNameMappingMapping%7D)%3Bearly(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22webpackRequire%22%2C()%3D%3EruntimeRequire)%3Bmerge(runtimeRequire.federation.bundlerRuntimeOptions.remotes%2C%22idToRemoteMap%22%2C()%3D%3E%7Bconst%20idToRemoteMap%3D%7B%7D%3Bfor(let%5Bid%2CremoteData%5Dof%20Object.entries(remotesLoadingModuleIdToRemoteDataMapping))%7Bconst%20info%3D__module_federation_remote_infos__%5BremoteData.remoteName%5D%3Bif(info)idToRemoteMap%5Bid%5D%3Dinfo%7Dreturn%20idToRemoteMap%7D)%3Boverride(runtimeRequire%2C%22S%22%2CruntimeRequire.federation.bundlerRuntime.S)%3Bif(runtimeRequire.federation.attachShareScopeMap)%7BruntimeRequire.federation.attachShareScopeMap(runtimeRequire)%7Doverride(runtimeRequire.f%2C%22remotes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.remotes(%7BchunkId%2Cpromises%2CchunkMapping%3AremotesLoadingChunkMapping%2CidToExternalAndNameMapping%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping%2CidToRemoteMap%3AruntimeRequire.federation.bundlerRuntimeOptions.remotes.idToRemoteMap%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire.f%2C%22consumes%22%2C(chunkId%2Cpromises)%3D%3EruntimeRequire.federation.bundlerRuntime.consumes(%7BchunkId%2Cpromises%2CchunkMapping%3AconsumesLoadingChunkMapping%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%2CinstalledModules%3AconsumesLoadinginstalledModules%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22I%22%2C(name%2CinitScope)%3D%3EruntimeRequire.federation.bundlerRuntime.I(%7BshareScopeName%3Aname%2CinitScope%2CinitPromises%3AinitializeSharingInitPromises%2CinitTokens%3AinitializeSharingInitTokens%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22initContainer%22%2C(shareScope%2CinitScope%2CremoteEntryInitOptions)%3D%3EruntimeRequire.federation.bundlerRuntime.initContainerEntry(%7BshareScope%2CinitScope%2CremoteEntryInitOptions%2CshareScopeKey%3AcontainerShareScope%2CwebpackRequire%3AruntimeRequire%7D))%3Boverride(runtimeRequire%2C%22getContainer%22%2C(module%2CgetScope)%3D%3E%7Bvar%20moduleMap%3DruntimeRequire.initializeExposesData.moduleMap%3BruntimeRequire.R%3DgetScope%3BgetScope%3DObject.prototype.hasOwnProperty.call(moduleMap%2Cmodule)%3FmoduleMap%5Bmodule%5D()%3APromise.resolve().then(()%3D%3E%7Bthrow%20new%20Error('Module%20%22'%2Bmodule%2B'%22%20does%20not%20exist%20in%20container.')%7D)%3BruntimeRequire.R%3Dundefined%3Breturn%20getScope%7D)%3BruntimeRequire.federation.instance%3DruntimeRequire.federation.bundlerRuntime.init(%7BwebpackRequire%3AruntimeRequire%7D)%3Bif((_runtimeRequire_consumesLoadingData2%3DruntimeRequire.consumesLoadingData)%3D%3D%3Dnull%7C%7C_runtimeRequire_consumesLoadingData2%3D%3D%3Dvoid%200%3Fvoid%200%3A_runtimeRequire_consumesLoadingData2.initialConsumes)%7BruntimeRequire.federation.bundlerRuntime.installInitialConsumes(%7BwebpackRequire%3AruntimeRequire%2CinstalledModules%3AconsumesLoadinginstalledModules%2CinitialConsumes%3AruntimeRequire.consumesLoadingData.initialConsumes%2CmoduleToHandlerMapping%3AruntimeRequire.federation.consumesLoadingModuleToHandlerMapping%7D)%7D%7D") + } + if (typeof prevStartup === "function") { + return prevStartup(); + } + console.warn("[MF] Invalid prevStartup"); +}; })(); -/************************************************************************/ // module factories are used so entry inlining is disabled // run startup var __webpack_exports__ = __webpack_require__.x(); @@ -1344,64 +2089,48 @@ var __webpack_exports__ = __webpack_require__.x(); `; exports[`NativeEntryPlugin > without Module Federation > in production mode > should expose inlined polyfills if runtime requirements are removed 1`] = ` -"runtime/repack/polyfills +"repack/polyfills (() => { -__webpack_require__(101); -__webpack_require__(148); +__webpack_require__(721); +__webpack_require__(320); })(); -// webpack/runtime/rspack_unique_id -(() => { -__webpack_require__.ruid = "bundler=rspack@1.6.0"; - -})(); -/************************************************************************/ // startup // Load entry module and return exports -__webpack_modules__[101](); -__webpack_modules__[148](); -__webpack_modules__[570](); +__webpack_modules__[721](); +__webpack_modules__[320](); +__webpack_modules__[110](); // This entry module doesn't tell about it's top-level declarations so it can't be inlined -__webpack_modules__[17](); -__webpack_modules__[296](); +__webpack_modules__[741](); +__webpack_modules__[980](); var __webpack_exports__ = {} -__webpack_modules__[340](); +__webpack_modules__[620](); })() ;" `; exports[`NativeEntryPlugin > without Module Federation > in production mode > should keep runtime polyfill requires aligned with production module ids 1`] = ` -"runtime/repack/polyfills +"repack/polyfills (() => { -__webpack_require__(101); -__webpack_require__(148); -})(); -// webpack/runtime/rspack_unique_id -(() => { -__webpack_require__.ruid = "bundler=rspack@1.6.0"; - +__webpack_require__(721); +__webpack_require__(320); })(); -/************************************************************************/ // module factories are used so entry inlining is disabled // startup // Load entry module and return exports -__webpack_require__(101); -__webpack_require__(148); -__webpack_require__(570); -__webpack_require__(17); -__webpack_require__(296); -var __webpack_exports__ = __webpack_require__(340); +__webpack_require__(721); +__webpack_require__(320); +__webpack_require__(110); +__webpack_require__(741); +__webpack_require__(980); +var __webpack_exports__ = __webpack_require__(620); })() ;" `; exports[`NativeEntryPlugin > without Module Federation > should execute polyfills runtime module before entry startup 1`] = ` -"(() => { // webpackBootstrap +"(() => { var __webpack_modules__ = ({ -"../../../../packages/repack/dist/modules/IncludeModules.js": -/*!******************************************************************!*\\ - !*** ../../../../packages/repack/dist/modules/IncludeModules.js ***! - \\******************************************************************/ -(function () { +"../../../../packages/repack/dist/modules/IncludeModules.js"() { /* * This module is added as an entry module to prevent stripping of these React Native deep imports from the bundle. * We use require.resolve from Rspack/Webpack to ensure these modules are included even if not directly used. @@ -1409,59 +2138,38 @@ var __webpack_modules__ = ({ * These modules are required by assetsLoader and should be shared as deep imports when using ModuleFederation. */ -/*require.resolve*/(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetRegistry'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); -/*require.resolve*/(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetSourceResolver'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); +/*require.resolve*/(Object(function __rspack_missing_module() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetRegistry'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); +/*require.resolve*/(Object(function __rspack_missing_module() { var e = new Error("Cannot find module 'react-native/Libraries/Image/AssetSourceResolver'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); -}), -"../../../../packages/repack/dist/modules/InitializeScriptManager.js": -/*!***************************************************************************!*\\ - !*** ../../../../packages/repack/dist/modules/InitializeScriptManager.js ***! - \\***************************************************************************/ -(function () { +}, +"../../../../packages/repack/dist/modules/InitializeScriptManager.js"() { throw new Error(" × Module parse failed:\\n ╰─▶ × JavaScript parse error: 'import', and 'export' cannot be used outside of module code\\n ╭─[1:0]\\n 1 │ import { ScriptManager } from './ScriptManager/ScriptManager.js';\\n · ──────\\n 2 │ ScriptManager.init();\\n ╰────\\n \\n help: \\n You may need an appropriate loader to handle this file type.\\n"); -}), -"./__fixtures__/react-native/Libraries/Core/InitializeCore.js": -/*!********************************************************************!*\\ - !*** ./__fixtures__/react-native/Libraries/Core/InitializeCore.js ***! - \\********************************************************************/ -(function () { +}, +"./__fixtures__/react-native/Libraries/Core/InitializeCore.js"() { globalThis.__INITIALIZE_CORE__ = true; -}), -"./__fixtures__/react-native/polyfill1.js": -/*!************************************************!*\\ - !*** ./__fixtures__/react-native/polyfill1.js ***! - \\************************************************/ -(function () { +}, +"./__fixtures__/react-native/polyfill1.js"() { globalThis.__POLYFILL_1__ = true; -}), -"./__fixtures__/react-native/polyfill2.js": -/*!************************************************!*\\ - !*** ./__fixtures__/react-native/polyfill2.js ***! - \\************************************************/ -(function () { +}, +"./__fixtures__/react-native/polyfill2.js"() { globalThis.__POLYFILL_2__ = true; -}), -"./index.js": -/*!******************!*\\ - !*** ./index.js ***! - \\******************/ -(function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { +}, +"./index.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); globalThis.__APP_ENTRY__ = true; -}), +}, }); -/************************************************************************/ // The module cache var __webpack_module_cache__ = {}; @@ -1488,7 +2196,6 @@ return module.exports; // expose the modules object (__webpack_modules__) __webpack_require__.m = __webpack_modules__; -/************************************************************************/ // webpack/runtime/make_namespace_object (() => { // define __esModule on exports @@ -1499,21 +2206,11 @@ __webpack_require__.r = (exports) => { Object.defineProperty(exports, '__esModule', { value: true }); }; })(); -// webpack/runtime/rspack_version -(() => { -__webpack_require__.rv = () => ("1.6.0") -})(); -// webpack/runtime/repack/polyfills +// repack/polyfills (() => { __webpack_require__("./__fixtures__/react-native/polyfill1.js"); __webpack_require__("./__fixtures__/react-native/polyfill2.js"); })(); -// webpack/runtime/rspack_unique_id -(() => { -__webpack_require__.ruid = "bundler=rspack@1.6.0"; - -})(); -/************************************************************************/ // module factories are used so entry inlining is disabled // startup // Load entry module and return exports diff --git a/tests/integration/src/plugins/__snapshots__/webpack/NativeEntryPlugin.test.ts.snap b/tests/integration/src/plugins/__snapshots__/webpack/NativeEntryPlugin.test.ts.snap index 1271284b3..30a66c610 100644 --- a/tests/integration/src/plugins/__snapshots__/webpack/NativeEntryPlugin.test.ts.snap +++ b/tests/integration/src/plugins/__snapshots__/webpack/NativeEntryPlugin.test.ts.snap @@ -1183,7 +1183,7 @@ globalThis.__APP_ENTRY__ = true; `; exports[`NativeEntryPlugin > without Module Federation > in production mode > should expose inlined polyfills if runtime requirements are removed 1`] = ` -"runtime/repack/polyfills */ +"repack/polyfills */ /******/ (() => { /******/ __webpack_require__(721); /******/ __webpack_require__(320); @@ -1207,7 +1207,7 @@ exports[`NativeEntryPlugin > without Module Federation > in production mode > sh `; exports[`NativeEntryPlugin > without Module Federation > in production mode > should keep runtime polyfill requires aligned with production module ids 1`] = ` -"runtime/repack/polyfills */ +"repack/polyfills */ /******/ (() => { /******/ __webpack_require__(721); /******/ __webpack_require__(320);