Files
js-crypto/scripts/browser.js
Dimasik Kolezhniuk 116bdb3a57 ESM module migration (#21)
* 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
2025-02-18 14:31:36 +01:00

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));