tornado-cli/webpack.config.js
tornadocontrib 3e1e6b43af
Tornado CLI 1.0.4-alpha
* removed broken rpc endpoints

* use local cache for relayers

* updated dependencies

* use codeberg.org to fetch dependencies
2024-09-21 04:04:45 +00:00

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,
}
}
];