<commit_before>const helpers = require('./helpers');
const webpack = require('webpack');
const commonConfig = require('./webpack.common.js');

/**
 * Webpack Plugins
 */
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const DedupePlugin = require('webpack/lib/optimize/DedupePlugin');
const DefinePlugin = require('webpack/lib/DefinePlugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const IgnorePlugin = require('webpack/lib/IgnorePlugin');
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
const NormalModuleReplacementPlugin = require('webpack/lib/NormalModuleReplacementPlugin');
const ProvidePlugin = require('webpack/lib/ProvidePlugin');
const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin');
const WebpackMd5Hash = require('webpack-md5-hash');
const webpackMerge = require('webpack-merge');

/**
 * Webpack Constants
 */
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
const API_URL = process.env.API_URL || 'http://api.almighty.io/api/';
const FORGE_URL = process.env.FORGE_URL;
const PUBLIC_PATH = process.env.PUBLIC_PATH || '/';

const METADATA = webpackMerge(commonConfig.metadata, {
  API_URL: API_URL,
  ENV: ENV,
  FORGE_URL: FORGE_URL,
  PUBLIC_PATH: PUBLIC_PATH
});

module.exports = function (env) {
  return webpackMerge(commonConfig({
    env: ENV
  }), {

    devtool: 'source-map',

    entry: helpers.root('index.ts'),

    // require those dependencies but don't bundle them
    externals: [/^\@angular\//, /^rxjs\//],

    output: {
      path: helpers.root('dist'),
      publicPath: METADATA.PUBLIC_PATH,
      filename: 'bundles/ngx-widgets.js',
      library: 'ngx-widgets',
      libraryTarget: 'umd',
      umdNamedDefine: true
    },

    // htmlLoader: {
    //   minimize: false // workaround for ng2
    // },

    plugins: [<commit_msg>fix(build): clean up prod externals settings<commit_after>const helpers = require('./helpers');
const webpack = require('webpack');
const commonConfig = require('./webpack.common.js');

/**
 * Webpack Plugins
 */
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const DedupePlugin = require('webpack/lib/optimize/DedupePlugin');
const DefinePlugin = require('webpack/lib/DefinePlugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const IgnorePlugin = require('webpack/lib/IgnorePlugin');
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
const NormalModuleReplacementPlugin = require('webpack/lib/NormalModuleReplacementPlugin');
const ProvidePlugin = require('webpack/lib/ProvidePlugin');
const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin');
const WebpackMd5Hash = require('webpack-md5-hash');
const webpackMerge = require('webpack-merge');

/**
 * Webpack Constants
 */
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
const API_URL = process.env.API_URL || 'http://api.almighty.io/api/';
const FORGE_URL = process.env.FORGE_URL;
const PUBLIC_PATH = process.env.PUBLIC_PATH || '/';

const METADATA = webpackMerge(commonConfig.metadata, {
  API_URL: API_URL,
  ENV: ENV,
  FORGE_URL: FORGE_URL,
  PUBLIC_PATH: PUBLIC_PATH
});

module.exports = function (env) {
  return webpackMerge(commonConfig({
    env: ENV
  }), {

    devtool: 'source-map',

    entry: helpers.root('index.ts'),

    // require those dependencies but don't bundle them
    externals: [
      /^\@angular\//,
      /^rxjs\//
    ],

    output: {
      path: helpers.root('dist'),
      publicPath: METADATA.PUBLIC_PATH,
      filename: 'bundles/ngx-widgets.js',
      library: 'ngx-widgets',
      libraryTarget: 'umd',
      umdNamedDefine: true
    },

    // htmlLoader: {
    //   minimize: false // workaround for ng2
    // },

    plugins: [
{'fraction_non_alphanumeric': 0.14434873401200732, 'fraction_numerical': 0.0015661707126076742, 'mean_word_length': 4.322222222222222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '317062', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1180, 'n_words': 231}