const path = require('path'); const TerserPlugin = require('terser-webpack-plugin'); module.exports = { mode: 'production', entry: 'tensorboard/plugins/projector/vz_projector/bundle.ts', // Adjust this path to your main TypeScript file output: { filename: 'bundle.min.js', path: path.resolve(__dirname, 'shrink-bin'), // Adjust this path to where you want your output }, module: { rules: [ { test: /\.ts$/, use: 'ts-loader', exclude: /node_modules/, }, ], }, resolve: { extensions: ['.ts', '.js'], }, optimization: { minimize: true, minimizer: [new TerserPlugin()], }, };