Skip to content

Commit fdb45ca

Browse files
stelselimclaude
andcommitted
fix: keep big.js import in built js actions
The bigjs import replacer stripped `import { Big } from "big.js"` from the build output, assuming mxbuild would re-add it. It does not, so actions creating Big values failed at runtime with "Big is not defined". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 474ad27 commit fdb45ca

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ export function bigJsImportReplacer() {
55
const [filename] = Object.keys(bundle);
66
const fileInfo = bundle[filename];
77

8-
// Remove Big import entirely - mxbuild will add it in the header at line 8
9-
fileInfo.code = fileInfo.code.replace(/^import\s*\{\s*Big\s*\}\s*from\s*['"]big\.js['"];?\s*\r?\n/m, "");
8+
// Keep the Big import (Studio Pro does not re-add it at runtime), normalized to Studio Pro's quote style
9+
fileInfo.code = fileInfo.code.replace(
10+
/^import\s*\{\s*Big\s*\}\s*from\s*['"]big\.js['"];?/m,
11+
`import { Big } from "big.js";`
12+
);
1013
}
1114
};
1215
}

‎packages/jsActions/mobile-resources-native/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
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+
- Fixed an issue where actions using decimal values threw a "Big is not defined" error at runtime.
12+
913
## [11.3.14] Native Mobile Resources - 2026-10-8
1014

1115
## [2.1.1] Gallery

‎packages/jsActions/nanoflow-actions-native/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
99
### Fixed
1010

1111
- Fixed an issue where the "Get straight line distance" action threw an error at runtime.
12+
- Fixed an issue where actions using decimal values threw a "Big is not defined" error at runtime.
1213

1314
## [6.2.3] Nanoflow Commons - 2026-9-2
1415

0 commit comments

Comments
 (0)