Use file-loader for svgs (#1180)

This commit is contained in:
Bogdan Soare
2016-12-06 18:07:50 +02:00
committed by Dan Abramov
parent d8dfdb01c7
commit 15feb02e9c
3 changed files with 23 additions and 2 deletions

View File

@@ -131,7 +131,8 @@ module.exports = {
/\.html$/,
/\.(js|jsx)$/,
/\.css$/,
/\.json$/
/\.json$/,
/\.svg$/
],
loader: 'url',
query: {
@@ -169,6 +170,14 @@ module.exports = {
{
test: /\.json$/,
loader: 'json'
},
// "file" loader for svg
{
test: /\.svg$/,
loader: 'file',
query: {
name: 'static/media/[name].[hash:8].[ext]'
}
}
]
},