const path = require('path');
var PeerDepsExternalsPlugin = require('peer-deps-externals-webpack-plugin');


module.exports = {
    mode : "production",
    entry: {
        app: './src/index.ts',
    },
    output: {
        path: path.resolve('./dist'),
        filename: '[name].js',
    },
    module: {
      rules: [
        {
          test: /\.tsx?$/,
          use: 'ts-loader',
          exclude: /node_modules/,
        },
      ],
    },
    resolve: {
      extensions: ['.tsx', '.ts', '.js'],
    },  
    plugins: [
      new PeerDepsExternalsPlugin(),
    ],
  };