Fix acebase#145 missing types w/Node16 module resn

This commit is contained in:
Ewout Stortenbeker 2022-08-30 20:26:57 +02:00
parent a2e51b892e
commit 6eafbbacdd
3 changed files with 13 additions and 2 deletions

View file

@ -1,4 +1,5 @@
#!/bin/bash
# Create CommonJS package.json
cat >dist/cjs/package.json <<!EOF
{
"type": "commonjs",
@ -8,7 +9,11 @@ cat >dist/cjs/package.json <<!EOF
}
}
!EOF
# Write typings to support Node16 module resolution
cat >dist/cjs/index.d.ts <<!EOF
export * from '../../types';
!EOF
# Create ESM package.json
cat >dist/esm/package.json <<!EOF
{
"type": "module",
@ -17,4 +22,8 @@ cat >dist/esm/package.json <<!EOF
"./cuid/fingerprint/index.js": "./cuid/fingerprint/browser.js"
}
}
!EOF
!EOF
# Write typings to support Node16 module resolution
cat >dist/esm/index.d.ts <<!EOF
export * from '../../types';
!EOF

1
dist/cjs/index.d.ts vendored Normal file
View file

@ -0,0 +1 @@
export * from '../../types';

1
dist/esm/index.d.ts vendored Normal file
View file

@ -0,0 +1 @@
export * from '../../types';