Skip to content

Commit 31789e4

Browse files
committed
Enable full ESM support for Node 20+ and modern dependencies, update Jest and build output configuration
- Set "type": "module" in package.json to enable ESM throughout the project. - Changed "main" in package.json to "dist/index.js" to point to the bundled output generated by ncc. - Updated Jest configuration (jest.config.js) to ESM format and to use babel-jest for TypeScript transformation. - Added/updated babel.config.js in ESM format to support TypeScript and ESM for Jest. - Ensured test scripts use NODE_OPTIONS=--experimental-vm-modules for Jest ESM compatibility.
1 parent 9d2bd04 commit 31789e4

File tree

8 files changed

+332
-409
lines changed

8 files changed

+332
-409
lines changed

babel.config.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
module.exports = {
1+
export default {
22
presets: [
3-
['@babel/preset-env', { targets: { node: 'current' } }],
4-
'@babel/preset-typescript',
5-
],
3+
[
4+
'@babel/preset-env',
5+
{
6+
targets: { node: 'current' },
7+
modules: false
8+
}
9+
],
10+
'@babel/preset-typescript'
11+
]
612
};

0 commit comments

Comments
 (0)