mirror of
https://github.com/iden3/js-crypto.git
synced 2026-01-11 14:57:58 -05:00
* ESM module migration * Update typescript * Add to bigInt function for PK * 1.2.0 * Format * Renaming. Fix lint * Update package version * Update package lock * Update package lock * Update package lock * add audited blake hash. Fix esm for node * Fixes
33 lines
606 B
JavaScript
33 lines
606 B
JavaScript
import { build } from 'esbuild';
|
|
import { exit } from 'process';
|
|
|
|
import pkg from '../package.json' with { type: 'json' };
|
|
|
|
|
|
const external = [
|
|
...Object.keys(pkg.dependencies || {}),
|
|
...Object.keys(pkg.peerDependencies || {}),
|
|
];
|
|
|
|
const baseConfig = {
|
|
entryPoints: ['src/index.ts'],
|
|
bundle: true,
|
|
minify: false,
|
|
sourcemap: true,
|
|
platform: 'node',
|
|
target: 'es2022',
|
|
outfile: 'dist/node/esm/index.js',
|
|
format: 'esm',
|
|
external
|
|
};
|
|
|
|
build({
|
|
...baseConfig
|
|
}).catch(() => exit(1));
|
|
|
|
build({
|
|
...baseConfig,
|
|
format: 'cjs',
|
|
outfile: 'dist/node/cjs/index.cjs',
|
|
}).catch(() => exit(1));
|