Skip to content

Commit a684fb5

Browse files
authored
Fix import of commonJS module with no default (#120)
PR #117 addressed an import of a common js module that assumed it had a named export, which caused an error in some environments. It appears that this fix broke other widgets with custom configuration as the imported module does not have a default exported member. This PR addresses both issues. It has been verified with the widgets that broke before and after 10.18.1.
2 parents 9458227 + 7ebb927 commit a684fb5

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

packages/pluggable-widgets-tools/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- We fixed an issue with loading custom rollup configs.
12+
913
## [10.18.1] - 2025-03-11
1014

1115
### Fixed

packages/pluggable-widgets-tools/configs/rollup.config.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import typescript from "@rollup/plugin-typescript";
1313
import colors from "ansi-colors";
1414
import postcssImport from "postcss-import";
1515
import postcssUrl from "postcss-url";
16-
import loadConfigFile from "rollup/dist/loadConfigFile.js";
16+
import rollupLoadConfigFile from "rollup/dist/loadConfigFile.js";
1717
import clear from "rollup-plugin-clear";
1818
import command from "rollup-plugin-command";
1919
import license from "rollup-plugin-license";
@@ -37,6 +37,7 @@ import {
3737
import { copyLicenseFile, createMpkFile, licenseCustomTemplate } from "./helpers/rollup-helper.mjs";
3838
import url from "./rollup-plugin-assets.mjs";
3939

40+
const { loadConfigFile } = rollupLoadConfigFile;
4041
const { cp } = shelljs;
4142

4243
const outDir = join(sourcePath, "/dist/tmp/widgets/");

packages/pluggable-widgets-tools/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/pluggable-widgets-tools/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mendix/pluggable-widgets-tools",
3-
"version": "10.18.1",
3+
"version": "10.18.2",
44
"description": "Mendix Pluggable Widgets Tools",
55
"engines": {
66
"node": ">=20"

0 commit comments

Comments
 (0)