get cache-busted url for languages.json through file-loader requiring it

This commit is contained in:
Bruno Windels 2019-02-18 16:13:24 +01:00
parent d40da42268
commit f240efb36d

View file

@ -338,8 +338,9 @@ export function getCurrentLanguage() {
function getLangsJson() {
return new Promise((resolve, reject) => {
const url = require("../../riot-web/webapp/i18n/languages.json");
request(
{ method: "GET", url: i18nFolder + 'languages.json' },
{ method: "GET", url },
(err, response, body) => {
if (err || response.status < 200 || response.status >= 300) {
reject({err: err, response: response});