mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge remote-tracking branch 'upstream/master' into sc
This commit is contained in:
commit
cda12122dd
42
CHANGELOG.md
42
CHANGELOG.md
@ -1,3 +1,35 @@
|
||||
Changes in [1.7.26](https://github.com/vector-im/element-web/releases/tag/v1.7.26) (2021-04-26)
|
||||
===============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.26-rc.1...v1.7.26)
|
||||
|
||||
* Upgrade to React SDK 3.19.0 and JS SDK 10.0.0
|
||||
|
||||
Changes in [1.7.26-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.26-rc.1) (2021-04-21)
|
||||
=========================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.25...v1.7.26-rc.1)
|
||||
|
||||
* Upgrade to React SDK 3.19.0-rc.1 and JS SDK 10.0.0-rc.1
|
||||
* Translations update from Weblate
|
||||
[\#17031](https://github.com/vector-im/element-web/pull/17031)
|
||||
* Bump ssri from 6.0.1 to 6.0.2
|
||||
[\#17010](https://github.com/vector-im/element-web/pull/17010)
|
||||
* Fix `NODE_ENV` value for CI environments
|
||||
[\#17003](https://github.com/vector-im/element-web/pull/17003)
|
||||
* Use React production mode in CI builds
|
||||
[\#16969](https://github.com/vector-im/element-web/pull/16969)
|
||||
* Labs documentation for DND mode
|
||||
[\#16962](https://github.com/vector-im/element-web/pull/16962)
|
||||
* Rename blackboxing to new option ignore list
|
||||
[\#16965](https://github.com/vector-im/element-web/pull/16965)
|
||||
* Remove velocity-animate from lockfile
|
||||
[\#16963](https://github.com/vector-im/element-web/pull/16963)
|
||||
* Add mobile download link configuration
|
||||
[\#16890](https://github.com/vector-im/element-web/pull/16890)
|
||||
* Switch develop to not-staging Scalar by default
|
||||
[\#16883](https://github.com/vector-im/element-web/pull/16883)
|
||||
* Support a config option to skip login/welcome and go to SSO
|
||||
[\#16880](https://github.com/vector-im/element-web/pull/16880)
|
||||
|
||||
Changes in [1.7.25](https://github.com/vector-im/element-web/releases/tag/v1.7.25) (2021-04-12)
|
||||
===============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.25-rc.1...v1.7.25)
|
||||
@ -90,12 +122,12 @@ Changes in [1.7.22](https://github.com/vector-im/element-web/releases/tag/v1.7.2
|
||||
|
||||
## Security notice
|
||||
|
||||
Element Web 1.7.22 fixes (by upgrading to matrix-react-sdk 3.15.0) a low
|
||||
Element Web 1.7.22 fixes (by upgrading to matrix-react-sdk 3.15.0) a moderate
|
||||
severity issue (CVE-2021-21320) where the user content sandbox can be abused to
|
||||
trick users into opening unexpected documents. The content is opened with a
|
||||
`blob` origin that cannot access Matrix user data, so messages and secrets are
|
||||
not at risk. Thanks to @keerok for responsibly disclosing this via Matrix's
|
||||
Security Disclosure Policy.
|
||||
trick users into opening unexpected documents after several user interactions.
|
||||
The content can be opened with a `blob` origin from the Matrix client, so it is
|
||||
possible for a malicious document to access user messages and secrets. Thanks to
|
||||
@keerok for responsibly disclosing this via Matrix's Security Disclosure Policy.
|
||||
|
||||
## All changes
|
||||
|
||||
|
@ -22,6 +22,9 @@ For a good example, see https://develop.element.io/config.json.
|
||||
`default_hs_url` is specified. When multiple sources are specified, it is unclear
|
||||
which should take priority and therefore the application cannot continue.
|
||||
* As of Element 1.4.0, identity servers are optional. See [Identity servers](#identity-servers) below.
|
||||
1. `sso_immediate_redirect`: When `true`, Element will assume the default server supports SSO
|
||||
and attempt to send the user there to continue (if they aren't already logged in). Default
|
||||
`false`. Note that this disables all usage of the welcome page.
|
||||
1. `features`: Lookup of optional features that may be force-enabled (`true`) or force-disabled (`false`).
|
||||
When features are not listed here, their defaults will be used, and users can turn them on/off if `showLabsSettings`
|
||||
allows them to. The available optional experimental features vary from release to release and are
|
||||
@ -113,6 +116,16 @@ For a good example, see https://develop.element.io/config.json.
|
||||
1. `logo`: An HTTP URL to the avatar for the desktop build. Should be 24x24, ideally
|
||||
an SVG.
|
||||
1. `url`: An HTTP URL for where to send the user to download the desktop build.
|
||||
1. `mobileBuilds`: Used to alter promotional links to the mobile app. By default the
|
||||
builds are considered available and accessible from https://element.io. This config
|
||||
option is typically used in a context of encouraging the user to try the mobile app
|
||||
instead of a mobile/incompatible browser.
|
||||
1. `ios`: The URL to the iOS build. If `null`, it will be assumed to be not available.
|
||||
If not set, the default element.io builds will be used.
|
||||
1. `android`: The URL to the Android build. If `null`, it will be assumed to be not available.
|
||||
If not set, the default element.io builds will be used.
|
||||
1. `fdroid`: The URL to the FDroid build. If `null`, it will be assumed to be not available.
|
||||
If not set, the default element.io builds will be used.
|
||||
1. `mobileGuideToast`: Whether to show a toast a startup which nudges users on
|
||||
iOS and Android towards the native mobile apps. The toast redirects to the
|
||||
mobile guide if they accept. Defaults to false.
|
||||
|
@ -130,3 +130,8 @@ An in-progress implementation of [MSC2516](https://github.com/matrix-org/matrix-
|
||||
[voice messages](https://github.com/vector-im/element-web/issues/1358) to Element. Note that this feature
|
||||
is currently under active development and therefore is entirely incomplete and may not work at all - it
|
||||
is not recommended for general use at this time.
|
||||
|
||||
## Do not disturb (`feature_dnd`)
|
||||
|
||||
Enables UI for turning on "do not disturb" mode for the current device. When DND mode is engaged, popups
|
||||
and notification noises are suppressed. Not perfect, but can help reduce noise.
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"default_server_name": "matrix.org",
|
||||
"brand": "Element",
|
||||
"integrations_ui_url": "https://scalar-staging.vector.im/",
|
||||
"integrations_rest_url": "https://scalar-staging.vector.im/api",
|
||||
"integrations_ui_url": "https://scalar.vector.im/",
|
||||
"integrations_rest_url": "https://scalar.vector.im/api",
|
||||
"integrations_widgets_urls": [
|
||||
"https://scalar.vector.im/_matrix/integrations/v1",
|
||||
"https://scalar.vector.im/api",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "schildichat-web",
|
||||
"version": "1.7.25-sc1",
|
||||
"version": "1.7.26-sc1",
|
||||
"description": "A Matrix Client based on Element with a more traditional instant messaging experience",
|
||||
"author": "SchildiChat",
|
||||
"repository": {
|
||||
@ -58,8 +58,8 @@
|
||||
"highlight.js": "^10.5.0",
|
||||
"jsrsasign": "^10.1.5",
|
||||
"katex": "^0.12.0",
|
||||
"matrix-js-sdk": "9.11.0",
|
||||
"matrix-react-sdk": "3.18.0",
|
||||
"matrix-js-sdk": "10.0.0",
|
||||
"matrix-react-sdk": "3.19.0",
|
||||
"matrix-widget-api": "^0.1.0-beta.13",
|
||||
"olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz",
|
||||
"prop-types": "^15.7.2",
|
||||
|
@ -14,4 +14,4 @@ JSSDK_SHA=$(cd node_modules/matrix-js-sdk; git rev-parse --short=12 HEAD)
|
||||
|
||||
VECTOR_SHA=$(git rev-parse --short=12 HEAD) # use the ACTUAL SHA rather than assume develop
|
||||
|
||||
CI_PACKAGE=true DIST_VERSION=$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA scripts/package.sh -d
|
||||
CI_PACKAGE=true DIST_VERSION=$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA scripts/package.sh
|
||||
|
@ -27,7 +27,55 @@ interface IProps {
|
||||
}
|
||||
|
||||
const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
|
||||
const brand = SdkConfig.get().brand;
|
||||
const {brand, mobileBuilds} = SdkConfig.get();
|
||||
|
||||
let ios = null;
|
||||
const iosCustomUrl = mobileBuilds?.ios;
|
||||
if (iosCustomUrl !== null) { // could be undefined or a string
|
||||
ios = <>
|
||||
<p><strong>iOS</strong> (iPhone or iPad)</p>
|
||||
<a
|
||||
href={iosCustomUrl || "https://apps.apple.com/app/vector/id1083446067"}
|
||||
target="_blank"
|
||||
className="mx_ClearDecoration"
|
||||
>
|
||||
<img height="48" src="themes/element/img/download/apple.svg" alt="Apple App Store" />
|
||||
</a>
|
||||
</>;
|
||||
}
|
||||
|
||||
let android = [<p className="mx_Spacer" key="header"><strong>Android</strong></p>];
|
||||
const andCustomUrl = mobileBuilds?.android;
|
||||
const fdroidCustomUrl = mobileBuilds?.fdroid;
|
||||
if (andCustomUrl !== null) { // undefined or string
|
||||
android.push(<a
|
||||
href={andCustomUrl || "https://play.google.com/store/apps/details?id=im.vector.app"}
|
||||
target="_blank"
|
||||
className="mx_ClearDecoration"
|
||||
key="android"
|
||||
>
|
||||
<img height="48" src="themes/element/img/download/google.svg" alt="Google Play Store" />
|
||||
</a>);
|
||||
}
|
||||
if (fdroidCustomUrl !== null) { // undefined or string
|
||||
android.push(<a
|
||||
href={fdroidCustomUrl || "https://f-droid.org/repository/browse/?fdid=im.vector.app"}
|
||||
target="_blank"
|
||||
className="mx_ClearDecoration"
|
||||
key="fdroid"
|
||||
>
|
||||
<img height="48" src="themes/element/img/download/fdroid.svg" alt="F-Droid" />
|
||||
</a>);
|
||||
}
|
||||
if (android.length === 1) { // just a header, meaning no links
|
||||
android = [];
|
||||
}
|
||||
|
||||
let mobileHeader = <h2 id="step2_heading">{_t("Use %(brand)s on mobile", {brand})}</h2>;
|
||||
if (!android.length && !ios) {
|
||||
mobileHeader = null;
|
||||
}
|
||||
|
||||
return <div className="mx_ErrorView">
|
||||
<div className="mx_ErrorView_container">
|
||||
<div className="mx_HomePage_header">
|
||||
|
@ -16,7 +16,7 @@
|
||||
"Go to your browser to complete Sign In": "Gehe zu deinem Browser, um die Anmeldung abzuschließen",
|
||||
"Open user settings": "Benutzereinstellungen öffnen",
|
||||
"Unable to load config file: please refresh the page to try again.": "Konfigurationsdatei kann nicht geladen werden: Bitte aktualisiere die Seite, um es erneut zu versuchen.",
|
||||
"Missing indexeddb worker script!": "Fehlendes indexeddb Worker-Skript!",
|
||||
"Missing indexeddb worker script!": "Fehlendes indexeddb-Arbeitsskript!",
|
||||
"Previous/next recently visited room or community": "Vorheriger/nächster kürzlich besuchter Raum oder Community",
|
||||
"Unsupported browser": "Nicht unterstützter Browser",
|
||||
"Go to element.io": "Gehe zu element.io",
|
||||
@ -24,11 +24,11 @@
|
||||
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)",
|
||||
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
|
||||
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Bitte installiere <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink> oder <safariLink>Safari</safariLink> für das beste Erlebnis.",
|
||||
"You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.": "Du kannst deinen aktuellen Browser weiterhin verwenden, es kann aber sein, dass einige oder alle Funktionen nicht verfügbar sind und dass Aussehen und Bedienung der Anwendung nicht korrekt sind.",
|
||||
"You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.": "Du kannst deinen aktuellen Browser weiterhin verwenden. Es ist aber möglich, dass nicht alles richtig funktioniert oder das Aussehen der App inkorrekt ist.",
|
||||
"I understand the risks and wish to continue": "Ich verstehe die Risiken und möchte fortfahren",
|
||||
"Your Element is misconfigured": "Dein SchildiChat ist falsch konfiguriert",
|
||||
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Deine SchildiChat-Konfiguration enthält ungültiges JSON. Bitte korrigiere das Problem und lade die Seite neu.",
|
||||
"Download Completed": "Download fertiggestellt",
|
||||
"Download Completed": "Download abgeschlossen",
|
||||
"Open": "Öffnen",
|
||||
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s verwendet erweiterte Browserfunktionen, die von deinem aktuellen Browser nicht unterstützt werden.",
|
||||
"Your browser can't run %(brand)s": "Dein Browser kann %(brand)s nicht ausführen",
|
||||
|
@ -19,6 +19,7 @@
|
||||
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
|
||||
"You need to be using HTTPS to place a screen-sharing call.": "You need to be using HTTPS to place a screen-sharing call.",
|
||||
"Powered by Matrix": "Powered by Matrix",
|
||||
"Use %(brand)s on mobile": "Use %(brand)s on mobile",
|
||||
"Unsupported browser": "Unsupported browser",
|
||||
"Your browser can't run %(brand)s": "Your browser can't run %(brand)s",
|
||||
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s uses advanced browser features which aren't supported by your current browser.",
|
||||
|
@ -32,5 +32,6 @@
|
||||
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Sinu SchildiChat'i seadistustes on vigased JSON-vormingus andmed. Palun paranda see viga ja laadi leht uuesti.",
|
||||
"Your browser can't run %(brand)s": "%(brand)s ei toimi sinu brauseris",
|
||||
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s kasutab mitmeid uusi brauseri-põhiseid tehnoloogiaid, mis ei ole veel sinu veebibrauseris toetatud.",
|
||||
"Powered by Matrix": "Põhineb Matrix'il"
|
||||
"Powered by Matrix": "Põhineb Matrix'il",
|
||||
"Use %(brand)s on mobile": "Kasuta %(brand)s rakendust nutiseadmes"
|
||||
}
|
||||
|
@ -10,5 +10,27 @@
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Messatjariá chifrada, descentralizada e collaborativa propulsada per [matrix]",
|
||||
"Sign In": "Se connectar",
|
||||
"Create Account": "Crear un compte",
|
||||
"Explore rooms": "Percórrer las salas"
|
||||
"Explore rooms": "Percórrer las salas",
|
||||
"Missing indexeddb worker script!": "Lo worker script IndexedDB manca !",
|
||||
"Invalid configuration: no default server specified.": "Configuracion invalida : pas de servidor per defauta especificat.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuracion invalida : podètz unicament especificar un camp entre default_server_config, default_server_name, o default_hs_url.",
|
||||
"Failed to start": "Non se pòt pas lançar",
|
||||
"Go to element.io": "Anar a element.io",
|
||||
"I understand the risks and wish to continue": "Compréni los risques e vòli contunhar",
|
||||
"You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.": "Podètz contunhar a utilizar lo vòstre navigator actual, mas qualques o totes las foncionalitats o/e l'apparéncia poirián mal foncionar .",
|
||||
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Si vos plai installatz <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, o <safariLink>Safari</safariLink> per una melhora experiéncia.",
|
||||
"Your browser can't run %(brand)s": "Lo vòstre navigator non pòt pas executar %(brand)s",
|
||||
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s utiliza de foncions avançadas que lo vòstre navigator non suporta pas.",
|
||||
"Unsupported browser": "Navigator incompatible",
|
||||
"Powered by Matrix": "Fonciona ambé Matrix",
|
||||
"You need to be using HTTPS to place a screen-sharing call.": "Devetz utilizar HTTPS per apelar ambé partatge d'ecran.",
|
||||
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
|
||||
"%(brand)s Desktop (%(platformName)s)": "%(brand)s de burèu (%(platformName)s)",
|
||||
"Previous/next recently visited room or community": "Sala o comunautat recentament visitada precedenta/seguenta",
|
||||
"Open user settings": "Dobrir los paramètres utilizaire",
|
||||
"Open": "Dobrir",
|
||||
"Download Completed": "Descargament acabat",
|
||||
"Unable to load config file: please refresh the page to try again.": "Se pòt pas cargar lo fichièr de configuracion : si vos plai actualizatz la pagina per tornar ensajar.",
|
||||
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "La configuracion d'Element conténe de JSON invalid. Si vos plai corregitz lo problème e actualizatz la pagina.",
|
||||
"Your Element is misconfigured": "Lo vòstre Element es mal configurat"
|
||||
}
|
||||
|
@ -1,13 +1,19 @@
|
||||
{
|
||||
"powered by Matrix": "ใช้เทคโนโลยี Matrix",
|
||||
"Dismiss": "ไม่สนใจ",
|
||||
"Dismiss": "ปิด",
|
||||
"Unknown device": "อุปกรณ์ที่ไม่รู้จัก",
|
||||
"You need to be using HTTPS to place a screen-sharing call.": "คุณต้องใช้ HTTPS เพื่อเริ่มติดต่อแบบแบ่งปันหน้าจอ",
|
||||
"Welcome to Element": "ยินดีต้อนรับสู่ SchildiChat",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "ระบบแชทและประสานงาน ไร้ศูนย์กลางและเข้ารหัสได้ โดยใช้เทคโนโลยีจาก [matrix]",
|
||||
"The message from the parser is: %(message)s": "ข้อความจากparserคือ:%(message)s",
|
||||
"The message from the parser is: %(message)s": "ข้อความจากตัวแยกวิเคราะห์คือ: %(message)s",
|
||||
"Invalid JSON": "JSON ไม่ถูกต้อง",
|
||||
"Sign In": "เข้าสู่ระบบ",
|
||||
"Sign In": "ลงชื่อเข้า",
|
||||
"Create Account": "สร้างบัญชี",
|
||||
"Explore rooms": "สำรวจห้อง"
|
||||
"Explore rooms": "สำรวจห้อง",
|
||||
"Download Completed": "การดาวน์โหลดเสร็จสมบูรณ์",
|
||||
"Open user settings": "เปิดการตั้งค่าผู้ใช้",
|
||||
"Go to element.io": "ไปยัง element.io",
|
||||
"Failed to start": "ไม่สามารถเริ่ม",
|
||||
"Open": "เปิด",
|
||||
"Powered by Matrix": "ขับเคลื่อนโดย Matrix"
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
|
||||
import {parseQs, parseQsFromFragment} from './url_utils';
|
||||
import VectorBasePlatform from "./platform/VectorBasePlatform";
|
||||
import {createClient} from "matrix-js-sdk/src/matrix";
|
||||
|
||||
let lastLocationHashSet: string = null;
|
||||
|
||||
@ -153,6 +154,26 @@ export async function loadApp(fragParams: {}) {
|
||||
|
||||
// Don't bother loading the app until the config is verified
|
||||
const config = await verifyServerConfig();
|
||||
|
||||
// Before we continue, let's see if we're supposed to do an SSO redirect
|
||||
const [userId] = await Lifecycle.getStoredSessionOwner();
|
||||
const hasPossibleToken = !!userId;
|
||||
const isReturningFromSso = !!params.loginToken;
|
||||
const autoRedirect = config['sso_immediate_redirect'] === true;
|
||||
if (!hasPossibleToken && !isReturningFromSso && autoRedirect) {
|
||||
console.log("Bypassing app load to redirect to SSO");
|
||||
const tempCli = createClient({
|
||||
baseUrl: config['validated_server_config'].hsUrl,
|
||||
idBaseUrl: config['validated_server_config'].isUrl,
|
||||
});
|
||||
PlatformPeg.get().startSingleSignOn(tempCli, "sso", `/${getScreenFromLocation(window.location).screen}`);
|
||||
|
||||
// We return here because startSingleSignOn() will asynchronously redirect us. We don't
|
||||
// care to wait for it, and don't want to show any UI while we wait (not even half a welcome
|
||||
// page). As such, just don't even bother loading the MatrixChat component.
|
||||
return;
|
||||
}
|
||||
|
||||
const MatrixChat = sdk.getComponent('structures.MatrixChat');
|
||||
return <MatrixChat
|
||||
onNewScreen={onNewScreen}
|
||||
|
@ -36,7 +36,7 @@ export function initRageshake() {
|
||||
prom.then(() => {
|
||||
console.log("Initialised rageshake.");
|
||||
console.log("To fix line numbers in Chrome: " +
|
||||
"Meatball menu → Settings → Blackboxing → Add /rageshake\\.js$");
|
||||
"Meatball menu → Settings → Ignore list → Add /rageshake\\.js$");
|
||||
|
||||
window.addEventListener('beforeunload', (e) => {
|
||||
console.log('element-web closing');
|
||||
|
@ -5,19 +5,27 @@ const TerserPlugin = require('terser-webpack-plugin');
|
||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||
const webpack = require("webpack");
|
||||
|
||||
let og_image_url = process.env.RIOT_OG_IMAGE_URL;
|
||||
if (!og_image_url) og_image_url = 'https://app.schildi.chat/themes/element/img/logos/opengraph.png';
|
||||
let ogImageUrl = process.env.RIOT_OG_IMAGE_URL;
|
||||
if (!ogImageUrl) ogImageUrl = 'https://app.schildi.chat/themes/element/img/logos/opengraph.png';
|
||||
|
||||
const additionalPlugins = [
|
||||
// This is where you can put your customisation replacements.
|
||||
];
|
||||
|
||||
module.exports = (env, argv) => {
|
||||
let nodeEnv = argv.mode;
|
||||
if (process.env.CI_PACKAGE) {
|
||||
// Don't run minification for CI builds (this is only set for runs on develop)
|
||||
// We override this via environment variable to avoid duplicating the scripts
|
||||
// in `package.json` just for a different mode.
|
||||
argv.mode = "development";
|
||||
|
||||
// More and more people are using nightly build as their main client
|
||||
// Libraries like React have a development build that is useful
|
||||
// when working on the app but adds significant runtime overhead
|
||||
// We want to use the React production build but not compile the whole
|
||||
// application to productions standards
|
||||
nodeEnv = "production";
|
||||
}
|
||||
|
||||
const development = {};
|
||||
@ -80,6 +88,10 @@ module.exports = (env, argv) => {
|
||||
// we use a CSS optimizer too and need to manage it ourselves.
|
||||
minimize: argv.mode === 'production',
|
||||
minimizer: argv.mode === 'production' ? [new TerserPlugin({}), new OptimizeCSSAssetsPlugin({})] : [],
|
||||
|
||||
// Set the value of `process.env.NODE_ENV` for libraries like React
|
||||
// See also https://v4.webpack.js.org/configuration/optimization/#optimizationnodeenv
|
||||
nodeEnv,
|
||||
},
|
||||
|
||||
resolve: {
|
||||
@ -152,8 +164,8 @@ module.exports = (env, argv) => {
|
||||
},
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
cacheDirectory: true
|
||||
}
|
||||
cacheDirectory: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
@ -164,7 +176,7 @@ module.exports = (env, argv) => {
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
sourceMap: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
@ -202,7 +214,7 @@ module.exports = (env, argv) => {
|
||||
"local-plugins": true,
|
||||
},
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
@ -213,7 +225,7 @@ module.exports = (env, argv) => {
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
sourceMap: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
@ -241,7 +253,7 @@ module.exports = (env, argv) => {
|
||||
"local-plugins": true,
|
||||
},
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.wasm$/,
|
||||
@ -311,7 +323,7 @@ module.exports = (env, argv) => {
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
@ -332,7 +344,7 @@ module.exports = (env, argv) => {
|
||||
excludeChunks: ['mobileguide', 'usercontent', 'jitsi'],
|
||||
minify: argv.mode === 'production',
|
||||
vars: {
|
||||
og_image_url: og_image_url,
|
||||
og_image_url: ogImageUrl,
|
||||
},
|
||||
}),
|
||||
|
||||
@ -438,6 +450,7 @@ function getAssetOutputPath(url, resourcePath) {
|
||||
* be placed directly into things like CSS files.
|
||||
*
|
||||
* @param {string} path Some path to a file.
|
||||
* @returns {string} converted path
|
||||
*/
|
||||
function toPublicPath(path) {
|
||||
return path.replace(/\\/g, '/');
|
||||
|
30
yarn.lock
30
yarn.lock
@ -7506,10 +7506,10 @@ mathml-tag-names@^2.1.3:
|
||||
resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3"
|
||||
integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==
|
||||
|
||||
matrix-js-sdk@9.11.0:
|
||||
version "9.11.0"
|
||||
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.11.0.tgz#57ba60dfbcf2b32917eb6d7232d0e81cf0de0d3a"
|
||||
integrity sha512-wP28ybOxyQ7lbC48QddRORYr8atEwbTqDOsu8H6u9jTTgB2qqczI/bkSoXHtutODuSeLY5x0UuwLcxVCy4yxVQ==
|
||||
matrix-js-sdk@10.0.0:
|
||||
version "10.0.0"
|
||||
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-10.0.0.tgz#571e97c8d8351715ac609ccedd38cad79d0b752e"
|
||||
integrity sha512-40QN9HITqWBSYi/e8QQidDL6UOhWBpst437i+lHIqQ8a7SQtbcquDSRXWR22BjM2qbssR+02zfrLI/Kez7IoBQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
another-json "^0.2.0"
|
||||
@ -7529,10 +7529,10 @@ matrix-mock-request@^1.2.3:
|
||||
bluebird "^3.5.0"
|
||||
expect "^1.20.2"
|
||||
|
||||
matrix-react-sdk@3.18.0:
|
||||
version "3.18.0"
|
||||
resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.18.0.tgz#119b0a908974e46ad9973aa7c4ea10ee06fab2b4"
|
||||
integrity sha512-RkivwI4Rv+l93tmj3GK1XDK9hGAoIILcQZ+rr1cQ1AymmFSwF/mQLVJICewLZCcp2FP9osJg75/JbmPBaurxdw==
|
||||
matrix-react-sdk@3.19.0:
|
||||
version "3.19.0"
|
||||
resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.19.0.tgz#45e5794f9dae9b8fd6bdc2862ffd6e3a6650e282"
|
||||
integrity sha512-xCRtq0u+qyYIAU/rUt7oQU0+sQboT1q1RRBzEvKca2usQRFH+EV4ahh97GCgg+u2IDiYb83bcVPcB4lGcCVLjg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
await-lock "^2.1.0"
|
||||
@ -7560,7 +7560,7 @@ matrix-react-sdk@3.18.0:
|
||||
katex "^0.12.0"
|
||||
linkifyjs "^2.1.9"
|
||||
lodash "^4.17.20"
|
||||
matrix-js-sdk "9.11.0"
|
||||
matrix-js-sdk "10.0.0"
|
||||
matrix-widget-api "^0.1.0-beta.13"
|
||||
minimist "^1.2.5"
|
||||
opus-recorder "^8.0.3"
|
||||
@ -7582,7 +7582,6 @@ matrix-react-sdk@3.18.0:
|
||||
tar-js "^0.3.0"
|
||||
text-encoding-utf-8 "^1.0.2"
|
||||
url "^0.11.0"
|
||||
velocity-animate "^2.0.6"
|
||||
what-input "^5.2.10"
|
||||
zxcvbn "^4.4.2"
|
||||
|
||||
@ -11059,9 +11058,9 @@ sshpk@^1.7.0:
|
||||
tweetnacl "~0.14.0"
|
||||
|
||||
ssri@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
|
||||
integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==
|
||||
version "6.0.2"
|
||||
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5"
|
||||
integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==
|
||||
dependencies:
|
||||
figgy-pudding "^3.5.1"
|
||||
|
||||
@ -12103,11 +12102,6 @@ vary@~1.1.2:
|
||||
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
|
||||
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
|
||||
|
||||
velocity-animate@^2.0.6:
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/velocity-animate/-/velocity-animate-2.0.6.tgz#1811ca14df7fbbef05740256f6cec0fd1b76575f"
|
||||
integrity sha512-tU+/UtSo3GkIjEfk2KM4e24DvpgX0+FzfLr7XqNwm9BCvZUtbCHPq/AFutx/Mkp2bXlUS9EcX8yxu8XmzAv2Kw==
|
||||
|
||||
vendors@^1.0.0:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e"
|
||||
|
Loading…
Reference in New Issue
Block a user