forked from tornadocash/tornado-cli
tornadocontrib
3e1e6b43af
* removed broken rpc endpoints * use local cache for relayers * updated dependencies * use codeberg.org to fetch dependencies
46 lines
911 B
JavaScript
46 lines
911 B
JavaScript
const path = require('path');
|
|
const { BannerPlugin } = require('webpack');
|
|
|
|
const esbuildLoader = {
|
|
test: /\.ts?$/,
|
|
loader: 'esbuild-loader',
|
|
options: {
|
|
loader: 'ts',
|
|
target: 'es2016',
|
|
}
|
|
}
|
|
|
|
module.exports = [
|
|
{
|
|
mode: 'production',
|
|
module: {
|
|
rules: [esbuildLoader]
|
|
},
|
|
entry: './src/cli.ts',
|
|
output: {
|
|
filename: 'cli.js',
|
|
path: path.resolve(__dirname, './dist'),
|
|
},
|
|
target: 'node',
|
|
plugins: [
|
|
new BannerPlugin({
|
|
banner: '#!/usr/bin/env node\n',
|
|
raw: true
|
|
})
|
|
],
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
alias: {
|
|
'fflate': 'fflate/node'
|
|
},
|
|
fallback: {
|
|
'@tornado/websnark/src/utils': '@tornado/websnark/src/utils.js',
|
|
'@tornado/websnark/src/groth16': '@tornado/websnark/src/groth16.js',
|
|
}
|
|
},
|
|
optimization: {
|
|
minimize: false,
|
|
}
|
|
}
|
|
];
|