From b5d7beaa97b5c010e8527a8fc7420c481b283782 Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 8 Oct 2019 12:00:58 +0200 Subject: [PATCH] Fix favicon.ico in UI dev mode --- client/webpack.local.config.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/webpack.local.config.js b/client/webpack.local.config.js index 47f9a8e19..8a35bde16 100644 --- a/client/webpack.local.config.js +++ b/client/webpack.local.config.js @@ -95,9 +95,18 @@ module.exports = { } }, { - test: /\.(ttf|eot|svg|ico)(\?v=[0-9]\.[0-9]\.[0-9])?$/, + test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'file-loader' }, + { + test: /\.(ico)(\?v=[0-9]\.[0-9]\.[0-9])?$/, + loader: 'file-loader', + options: { + // Handle favicon.ico separately as it needs to preserve its name to be applied correctly. + // See https://github.com/coryhouse/react-slingshot/issues/128#issuecomment-216363426. + name: '[name].[ext]', + }, + }, { test: /\.jsx?$/, exclude: /node_modules|vendor/,