const paths = require('./paths');


module.exports = {
  resolve: {
    // This allows you to set a fallback for where Webpack should look for modules.
    // We use `fallback` instead of `root` because we want `node_modules` to "win"
    // if there any conflicts. This matches Node resolution mechanism.
    // https://github.com/facebookincubator/create-react-app/issues/253
    fallback: paths.nodeModulesDir,
    extensions: ['', '.js', '.json'],
    alias: {
      components: `${paths.appDir}/components`,
      hocs: `${paths.appDir}/hocs`,
      styles: `${paths.appDir}/styles`,
      utils: `${paths.appDir}/utils`,
      app: paths.appDir // this allows import 'app/...' without knowing the relative path
    }
  },
  preLoaders: [
    {
      test: /\.js$/,
      include: paths.appDir,
      loader: 'eslint'
    }
  ],
  loaders: [
    {
      exclude: [
        /\.html$/,
        /\.js$/,
        /\.css$/,
        /\.json$/,
        /\.svg$/
      ],
      loader: 'url',
      query: {
        limit: 10000,
        name: 'media/[name].[hash:8].[ext]'
      }
    },
    {
      test: /\.json$/,
      loader: 'json'
    },
    {
      test: /\.svg$/,
      loader: 'file',
      query: {
        name: 'media/[name].[hash:8].[ext]'
      }
    }
  ],
  // Some libraries import Node modules but don't use them in the browser.
  // Tell Webpack to provide empty mocks for them so importing them works.
  node: {
    fs: 'empty',
    net: 'empty',
    tls: 'empty'
  }
};

@@ -856,116 +856,107 @@
     
-exclude: %5B%0A        /%5C.html$/,%0A        /%5C.js$/,
+test: /%5C.json$/,%0A      loader: 'json'
 %0A    
+%7D,%0A
     
-/%5C.css$/,%0A        /%5C.json$/,%0A        /%5C.svg$/%0A      %5D
+%7B%0A      test: /%5C.(eot%7Cotf%7Cttf%7Cwoff%7Cwoff2)(%5C?.*)?$/
 ,%0A  
@@ -972,11 +972,12 @@
 r: '
-url
+file
 ',%0A 
@@ -994,30 +994,8 @@
 : %7B%0A
-        limit: 10000,%0A
     
@@ -997,37 +997,37 @@
 %0A        name: '
-media
+fonts
 /%5Bname%5D.%5Bhash:8%5D
@@ -1074,68 +1074,204 @@
  /%5C.
-json$/,%0A      loader: 'json'%0A    %7D,%0A    %7B%0A      test: /%5C.svg
+(jpg%7Cjpeg%7Cpng%7Cgif%7Csvg%7Cico%7Cwebp)(%5C?.*)?$/,%0A      loader: 'file',%0A      query: %7B%0A        name: 'media/%5Bname%5D.%5Bhash:8%5D.%5Bext%5D'%0A      %7D%0A    %7D,%0A    %7B%0A      test: /%5C.(mp4%7Cwebm%7Cwav%7Cmp3%7Cm4a%7Caac%7Coga)(%5C?.*)?
 $/,%0A
@@ -1277,36 +1277,35 @@
 %0A      loader: '
-file
+url
 ',%0A      query: 
@@ -1298,32 +1298,54 @@
 %0A      query: %7B%0A
+        limit: 10000,%0A
         name: 'm

revert loaders, fix hotloading