Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
eth-crypto/config/webpack.config.js

36 lines
857 B

const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
//console.log(process.env.NODE_ENV);
//process.exit();
const plugins = [];
if (process.env.NODE_ENV === 'disc')
plugins.push(new BundleAnalyzerPlugin());
module.exports = {
mode: 'production',
entry: './dist/es/browserify.index.js',
optimization: {
minimizer: [
new TerserPlugin({
parallel: true,
})
]
},
plugins,
output: {
path: path.resolve(__dirname, '../test_tmp'),
filename: 'webpack.bundle.js'
},
resolve: {
fallback: {
'crypto': require.resolve('crypto-browserify'),
'stream': require.resolve('stream-browserify')
}
}
};