<commit_before>const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

module.exports = {
  mode: 'development',
  entry: {
    main: './plugins/api-manager/ts/apimanPlugin.ts'
  },
  devtool: 'inline-source-map',
  devServer: {
    port: 2772,
    static: './dist',
    historyApiFallback: true
  },
  plugins: [
    new HtmlWebpackPlugin({
      title: 'Apiman',
      template: './index.html'
    }),
    new CopyPlugin({
      patterns: [
        { from: "./apiman", to: "apiman" },
        { 
          from: "./plugins/api-manager/**/*.{html,include}",
          to({ context, absoluteFilename }) {
            return `${path.relative("./", absoluteFilename)}`;
          },
       }
      ],
    }),
    new BundleAnalyzerPlugin()
  ],
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        use: 'ts-loader',
        exclude: /node_modules/
      },
      {
        test: /\.css$/i,
        use: ['style-loader', 'css-loader']
      },
      {
        test: /\.(png|svg|jpg|jpeg|gif)$/i,
        type: 'asset/resource',
      },
      {
        test: /\.(woff|woff2|eot|ttf|otf)$/i,
        type: 'asset/resource',
      },
      {
        test: /'\.(html|include)$/i,
        type: 'asset/resource'
      }
    ],
  },
  resolve: {
    extensions: ['.tsx', '.ts', '.js'],
  },
  output: {
    filename: 'apiman-manager-ui.js',
    path: path.resolve(__dirname, 'dist'),
    clean: true
  }
};<commit_msg>build(ui): temporarily disable source maps for production <commit_after>const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');

module.exports = (env, argv) => { 
  return {
    mode: 'development',
    entry: {
      main: './plugins/api-manager/ts/apimanPlugin.ts'
    },
    devtool: argv.mode === 'development' ? 'source-map' : false,
    devServer: {
      port: 2772,
      static: './dist',
      historyApiFallback: true
    },
    plugins: [
      new HtmlWebpackPlugin({
        title: 'Apiman',
        template: './index.html'
      }),
      new CopyPlugin({
        patterns: [
          { from: "./apiman", to: "apiman" },
          { 
            from: "./plugins/api-manager/**/*.{html,include}",
            to({ context, absoluteFilename }) {
              return `${path.relative("./", absoluteFilename)}`;
            },
        }
        ],
      })
    ],
    module: {
      rules: [
        {
          test: /\.tsx?$/,
          use: 'ts-loader',
          exclude: /node_modules/
        },
        {
          test: /\.css$/i,
          use: ['style-loader', 'css-loader']
        },
        {
          test: /\.(png|svg|jpg|jpeg|gif)$/i,
          type: 'asset/resource',
        },
        {
          test: /\.(woff|woff2|eot|ttf|otf)$/i,
          type: 'asset/resource',
        },
        {
          test: /'\.(html|include)$/i,
          type: 'asset/resource'
        }
      ],
    },
    resolve: {
      extensions: ['.tsx', '.ts', '.js'],
    },
    output: {
      filename: 'apiman-manager-ui.js',
      path: path.resolve(__dirname, 'dist'),
      clean: true
    }
  }
};
{'fraction_non_alphanumeric': 0.18548876745598056, 'fraction_numerical': 0.0030358227079538553, 'mean_word_length': 1.7852916314454776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5503632', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1062, 'n_words': 186}