import {assetsPath} from '../helper';

const URL_LOADER = [
  {
    test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
    loader: 'url-loader',
    options: {
      limit: 10000,
      name: assetsPath(`${config.paths.target.img}/[name].[hash:7].[ext]`)
    }
  }, {
    test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
    loader: 'url-loader',
    options: {
      limit: 10000,
      name: assetsPath(`${config.paths.target.font}/[name].[hash:7].[ext]`)
    }
  }
];

export default URL_LOADER;

@@ -32,16 +32,98 @@
 lper';%0A%0A
+let filename = config.production%0A  ? '%5Bname%5D.%5Bhash:7%5D.%5Bext%5D'%0A  : '%5Bname%5D.%5Bext%5D';%0A%0A
 const UR
@@ -294,37 +294,27 @@
 et.img%7D/
-%5Bname%5D.%5Bhash:7%5D.%5Bext%5D
+$%7Bfilename%7D
 %60)%0A    %7D
@@ -478,37 +478,27 @@
 t.font%7D/
-%5Bname%5D.%5Bhash:7%5D.%5Bext%5D
+$%7Bfilename%7D
 %60)%0A    %7D

update filename