forked from Nick-1979/polkadot-Js-Plus-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.mjs
More file actions
38 lines (30 loc) · 784 Bytes
/
rollup.config.mjs
File metadata and controls
38 lines (30 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2017-2022 @polkadot/extension authors & contributors
// SPDX-License-Identifier: Apache-2.0
import path from 'path';
import { createBundle } from '@polkadot/dev/config/rollup';
const pkgs = [
'@polkadot/extension-dapp'
];
const external = [
...pkgs,
'@polkadot/networks',
'@polkadot/util',
'@polkadot/util-crypto'
];
const entries = ['extension-base', 'extension-chains', 'extension-inject'].reduce((all, p) => ({
...all,
[`@polkadot/${p}`]: path.resolve(process.cwd(), `packages/${p}/build`)
}), {});
const overrides = {};
export default pkgs.map((pkg) => {
const override = (overrides[pkg] || {});
return createBundle({
external,
pkg,
...override,
entries: {
...entries,
...(override.entries || {})
}
});
});