about summary refs log blame commit diff
path: root/config/webpack/loaders/assets.js
blob: 643b3eeb0a8ad65d54f413c7bc626aef54593da5 (plain) (tree)
1
2
3
4
5
6
7
8
                                                           





                                                        


                                                                                   
const { env, publicPath } = require('../configuration.js');

module.exports = {
  test: /\.(jpg|jpeg|png|gif|svg|eot|ttf|woff|woff2)$/i,
  use: [{
    loader: 'file-loader',
    options: {
      publicPath,
      name: env.NODE_ENV === 'production' ? '[name]-[hash].[ext]' : '[name].[ext]',
    },
  }],
};