Files
wasm/rollup.config.js
Tarik Gul 6777f8ef5e 2025 (#574)
* 2025

* include more files
2025-01-02 17:31:20 +02:00

38 lines
774 B
JavaScript

// Copyright 2019-2025 @polkadot/wasm-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { createBundle } from '@polkadot/dev/config/rollup';
const pkgs = [
'@polkadot/wasm-crypto'
];
const external = [
...pkgs,
'@polkadot/util'
];
const overrides = pkgs
.map((n) => n.replace('@polkadot/wasm-', ''))
.reduce((map, n) => ({
...map,
[`@polkadot/wasm-${n}`]: {
entries: [
'bridge',
'util',
...['init', 'asmjs', 'wasm'].map((p) => `${n}-${p}`)
].reduce((all, p) => ({
...all,
[`@polkadot/wasm-${p}`]: `../../wasm-${p}/build/bundle.js`
}), {})
}
}), {});
export default pkgs.map((pkg) =>
createBundle({
external,
pkg,
...(overrides[pkg] || {})
})
);