Newer
Older
dmpopidor / config / webpack / loaders / assets.js
@Bodacious Bodacious on 19 Oct 2018 302 bytes Update asset structure with webpacker gem
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]'
    }
  }]
}