const path = require('path'); const webpack = require('webpack'); module.exports = { mode: 'production', target: "web", entry: path.resolve(__dirname, 'src', 'Browser.ts'), output: { path: path.resolve(__dirname, 'build', 'gui'), filename: '[name].js', }, plugins: [ new webpack.ProvidePlugin({ process: 'process/browser', }), ], resolve: { extensions: [".ts", ".tsx", ".js"], fallback: { "fs": false, "tls": false, "net": false, "path": false, "zlib": false, "http": false, "https": false, "stream": false, "crypto": false, "Buffer": require.resolve('buffer'), "crypto-browserify": require.resolve('crypto-browserify'), } }, externals: { 'lodash': ['_'], 'ripple-lib': ['ripple'], 'RippleAPI': ['ripple-lib', 'RippleAPI'], 'bn.js': ['BN'], 'Buffer': ['buffer'], 'buffer': ['buffer'], 'zlib': ['browserifyZlib'] }, module: { rules: [ { test: /\.ts?$/, loader: "ts-loader", } ] }, optimization:{ minimize: false } }