From 5bfbe9a887d229de4531258f14bd593c6d857dd3 Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Mon, 3 Aug 2026 03:59:08 +0200 Subject: [PATCH] Bridge legacy WebUI router imports --- docs/COMPATIBILITY_INVENTORY.md | 1 + webui/vite.config.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/COMPATIBILITY_INVENTORY.md b/docs/COMPATIBILITY_INVENTORY.md index fd695de..f4a4bc8 100644 --- a/docs/COMPATIBILITY_INVENTORY.md +++ b/docs/COMPATIBILITY_INVENTORY.md @@ -31,6 +31,7 @@ such as Redis degradation and language fallback are not compatibility paths. | Legacy tenant aliases in API response schemas | Preserves active-tenant response fields used by `0.1.x` clients. | Tagged `0.1.x` API window. | Remove at `0.2` with response-schema migration notes. | | Optional fields in Poll response references | Accepts providers built against the earlier Poll contract. | Tagged `0.1.x` runtime contract window. | Remove or require a new interface version at `0.2`. | | Legacy single-tenant summary providers | Allows modules without the batch provider introduced in `0.1.x`. | Tagged `0.1.x` module contract window. | Remove at `0.2` after manifests advertise the batch provider contract. | +| WebUI `react-router-dom` build alias | Resolves tagged `0.1.x` module source imports to Core's single `react-router` runtime so one composition never loads two router contexts. | Tagged `0.1.x` WebUI source window. | Remove at `0.2` after every supported module tag imports `react-router` directly. | ## Removed Paths diff --git a/webui/vite.config.ts b/webui/vite.config.ts index 6289f60..d4ae4ef 100644 --- a/webui/vite.config.ts +++ b/webui/vite.config.ts @@ -230,6 +230,9 @@ export default defineConfig({ "read-excel-file" ], alias: [ + // Tagged 0.1.x module sources used react-router-dom before the platform + // standardized on the package-neutral React Router 8 entry point. + { find: "react-router-dom", replacement: "react-router" }, { find: "@govoplan/core-webui/app", replacement: fileURLToPath(new URL("./src/app.ts", import.meta.url)) }, { find: "@govoplan/core-webui/definition-graph", replacement: fileURLToPath(new URL("./src/definitionGraph.ts", import.meta.url)) }, { find: "@govoplan/core-webui/wysiwyg", replacement: fileURLToPath(new URL("./src/wysiwyg.ts", import.meta.url)) },