From 9773dc87861839524d816ff361a0be868c8aeb8b Mon Sep 17 00:00:00 2001 From: Arjo Bruijnes Date: Tue, 3 Nov 2026 17:09:33 +0100 Subject: [PATCH 1/2] Also copy MPK to test project for production builds --- packages/pluggable-widgets-tools/CHANGELOG.md | 4 ++++ .../pluggable-widgets-tools/configs/helpers/rollup-helper.mjs | 4 ++-- packages/pluggable-widgets-tools/configs/rollup.config.mjs | 1 - .../pluggable-widgets-tools/configs/rollup.config.native.mjs | 1 - 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/pluggable-widgets-tools/CHANGELOG.md b/packages/pluggable-widgets-tools/CHANGELOG.md index d98cc03b..91363884 100644 --- a/packages/pluggable-widgets-tools/CHANGELOG.md +++ b/packages/pluggable-widgets-tools/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Changed + +- We now copy the final MPK file to the test project for release builds. + ## [11.16.0] - 2026-10-30 ### Changed diff --git a/packages/pluggable-widgets-tools/configs/helpers/rollup-helper.mjs b/packages/pluggable-widgets-tools/configs/helpers/rollup-helper.mjs index e35941c1..b6950c51 100644 --- a/packages/pluggable-widgets-tools/configs/helpers/rollup-helper.mjs +++ b/packages/pluggable-widgets-tools/configs/helpers/rollup-helper.mjs @@ -15,10 +15,10 @@ export async function copyLicenseFile(sourcePath, outDir) { } } -export async function createMpkFile({ mpkDir, mpkFile, widgetTmpDir, isProduction, mxProjectPath, deploymentPath }) { +export async function createMpkFile({ mpkDir, mpkFile, widgetTmpDir, mxProjectPath, deploymentPath }) { mkdirSync(mpkDir, { recursive: true }); await zip(widgetTmpDir, mpkFile); - if (!isProduction && mxProjectPath) { + if (mxProjectPath) { const widgetsPath = join(mxProjectPath, "widgets"); const absolutePath = join(mxProjectPath, deploymentPath); // Create folder if they do not exists or directories were cleaned diff --git a/packages/pluggable-widgets-tools/configs/rollup.config.mjs b/packages/pluggable-widgets-tools/configs/rollup.config.mjs index d150310c..1d8cee02 100644 --- a/packages/pluggable-widgets-tools/configs/rollup.config.mjs +++ b/packages/pluggable-widgets-tools/configs/rollup.config.mjs @@ -301,7 +301,6 @@ export default async args => { mpkDir, mpkFile, widgetTmpDir: outDir, - isProduction: production, mxProjectPath: projectPath, deploymentPath: "deployment/web/widgets" }) diff --git a/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs b/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs index 5d0bb1ac..eb5fa15a 100644 --- a/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs +++ b/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs @@ -238,7 +238,6 @@ export default async args => { mpkDir, mpkFile, widgetTmpDir: outDir, - isProduction: production, mxProjectPath: projectPath, deploymentPath: "deployment/native/widgets" }) From d8048fd7410ab307c413c9d6940a0319b1500260 Mon Sep 17 00:00:00 2001 From: Arjo Bruijnes Date: Mon, 9 Nov 2026 11:30:12 +0100 Subject: [PATCH 2/2] Remove other unnecessary production exceptions --- packages/pluggable-widgets-tools/configs/rollup.config.mjs | 4 ++-- .../pluggable-widgets-tools/configs/rollup.config.native.mjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/pluggable-widgets-tools/configs/rollup.config.mjs b/packages/pluggable-widgets-tools/configs/rollup.config.mjs index 1d8cee02..81f74865 100644 --- a/packages/pluggable-widgets-tools/configs/rollup.config.mjs +++ b/packages/pluggable-widgets-tools/configs/rollup.config.mjs @@ -85,7 +85,7 @@ const cssUrlTransform = asset => export default async args => { const production = Boolean(args.configProduction); - if (!production && projectPath) { + if (projectPath) { console.info(colors.blue(`Project Path: ${projectPath}`)); } @@ -320,7 +320,7 @@ export default async args => { } } ]), - args.watch && !production && projectPath ? livereload() : null + args.watch && projectPath ? livereload() : null ]; } }; diff --git a/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs b/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs index eb5fa15a..0a947443 100644 --- a/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs +++ b/packages/pluggable-widgets-tools/configs/rollup.config.native.mjs @@ -66,7 +66,7 @@ const nativeExternal = [ export default async args => { const production = Boolean(args.configProduction); - if (!production && projectPath) { + if (projectPath) { console.info(blue(`Project Path: ${projectPath}`)); }