From 070cc77e0fb1230e7d0335fbdbbe7a3bdf344a14 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 18 Feb 2019 16:12:04 +0100 Subject: [PATCH] add content hash to languages.json file using webpack file-loader --- webpack.config.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 6786d9e492..0aa43fddce 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -60,6 +60,20 @@ module.exports = { use: "css-loader", }), }, + { + // cache-bust languages.json file placed in + // riot-web/webapp/i18n during build by copy-res.js + test: /\.*languages.json$/, + type: "javascript/auto", + use: [ + { + loader: 'file-loader', + options: { + name: 'i18n/[name].[hash:7].[ext]', + }, + }, + ], + }, { test: /\.(gif|png|svg|ttf|xml|ico)$/, // Use a content-based hash in the name so that we can set a long cache