acebase-server/create-package-files
Ewout Stortenbeker cce4f0edc4
Fix: support TypeScript node 16 module resolution (#32)
* Support TypeScript Node16 module resolution

* chore: build
2022-09-10 11:54:17 +02:00

25 lines
435 B
Bash

#!/bin/bash
# Create CommonJS package.json
cat >dist/cjs/package.json <<!EOF
{
"type": "commonjs"
}
!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"
}
!EOF
# Write typings to support Node16 module resolution
cat >dist/esm/index.d.ts <<!EOF
export * from '../types';
!EOF