Skip to content

Commit 7c912b5

Browse files
arunodagaearon
authored andcommitted
Add a hash to media files even in the devmode. (facebook#446)
This will work correctly when there are duplicate filenames in different paths. Fixes: facebook#445
1 parent 60178ac commit 7c912b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/webpack.config.dev.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module.exports = {
131131
exclude: /\/favicon.ico$/,
132132
loader: 'file',
133133
query: {
134-
name: 'static/media/[name].[ext]'
134+
name: 'static/media/[name].[hash:8].[ext]'
135135
}
136136
},
137137
// A special case for favicon.ico to place it into build root directory.
@@ -151,7 +151,7 @@ module.exports = {
151151
loader: 'url',
152152
query: {
153153
limit: 10000,
154-
name: 'static/media/[name].[ext]'
154+
name: 'static/media/[name].[hash:8].[ext]'
155155
}
156156
},
157157
// "html" loader is used to process template page (index.html) to resolve

0 commit comments

Comments
 (0)