From 0a880efa72a84d8a06fdac83a74880a6f47f2bf4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:54:20 +0000 Subject: [PATCH 1/5] Initial plan From ddde1c141e727c12eee8bfb9c240ebed70089b48 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 23 Sep 2026 18:03:34 +0000 Subject: [PATCH 2/5] feat: add ESM and CJS module builds for bundler support --- .changeset/esm-module-exports.md | 10 ++++++ docs/developer-guide.md | 2 +- esbuild.config.js | 55 ++++++++++++++++++++++++++------ packages/utils/package.json | 15 ++++++++- packages/yasgui/package.json | 16 +++++++++- packages/yasqe/package.json | 16 +++++++++- packages/yasr/package.json | 16 +++++++++- 7 files changed, 116 insertions(+), 14 deletions(-) create mode 100644 .changeset/esm-module-exports.md diff --git a/.changeset/esm-module-exports.md b/.changeset/esm-module-exports.md new file mode 100644 index 00000000..50ac5b3d --- /dev/null +++ b/.changeset/esm-module-exports.md @@ -0,0 +1,10 @@ +--- +"@matdata/yasgui-utils": minor +"@matdata/yasqe": minor +"@matdata/yasr": minor +"@matdata/yasgui": minor +--- + +Ship ES module and CommonJS builds so the packages can be imported by bundlers (Vite/webpack/esbuild) and Node. + +Each package now builds three bundles: an ES module (`*.mjs`), a CommonJS module (`*.cjs`) and the existing browser global IIFE (`*.min.js`). The `package.json` of every package exposes them through `main` (CommonJS), `module` (ESM), `unpkg`/`jsdelivr` (browser global) and a conditional `exports` map with `import`, `require`, `types` and `default` entries. This makes the documented `import Yasgui from "@matdata/yasgui"` usage work in module bundlers, while `