{"size": 1659, "ext": "js", "max_stars_repo_path": "webpack.config.js", "max_stars_repo_name": "Imperat/ADFS_managers", "max_stars_repo_stars_event_min_datetime": "2017-07-05T20:03:00.000Z", "max_stars_repo_stars_event_max_datetime": "2018-09-19T17:18:26.000Z", "max_issues_repo_path": "webpack.config.js", "max_issues_repo_name": "Imperat/ADFS_managers", "max_issues_repo_issues_event_min_datetime": "2016-07-15T16:21:03.000Z", "max_issues_repo_issues_event_max_datetime": "2018-04-17T11:18:06.000Z", "max_forks_repo_path": "webpack.config.js", "max_forks_repo_name": "Imperat/ADFS_managers", "max_forks_repo_forks_event_min_datetime": "2017-06-23T14:53:38.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-03T12:38:46.000Z"}
{"max_stars_count": 11, "max_issues_count": 50, "max_forks_count": 6, "avg_line_length": 25.1363636364, "max_line_length": 100, "alphanum_fraction": 0.5605786618}
const path = require('path');
const webpack = require('webpack');
const BundleTracker = require('webpack-bundle-tracker');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
  context: __dirname,

  entry: {
    main: './static/js/main.js',
    style: './static/css/main.less'
  },
  output: {
    path: path.resolve('./static/bundles/'),
    filename: '[name].js',
  },
  plugins: [
    new BundleTracker({ filename: './webpack-stats.json' }),
    new webpack.ProvidePlugin({
      $: 'jquery',
      jQuery: 'jquery',
    }),
    new ExtractTextPlugin('styles.css'),
  ],
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loader: 'babel-loader',
        query: {
          plugins: [
            'transform-runtime',
            'transform-react-remove-prop-types',
            'transform-react-constant-elements',
            'transform-react-inline-elements',
          ],
          presets: ['es2015', 'react'],
        }
      },

      {
       test: /\.css$/,
       loader: ExtractTextPlugin.extract({fallback: "style-loader", use: "css-loader"})
      },

      {
        test: /\.less$/,
        loader: ExtractTextPlugin.extract({fallback: "style-loader", use: "css-loader!less-loader"})
      },
      {
    // I want to uglify with mangling only app files, not thirdparty libs
    test: /.*\/main\/.*\.js$/,
    exclude: /.spec.js/, // excluding .spec files
    loader: "uglify"
},
    ],
  },

  resolve: {
    modules: ['node_modules', 'bower_components'],
    extensions: ['.js', '.jsx'],
  },
};
