Skip to content

Commit 53bb28d

Browse files
arunodaGeorge Czabania
authored and
George Czabania
committed
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 d295979 commit 53bb28d

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
@@ -132,7 +132,7 @@ module.exports = {
132132
exclude: /\/favicon.ico$/,
133133
loader: 'file',
134134
query: {
135-
name: 'static/media/[name].[ext]'
135+
name: 'static/media/[name].[hash:8].[ext]'
136136
}
137137
},
138138
// A special case for favicon.ico to place it into build root directory.
@@ -152,7 +152,7 @@ module.exports = {
152152
loader: 'url',
153153
query: {
154154
limit: 10000,
155-
name: 'static/media/[name].[ext]'
155+
name: 'static/media/[name].[hash:8].[ext]'
156156
}
157157
},
158158
// "html" loader is used to process template page (index.html) to resolve

0 commit comments

Comments
 (0)