'use strict';
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');


const htmlConfig = {
  template: 'src/_base.html',
  filename: 'index.html',
  minify: {
    // collapseWhitespace: true,
    hash: true
  },
  alwaysWriteToDisk: true
}

const devServerConfig = {
  contentBase: __dirname,
  compress: true,
  port: 3000,
  clientLogLevel: 'info',
};

const config = {};
config.entry = {
  app: './src/app.js',
  polyfills: './src/polyfills.js',
  // vendor: [
  //   'angular',
  //   'angular-ui-router',
  //   'angular-animate',
  //   'angular-cookies',
  //   'angular-resource',
  //   'angulartics',
  //   'd3',
  //   'highcharts',
  //   'highcharts-ng',
  //   'lodash',
  //   'moment',
  //   'ui-select',
  // ]
};

config.devtool = 'source-map';

config.module = {
  rules: [{
    test: /\.js$/,
    use: [{
      loader: 'babel-loader',
      options: {
        compact: false,
        presets: ['env']
      }
    }],
  }, {
    test: /\.scss$/,
    loader: ExtractTextPlugin.extract({
      fallback: 'style-loader',
      loader: ['css-loader', {
          loader: 'sass-loader',
          options: {
            outputStyle: 'compressed',
            includePaths: [
              path.resolve(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets'),
              path.resolve(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets/bootstrap'),
              path.resolve(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins')
            ]
          }
        }]
        // use: [{
        //   loader: 'css-loader'
        // }, {
        //   loader: 'sass-loader',
        //   options: {
        //     outputStyle: 'compressed',
        //     precision: 10,
        //     sourceComments: false,
        //     includePaths: [
        //       path.resolve(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets'),
        //       path.resolve(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets/bootstrap'),
        //       path.resolve(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins')
        //     ]
        //   }
        // }]
    })
  }, {

  }]
};
const babiliOptions = {};
const babiliOverrides = {};

config.plugins = [
  new HtmlWebpackPlugin(htmlConfig),
  new HtmlWebpackHarddiskPlugin(),
  new ExtractTextPlugin({
    filename: '[name].[contenthash].css',
  }),
]

module.exports = config
@@ -1242,26 +1242,24 @@
 , %7B%0A        
-  
 loader: 'sas
@@ -1273,26 +1273,24 @@
 r',%0A        
-  
 options: %7B%0A 
@@ -1298,18 +1298,16 @@
         
- 
- 
 outputSt
@@ -1335,18 +1335,16 @@
         
-  
 includeP
@@ -1347,26 +1347,24 @@
 udePaths: %5B%0A
-  
             
@@ -1442,34 +1442,32 @@
 '),%0A            
-  
 path.resolve(__d
@@ -1531,26 +1531,24 @@
 ootstrap'),%0A
-  
             
@@ -1648,22 +1648,18 @@
         
-  %5D%0A  
+%5D%0A
         
@@ -1656,26 +1656,24 @@
 %5D%0A        %7D%0A
-  
       %7D%5D%0A   
@@ -1677,640 +1677,83 @@
     
-    // use: %5B%7B%0A        //   loader: 'css-loader'%0A        // %7D, %7B%0A        //   loader: 'sass-loader',%0A        //   options: %7B%0A        //     outputStyle: 'compressed',%0A        //     precision: 10,%0A        //     sourceComments: false,%0A        //     includePaths: %5B%0A        //       path.resolve(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets'),%0A        //       path.resolve(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets/bootstrap'),%0A        //       path.resolve(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins')%0A        //     %5D%0A        //   %7D%0A        // %7D%5D%0A    %7D)%0A  %7D, %7B%0A%0A  %7D
+%7D)%0A  %7D, %7B%0A    test: /%5C.(jpg%7Cpng%7Cgif%7Csvg)$/i,%0A    use: 'file-loader',%0A%0A  %7D, 
 %5D%0A%7D;

support images