Commit 7c912b5f authored by Arunoda Susiripala's avatar Arunoda Susiripala Committed by Dan Abramov
Browse files

Add a hash to media files even in the devmode. (#446)

This will work correctly when there are duplicate filenames in different paths.
Fixes: #445
parent 60178ac7
Showing with 2 additions and 2 deletions
+2 -2
...@@ -131,7 +131,7 @@ module.exports = { ...@@ -131,7 +131,7 @@ module.exports = {
exclude: /\/favicon.ico$/, exclude: /\/favicon.ico$/,
loader: 'file', loader: 'file',
query: { query: {
name: 'static/media/[name].[ext]' name: 'static/media/[name].[hash:8].[ext]'
} }
}, },
// A special case for favicon.ico to place it into build root directory. // A special case for favicon.ico to place it into build root directory.
...@@ -151,7 +151,7 @@ module.exports = { ...@@ -151,7 +151,7 @@ module.exports = {
loader: 'url', loader: 'url',
query: { query: {
limit: 10000, limit: 10000,
name: 'static/media/[name].[ext]' name: 'static/media/[name].[hash:8].[ext]'
} }
}, },
// "html" loader is used to process template page (index.html) to resolve // "html" loader is used to process template page (index.html) to resolve
......
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