-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.ts
65 lines (61 loc) · 1.7 KB
/
webpack.config.ts
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { resolve } from 'path';
import { Configuration } from 'webpack';
const config: Configuration = {
entry: resolve(__dirname, 'src/index.ts'),
mode: 'production',
module: {
rules: [
{
test: /\.tsx?$/,
use: {
loader: 'ts-loader',
options: {
configFile: resolve(__dirname, 'tsconfig.json'),
},
},
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
alias: {
'@injectivelabs/utils': '@injectivelabs/utils/dist/cjs/index.js',
},
},
output: {
filename: 'index.js',
path: resolve(__dirname, 'dist'),
library: {
type: 'umd',
name: 'picasso-sdk',
},
globalObject: 'this',
},
externals: {
'@coral-xyz/anchor': '@coral-xyz/anchor',
'@cosmjs/stargate': '@cosmjs/stargate',
'@cosmjs/tendermint-rpc': '@cosmjs/tendermint-rpc',
'@injectivelabs/sdk-ts': '@injectivelabs/sdk-ts',
'@polkadot/api': '@polkadot/api',
'@polkadot/extension-dapp': '@polkadot/extension-dapp',
'@polkadot/extension-inject': '@polkadot/extension-inject',
'@polkadot/keyring': '@polkadot/keyring',
'@polkadot/util': '@polkadot/util',
'@polkadot/util-crypto': '@polkadot/util-crypto',
'@solana/spl-token': '@solana/spl-token',
'@solana/web3.js': '@solana/web3.js',
'@injectivelabs/utils': '@injectivelabs/utils',
secretjs: 'secretjs',
web3: 'web3',
'web3-core': 'web3-core',
'web3-eth-contract': 'web3-eth-contract',
'web3-types': 'web3-types',
'web3-utils': 'web3-utils',
axios: 'axios',
'big.js': 'big.js',
bech32: 'bech32',
eventemitter3: 'eventemitter3',
},
};
export default config;