var webpack = require('webpack');
var cssImport = require('postcss-import');
var cssNested = require('postcss-nested');

module.exports = {
  context : __dirname,
  entry : {
    main  : './app/main.js',
    entry : './app/entry.js'
  },
  output : {
    path : './dist',
    filename : '[name].js',
  },
  node : {
    __dirname  : false
  },
  module : {
    loaders : [
      {
        test : /\.js$/,
        loader : 'babel-loader',
        exclude : /node_modules/
      },
      {
        test : /\.json$/,
        loader : 'json?sourceMap'
      },
      {
        test: /\.css$/,
        loaders: ['style', 'css?modules&localIdentName=[local]--[hash:base64:5]', 'postcss'],
      },
      {
        test: /\.svg$/,
        loader: 'svg-url-loader'
      }
    ]
  },
  postcss : [cssImport, cssNested],
  target : 'electron'
};

@@ -750,16 +750,114 @@
 loader'%0A
+      %7D,%0A      %7B%0A        test: /%5C.js$/,%0A        loader: 'eslint',%0A        exclude: /node_modules/%0A
       %7D%0A
@@ -924,12 +924,43 @@
 lectron'
+,%0A  eslint: %7B%0A    fix: true%0A  %7D
 %0A%7D;%0A

use eslint-loader