Skip to content

Commit 070cc77

Browse files
committed
add content hash to languages.json file using webpack file-loader
1 parent 878190b commit 070cc77

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

webpack.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,20 @@ module.exports = {
6060
use: "css-loader",
6161
}),
6262
},
63+
{
64+
// cache-bust languages.json file placed in
65+
// riot-web/webapp/i18n during build by copy-res.js
66+
test: /\.*languages.json$/,
67+
type: "javascript/auto",
68+
use: [
69+
{
70+
loader: 'file-loader',
71+
options: {
72+
name: 'i18n/[name].[hash:7].[ext]',
73+
},
74+
},
75+
],
76+
},
6377
{
6478
test: /\.(gif|png|svg|ttf|xml|ico)$/,
6579
// Use a content-based hash in the name so that we can set a long cache

0 commit comments

Comments
 (0)