Skip to content

Emit CommonJS for global bundle to restore LABKEY overrides#221

Merged
labkey-nicka merged 6 commits into
developfrom
fb_object_assign
Jul 10, 2026
Merged

Emit CommonJS for global bundle to restore LABKEY overrides#221
labkey-nicka merged 6 commits into
developfrom
fb_object_assign

Conversation

@labkey-nicka

@labkey-nicka labkey-nicka commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Rationale

Setting the compile target to ES2023 flipped the global browser bundles from CommonJS to ES module emit, which broke legacy runtime overrides of the LABKEY.* namespaces. ESM exports are read-only getters that webpack also inlines via scope hoisting, so the namespaces can no longer be patched. Since module/moduleResolution are build-time-only and independent of the language target, this restores CommonJS emit for the global bundles while keeping the ES2023 target.

Related Pull Requests

Changes

  • Emit CommonJS (nodenext) and disable module concatenation in global bundles
  • Assign LABKEY.* namespaces directly from the API exports
  • Remove target override in UMD build

@labkey-nicka labkey-nicka merged commit 843086e into develop Jul 10, 2026
3 checks passed
@labkey-nicka labkey-nicka deleted the fb_object_assign branch July 10, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants