move this path to webpack config file
otherwise react-sdk wouldn't be able to build anymore without riot-web in a specific location
This commit is contained in:
parent
f240efb36d
commit
33858c8aff
1 changed files with 2 additions and 2 deletions
|
@ -338,9 +338,9 @@ export function getCurrentLanguage() {
|
||||||
|
|
||||||
function getLangsJson() {
|
function getLangsJson() {
|
||||||
return new Promise((resolve, reject) => {
|
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(
|
request(
|
||||||
{ method: "GET", url },
|
{ method: "GET", url: require(LANGUAGES_FILE) },
|
||||||
(err, response, body) => {
|
(err, response, body) => {
|
||||||
if (err || response.status < 200 || response.status >= 300) {
|
if (err || response.status < 200 || response.status >= 300) {
|
||||||
reject({err: err, response: response});
|
reject({err: err, response: response});
|
||||||
|
|
Loading…
Reference in a new issue