From 2342ddf71d09dae7613c1e1e62c6c0d9d6269749 Mon Sep 17 00:00:00 2001 From: Roman Vyakhirev Date: Fri, 31 Jul 2026 10:48:04 +0200 Subject: [PATCH 1/2] fix: use correct public path for assets in React (ESM) builds Images imported in widgets were not displayed when deployed in the cloud because the ESM bundle used the wrong base path for assets. The ESM output now resolves assets under dist/ (React client path) while AMD output continues to use widgets/ (Dojo path). --- packages/pluggable-widgets-tools/CHANGELOG.md | 2 ++ packages/pluggable-widgets-tools/configs/rollup.config.mjs | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/pluggable-widgets-tools/CHANGELOG.md b/packages/pluggable-widgets-tools/CHANGELOG.md index 9d25aa9b..4824d2bc 100644 --- a/packages/pluggable-widgets-tools/CHANGELOG.md +++ b/packages/pluggable-widgets-tools/CHANGELOG.md @@ -26,6 +26,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed +- We fixed an issue where images imported in widgets were not displayed correctly in the React client when deployed in the cloud. + - We fixed an issue on Windows where the generated `.mpk` was missing the widget's `.xml` files and icon/tile PNGs. - We fixed an error thrown by the `audit` command on windows. It would fail when looking up available versions for vulnerable packages. diff --git a/packages/pluggable-widgets-tools/configs/rollup.config.mjs b/packages/pluggable-widgets-tools/configs/rollup.config.mjs index 346d6ee9..d267472c 100644 --- a/packages/pluggable-widgets-tools/configs/rollup.config.mjs +++ b/packages/pluggable-widgets-tools/configs/rollup.config.mjs @@ -105,7 +105,11 @@ export default async args => { url({ include: imagesAndFonts, limit: 0, - publicPath: `${join("widgets", outAssetsDir)}/`, // Prefix for the actual import, relative to Mendix web server root + // Prefix for the actual import, relative to Mendix web server root + // dojo uses: "widgets//assets/123abc.png" + // react uses: "dist//assets/123abc.png" + publicPath: + outputFormat === "es" ? `${join("dist", outAssetsDir)}/` : `${join("widgets", outAssetsDir)}/`, destDir: absoluteOutAssetsDir }), postCssPlugin(outputFormat, production), From bc33195aeabf813822fb2d9183390bd5e0c0b9b9 Mon Sep 17 00:00:00 2001 From: Arjo Bruijnes Date: Thu, 6 Aug 2026 14:55:01 +0200 Subject: [PATCH 2/2] Bump version pluggable-widgets-tools --- packages/pluggable-widgets-tools/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pluggable-widgets-tools/package.json b/packages/pluggable-widgets-tools/package.json index 3c3cd923..02272360 100644 --- a/packages/pluggable-widgets-tools/package.json +++ b/packages/pluggable-widgets-tools/package.json @@ -1,6 +1,6 @@ { "name": "@mendix/pluggable-widgets-tools", - "version": "11.12.0", + "version": "11.12.1", "description": "Mendix Pluggable Widgets Tools", "engines": { "node": "^22.18.0"