mirror of
https://github.com/iden3/js-crypto.git
synced 2026-01-11 06:48:14 -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
27 lines
504 B
JavaScript
27 lines
504 B
JavaScript
import { build } from 'esbuild';
|
|
import { exit } from 'process';
|
|
|
|
const globalName = 'IdenJsCrypto';
|
|
const baseConfig = {
|
|
dropLabels: ['NODE'],
|
|
entryPoints: ['src/index.ts'],
|
|
bundle: true,
|
|
minify: true,
|
|
sourcemap: true,
|
|
platform: 'browser',
|
|
target: 'es2022',
|
|
outfile: 'dist/browser/esm/index.js',
|
|
format: 'esm'
|
|
};
|
|
|
|
build({
|
|
...baseConfig
|
|
}).catch(() => exit(1));
|
|
|
|
build({
|
|
...baseConfig,
|
|
format: 'iife',
|
|
outfile: 'dist/browser/umd/index.js',
|
|
globalName
|
|
}).catch(() => exit(1));
|