From 33858c8aff26f4198fed488be3e7a6d43d80d005 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 18 Feb 2019 16:26:04 +0100 Subject: [PATCH] move this path to webpack config file otherwise react-sdk wouldn't be able to build anymore without riot-web in a specific location --- src/languageHandler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languageHandler.js b/src/languageHandler.js index e462f05eda..33f703c204 100644 --- a/src/languageHandler.js +++ b/src/languageHandler.js @@ -338,9 +338,9 @@ export function getCurrentLanguage() { function getLangsJson() { return new Promise((resolve, reject) => { - const url = require("../../riot-web/webapp/i18n/languages.json"); + // LANGUAGES_FILE is a webpack compile-time define, see webpack config request( - { method: "GET", url }, + { method: "GET", url: require(LANGUAGES_FILE) }, (err, response, body) => { if (err || response.status < 200 || response.status >= 300) { reject({err: err, response: response});