From fe5f3b1fac72eb6d1c3c6d0a7efa3ca0738c01f3 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Mon, 8 Dec 2025 15:03:15 +1000 Subject: [PATCH 1/2] DOC-3224: Premium plugins now include ESM module support. --- modules/ROOT/pages/8.3.0-release-notes.adoc | 24 ++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/8.3.0-release-notes.adoc b/modules/ROOT/pages/8.3.0-release-notes.adoc index 2f195358c4..ab7900aa6c 100644 --- a/modules/ROOT/pages/8.3.0-release-notes.adoc +++ b/modules/ROOT/pages/8.3.0-release-notes.adoc @@ -39,7 +39,29 @@ The following premium plugin updates were released alongside {productname} {rele // // CCFR here. // For information on the **** plugin, see: xref:.adoc[]. - +=== Premium plugins now include ESM module support +// #TINY-12888 + +All premium plugins now include an `+index.mjs+` file in their dist folders alongside the existing `+index.js+` file. The `+index.mjs+` file uses ES module (`+import+`) syntax instead of CommonJS (`+require+`) syntax, allowing bundlers and integrators to use native ESM without requiring a CommonJS compatibility layer. + +The `+package.json+` file in each premium plugin's dist folder has been updated to include proper module exports configuration: + +[source,json] +---- +{ + "main": "index.js", + "module": "index.mjs", + "exports": { + ".": { + "import": "./index.mjs", + "require": "./index.js" + }, + "./package.json": "./package.json" + } +} +---- + +This enables modern bundlers to automatically select the appropriate module format based on the project's configuration, improving compatibility and reducing the need for additional build tooling. [[improvements]] == Improvements From 5bf8b0f17c0302d844d37c05367c7d6bf24f31ca Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Tue, 9 Dec 2025 22:05:49 +1000 Subject: [PATCH 2/2] Apply suggestion from @kemister85 --- modules/ROOT/pages/8.3.0-release-notes.adoc | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/modules/ROOT/pages/8.3.0-release-notes.adoc b/modules/ROOT/pages/8.3.0-release-notes.adoc index ab7900aa6c..401e2e7d0f 100644 --- a/modules/ROOT/pages/8.3.0-release-notes.adoc +++ b/modules/ROOT/pages/8.3.0-release-notes.adoc @@ -42,26 +42,7 @@ The following premium plugin updates were released alongside {productname} {rele === Premium plugins now include ESM module support // #TINY-12888 -All premium plugins now include an `+index.mjs+` file in their dist folders alongside the existing `+index.js+` file. The `+index.mjs+` file uses ES module (`+import+`) syntax instead of CommonJS (`+require+`) syntax, allowing bundlers and integrators to use native ESM without requiring a CommonJS compatibility layer. - -The `+package.json+` file in each premium plugin's dist folder has been updated to include proper module exports configuration: - -[source,json] ----- -{ - "main": "index.js", - "module": "index.mjs", - "exports": { - ".": { - "import": "./index.mjs", - "require": "./index.js" - }, - "./package.json": "./package.json" - } -} ----- - -This enables modern bundlers to automatically select the appropriate module format based on the project's configuration, improving compatibility and reducing the need for additional build tooling. +Premium plugins in {productname} {release-version} can now be consumed as native ES modules (`import`) in addition to CommonJS (`require`). This enhancement aligns premium plugins with the existing ESM capabilities already available in core plugins and applies to all distributed artifacts, including NPM packages and ZIP bundles. The update enables modern bundlers to automatically resolve the optimal module format, improving compatibility with ESM-focused toolchains and removing the need for CommonJS shims during integration. [[improvements]] == Improvements