mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 12:45:11 +08:00
allow setting the relative location of the language file for running the unit tests in ci, where riot-web is a subdirectory of react-sdk
This commit is contained in:
parent
223d8a87ca
commit
c2d14392b2
@ -6,6 +6,12 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
let og_image_url = process.env.RIOT_OG_IMAGE_URL;
|
||||
if (!og_image_url) og_image_url = 'https://riot.im/app/themes/riot/img/logos/riot-im-logo-black-text.png';
|
||||
|
||||
// relative to languageHandler.js in matrix-react-sdk
|
||||
let RIOT_LANGUAGES_FILE = process.env.RIOT_LANGUAGES_FILE;
|
||||
if (!RIOT_LANGUAGES_FILE) {
|
||||
RIOT_LANGUAGES_FILE = "../../riot-web/webapp/i18n/languages.json";
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
// Load babel-polyfill first to avoid issues where some imports (namely react)
|
||||
@ -162,7 +168,7 @@ module.exports = {
|
||||
'process.env': {
|
||||
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
|
||||
},
|
||||
'LANGUAGES_FILE': "'../../riot-web/webapp/i18n/languages.json'", // relative to languageHandler.js in matrix-react-sdk
|
||||
'LANGUAGES_FILE': JSON.stringify(RIOT_LANGUAGES_FILE),
|
||||
}),
|
||||
new ExtractTextPlugin("bundles/[hash]/[name].css", {
|
||||
allChunks: true,
|
||||
|
Loading…
Reference in New Issue
Block a user