Skip to content

fix(esm): provide separate CJS and ESM versions of load-module-native - #419

Merged
jeffijoe merged 4 commits into
masterfrom
fix/esm-again-fr
Mar 3, 2026
Merged

fix(esm): provide separate CJS and ESM versions of load-module-native#419
jeffijoe merged 4 commits into
masterfrom
fix/esm-again-fr

Conversation

@jeffijoe

@jeffijoe jeffijoe commented Mar 3, 2026

Copy link
Copy Markdown
Owner

The CJS build was emitting require("./load-module-native.mjs") which fails in environments like Jest+esbuild that can't require() an .mjs file with export syntax. Now the CJS build references a .js file using module.exports while the ESM bundle references the .mjs file, resolved via a rollup resolveId plugin.

Fixes #418

@coveralls

coveralls commented Mar 3, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same
when pulling 084e5ce on fix/esm-again-fr
into 3ea1051 on master.

jeffijoe added 2 commits March 3, 2026 09:56
The CJS build was emitting require("./load-module-native.mjs") which
fails in environments like Jest+esbuild that can't require() an .mjs
file with export syntax. Now the CJS build references a .js file using
module.exports while the ESM bundle references the .mjs file, resolved
via a rollup resolveId plugin.

Fixes #418
@jeffijoe
jeffijoe merged commit 55e2186 into master Mar 3, 2026
5 checks passed
@jeffijoe
jeffijoe deleted the fix/esm-again-fr branch March 3, 2026 16:23
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.

Awilix 13.0.2 breaks execution as export is not found

2 participants