From fc058e9a084e46d56de9975159d0e9cd436dd9a0 Mon Sep 17 00:00:00 2001 From: Arjo Bruijnes Date: Tue, 3 Nov 2026 17:09:33 +0100 Subject: [PATCH] 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" })