Commit 15feb02e authored by Bogdan Soare's avatar Bogdan Soare Committed by Dan Abramov
Browse files

Use file-loader for svgs (#1180)

parent d8dfdb01
No related merge requests found
Showing with 23 additions and 2 deletions
+23 -2
......@@ -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]'
}
}
]
},
......
......@@ -138,7 +138,8 @@ module.exports = {
/\.html$/,
/\.(js|jsx)$/,
/\.css$/,
/\.json$/
/\.json$/,
/\.svg$/
],
loader: 'url',
query: {
......@@ -180,6 +181,14 @@ module.exports = {
{
test: /\.json$/,
loader: 'json'
},
// "file" loader for svg
{
test: /\.svg$/,
loader: 'file',
query: {
name: 'static/media/[name].[hash:8].[ext]'
}
}
]
},
......
......@@ -76,6 +76,7 @@ npm run build
test -e build/*.html
test -e build/static/js/*.js
test -e build/static/css/*.css
test -e build/static/media/*.svg
test -e build/favicon.ico
# Run tests with CI flag
......@@ -140,6 +141,7 @@ npm run build
test -e build/*.html
test -e build/static/js/*.js
test -e build/static/css/*.css
test -e build/static/media/*.svg
test -e build/favicon.ico
# Run tests with CI flag
......@@ -169,6 +171,7 @@ npm run build
test -e build/*.html
test -e build/static/js/*.js
test -e build/static/css/*.css
test -e build/static/media/*.svg
test -e build/favicon.ico
# Run tests, overring the watch option to disable it.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment