scinote-web/config/webpack/loaders/assets.js

13 lines
302 B
JavaScript
Raw Normal View History

2017-07-12 22:41:55 +08:00
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]'
}
}]
}