-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
37 lines (36 loc) · 969 Bytes
/
webpack.config.js
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
const path = require('path');
const webpack = require('webpack');
const Buffer = require('buffer/').Buffer;
module.exports = {
context: path.resolve(__dirname, ''),
devtool: 'inline-source-map',
entry: './src/typescript/wallet.ts',
mode: 'development',
module: {
rules: [{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}]
},
output: {
filename: 'walletconnect.js',
path: path.resolve(__dirname, './src/www/js/')
},
resolve: {
extensions: ['.tsx', '.ts', '.jsx', '.js'],
fallback: {
"crypto": require.resolve("crypto-browserify"),
"stream": require.resolve("stream-browserify"),
buffer: require.resolve("buffer/"),
}
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
],
experiments: {
topLevelAwait: true,
}
};