{"size": 1349, "ext": "js", "max_stars_repo_path": "webpack/config.js", "max_stars_repo_name": "tommy351/hexo-app", "max_stars_repo_stars_event_min_datetime": "2016-02-17T15:38:30.000Z", "max_stars_repo_stars_event_max_datetime": "2019-10-31T10:43:02.000Z", "max_issues_repo_path": "webpack/config.js", "max_issues_repo_name": "tommy351/hexo-app", "max_issues_repo_issues_event_min_datetime": "2017-06-02T14:01:46.000Z", "max_issues_repo_issues_event_max_datetime": "2017-06-02T14:01:46.000Z", "max_forks_repo_path": "webpack/config.js", "max_forks_repo_name": "tommy351/hexo-app", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 19.2714285714, "max_line_length": 86, "alphanum_fraction": 0.5211267606}
'use strict';

const path = require('path');
const webpack = require('webpack');
const postcssImport = require('postcss-import');
const precss = require('precss');
const cssnano = require('cssnano');

module.exports = {
  entry: {
    main: [
      'babel-core/polyfill',
      './src/main'
    ]
  },
  resolve: {
    extensions: ['', '.js', '.jsx', '.json'],
    packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main']
  },
  output: {
    libraryTarget: 'commonjs2',
    pathinfo: true,
    path: path.join(__dirname, '../build'),
    filename: '[name].js',
    chunkFilename: '[name].js',
    publicPath: '/build/'
  },
  module: {
    preLoaders: [
      {
        test: /\.jsx?$/,
        loader: 'eslint',
        exclude: /node_modules/
      },
      {
        test: /\.jsx?$/,
        loader: 'jscs',
        exclude: /node_modules/
      }
    ],
    loaders: [
      {
        test: /\.json$/,
        loader: 'json'
      }
    ]
  },
  plugins: [
    new webpack.EnvironmentPlugin([
      'NODE_ENV'
    ]),
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.OccurenceOrderPlugin()
  ],

  postcss: function(webpack) {
    return [
      postcssImport({
        addDependencyTo: webpack
      }),
      precss(),
      cssnano({
        zindex: false
      })
    ];
  },

  progress: true
};
