Skip to content

Commit d624756

Browse files
arunodagaearon
authored andcommitted
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
1 parent 9e37917 commit d624756

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
@@ -129,7 +129,7 @@ module.exports = {
129129
include: [paths.appSrc, paths.appNodeModules],
130130
loader: 'file',
131131
query: {
132-
name: 'static/media/[name].[ext]'
132+
name: 'static/media/[name].[hash:8].[ext]'
133133
}
134134
},
135135
// "url" loader works just like "file" loader but it also embeds
@@ -140,7 +140,7 @@ module.exports = {
140140
loader: 'url',
141141
query: {
142142
limit: 10000,
143-
name: 'static/media/[name].[ext]'
143+
name: 'static/media/[name].[hash:8].[ext]'
144144
}
145145
}
146146
]

0 commit comments

Comments
 (0)