Skip to content

Commit

Permalink
Hash media files in dev. (#380)
Browse files Browse the repository at this point in the history
Otherwise it'll cause issues when there are files
with identical file names in different directories.
  • Loading branch information
arunoda authored Aug 15, 2016
1 parent ccc591c commit 7ff4b7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/server/config/defaults/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ module.exports = function (storybookBaseConfig) {
include: _paths.includePaths,
loader: require.resolve('file-loader'),
query: {
name: 'static/media/[name].[ext]'
name: 'static/media/[name].[hash:8].[ext]'
}
}, {
test: /\.(mp4|webm)(\?.*)?$/,
include: _paths.includePaths,
loader: require.resolve('url-loader'),
query: {
limit: 10000,
name: 'static/media/[name].[ext]'
name: 'static/media/[name].[hash:8].[ext]'
}
}]);

Expand Down
4 changes: 2 additions & 2 deletions src/server/config/defaults/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = (storybookBaseConfig) => {
include: includePaths,
loader: require.resolve('file-loader'),
query: {
name: 'static/media/[name].[ext]',
name: 'static/media/[name].[hash:8].[ext]',
},
},
{
Expand All @@ -34,7 +34,7 @@ module.exports = (storybookBaseConfig) => {
loader: require.resolve('url-loader'),
query: {
limit: 10000,
name: 'static/media/[name].[ext]',
name: 'static/media/[name].[hash:8].[ext]',
},
},
];
Expand Down

0 comments on commit 7ff4b7f

Please sign in to comment.