forked from tornadocash/tornado-cli
40 lines
793 B
JavaScript
40 lines
793 B
JavaScript
const esbuild = require('esbuild');
|
|
const path = require('path');
|
|
|
|
const esbuildLoader = {
|
|
test: /\.ts?$/,
|
|
loader: 'esbuild-loader',
|
|
options: {
|
|
loader: 'ts',
|
|
target: 'es2016',
|
|
implementation: esbuild
|
|
}
|
|
}
|
|
|
|
module.exports = [
|
|
{
|
|
mode: 'production',
|
|
module: {
|
|
rules: [esbuildLoader]
|
|
},
|
|
entry: './src/cli.ts',
|
|
output: {
|
|
filename: 'cli.js',
|
|
path: path.resolve(__dirname, './dist'),
|
|
},
|
|
target: 'node',
|
|
plugins: [],
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
alias: {},
|
|
fallback: {
|
|
'@tornado/websnark/src/utils': '@tornado/websnark/src/utils.js',
|
|
'@tornado/websnark/src/groth16': '@tornado/websnark/src/groth16.js',
|
|
}
|
|
},
|
|
optimization: {
|
|
minimize: false,
|
|
}
|
|
}
|
|
];
|