{"size": 1243, "ext": "js", "max_stars_repo_path": "webpack.config.js", "max_stars_repo_name": "imcvampire/IT4040-AI", "max_stars_repo_stars_event_min_datetime": "2016-11-24T02:09:56.000Z", "max_stars_repo_stars_event_max_datetime": "2016-11-24T02:09:56.000Z", "max_issues_repo_path": "webpack.config.js", "max_issues_repo_name": "imcvampire/ant-colony-optimization", "max_issues_repo_issues_event_min_datetime": "2016-11-24T09:58:31.000Z", "max_issues_repo_issues_event_max_datetime": "2016-11-24T09:58:31.000Z", "max_forks_repo_path": "webpack.config.js", "max_forks_repo_name": "imcvampire/IT4040-AI", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 19.1230769231, "max_line_length": 90, "alphanum_fraction": 0.5398230088}
let path = require('path');
let webpack = require('webpack');

let CommonsChunkPlugin = new webpack.optimize.CommonsChunkPlugin({
  name: "vendor",
  minChunks: Infinity
})


function option(argument) {
  return process.argv.find(argument);
}


let entry = {
  'app': ['./src/index.js', './src/index.html', './src/cac_champagne.ttf'],
  'vendor': ['d3', 'jquery', 'material-design-lite']
}


module.exports = {
  entry: entry,

  output: {
    path: './dist',
    filename: '[name].js',
    sourceMapFilename: '[name].js.map',
    chunkFilename: '[id].chunk.js'
  },

  resolve: {
    root: [
      path.resolve('./src')
    ],

    extensions: ['', '.js', '.json', '.css', '.html', '.ttf']
  },

  devtool: 'source-map',
  debug: true,

  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /(node_modules|bower_components)/,
        loader: 'babel-loader'
      },
      {
        test: /\.html$/,
        loader: 'file-loader?name=[name].[ext]!extract-loader!html-loader?attrs=link:href'
      },
      {
        test: /\.css$/,
        loader: 'file-loader?name=[name].[ext]'
      },
      {
        test: /\.ttf$/,
        loader: 'file-loader?name=[name].[ext]'
      }
    ]
  },

  plugins: [CommonsChunkPlugin]
}