forked from Koniverse/SubWallet-Extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.mjs
46 lines (38 loc) · 947 Bytes
/
rollup.config.mjs
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
39
40
41
42
43
44
45
46
// 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', 'extension-koni-base'].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 || {})
},
resolve: {
fallback: {
"url": false,
"zlib": false,
"https": false,
"http": false,
}
}
});
});