diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index a8cd508d3a..0000000000
--- a/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-#### Description
-
-Describe here the problem that you are experiencing, or the feature you are requesting.
-
-#### Steps to reproduce
-
-- For bugs, list the steps
-- that reproduce the bug
-- using hyphens as bullet points
-
-Describe how what happens differs from what you expected.
-
-Log: sent/not sent?
-
-
-
-#### Version information
-
-
-
-- **Platform**: web (in-browser) or desktop?
-
-For the web app:
-
-- **Browser**: Chrome, Firefox, Safari, Edge? which version?
-- **OS**: Windows, macOS, Ubuntu, Arch Linux, etc?
-- **URL**: develop.element.io / app.element.io / somewhere else? If a private server, what version of Element Web?
-
-For the desktop app:
-
-- **OS**: Windows, macOS, Ubuntu, Arch Linux, etc?
-- **Version**: 1.x.y
diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml
new file mode 100644
index 0000000000..51d0a45814
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/enhancement.yml
@@ -0,0 +1,36 @@
+name: Enhancement request
+description: Do you have a suggestion or feature request?
+labels: [T-Enhancement]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thank you for taking the time to propose a new feature or make a suggestion.
+ - type: textarea
+ id: usecase
+ attributes:
+ label: Your use case
+ description: What would you like to be able to do? Please feel welcome to include screenshots or mock ups.
+ placeholder: Tell us what you would like to do!
+ value: |
+ #### What would you like to do?
+
+ #### Why would you like to it?
+
+ #### How would you like to achieve it?
+ validations:
+ required: true
+ - type: textarea
+ id: alternative
+ attributes:
+ label: Have you considered any alternatives?
+ placeholder: A clear and concise description of any alternative solutions or features you've considered.
+ validations:
+ required: false
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: Additional context
+ placeholder: Is there anything else you'd like to add?
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/suggestion-or-feature-request.md b/.github/ISSUE_TEMPLATE/suggestion-or-feature-request.md
deleted file mode 100644
index ffa31c6cf1..0000000000
--- a/.github/ISSUE_TEMPLATE/suggestion-or-feature-request.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: Suggestion or Feature request
-about: Suggest an idea for this project
-title: ''
-labels: T-Enhancement
-assignees: ''
-
----
-
-#### Is your suggestion related to a problem? Please describe.
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-
-#### Describe the solution you'd like.
-A clear and concise description of what you want to happen.
-
-#### Describe alternatives you've considered.
-A clear and concise description of any alternative solutions or features you've considered.
-
-#### Additional context
-Add any other context or screenshots about the feature request here.
diff --git a/.github/workflows/preview_changelog.yaml b/.github/workflows/preview_changelog.yaml
new file mode 100644
index 0000000000..d68d19361d
--- /dev/null
+++ b/.github/workflows/preview_changelog.yaml
@@ -0,0 +1,12 @@
+name: Preview Changelog
+on:
+ pull_request_target:
+ types: [ opened, edited, labeled ]
+jobs:
+ changelog:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Preview Changelog
+ uses: matrix-org/allchange@main
+ with:
+ ghToken: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/triage-incoming.yml b/.github/workflows/triage-incoming.yml
new file mode 100644
index 0000000000..5a9ce87727
--- /dev/null
+++ b/.github/workflows/triage-incoming.yml
@@ -0,0 +1,15 @@
+name: Move new issues into Issue triage board
+
+on:
+ issues:
+ types: [opened]
+
+jobs:
+ automate-project-columns:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: alex-page/github-project-automation-plus@v0.8.1
+ with:
+ project: Issue triage
+ column: Incoming
+ repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
diff --git a/.github/workflows/triage-needs-info.yml b/.github/workflows/triage-needs-info.yml
new file mode 100644
index 0000000000..d43b2a503d
--- /dev/null
+++ b/.github/workflows/triage-needs-info.yml
@@ -0,0 +1,16 @@
+name: Move X-Needs-Info into Need info column in the Issue triage board
+
+on:
+ issues:
+ types: [labeled]
+
+jobs:
+ Move_Labeled_Issue_On_Project_Board:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: konradpabjan/move-labeled-or-milestoned-issue@v2.0
+ with:
+ action-token: ${{ secrets.GITHUB_TOKEN }}
+ project-url: "https://github.com/vector-im/element-web/projects/27"
+ column-name: "Need info"
+ label-name: "X-Needs-Info"
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3af9d3945b..e14c75df97 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,4 +1,4 @@
Contributing code to Element
============================
-Element follows the same pattern as https://github.com/matrix-org/matrix-js-sdk/blob/master/CONTRIBUTING.rst.
+Element follows the same pattern as the [matrix-js-sdk](https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md).
diff --git a/docs/labs.md b/docs/labs.md
index f880e3cd58..0799ef7b50 100644
--- a/docs/labs.md
+++ b/docs/labs.md
@@ -129,3 +129,7 @@ encrypted on the server, as described in [MSC2697](https://github.com/matrix-org
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.
+
+## Hidden read receipts (`feature_hidden_read_receipts`)
+
+Enables sending hidden read receipts as per [MSC2285](https://github.com/matrix-org/matrix-doc/pull/2285)
diff --git a/package.json b/package.json
index f9127a1bf3..a00f192bef 100644
--- a/package.json
+++ b/package.json
@@ -88,6 +88,7 @@
"@babel/preset-typescript": "^7.12.7",
"@babel/register": "^7.12.10",
"@babel/runtime": "^7.12.5",
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
"@principalstudio/html-webpack-inject-preload": "^1.2.7",
"@types/flux": "^3.1.9",
"@types/modernizr": "^3.5.3",
@@ -140,6 +141,7 @@
"postcss-scss": "^2.1.1",
"postcss-simple-vars": "^5.0.2",
"postcss-strip-inline-comments": "^0.1.5",
+ "react-refresh": "^0.10.0",
"rimraf": "^3.0.2",
"shell-escape": "^0.2.0",
"simple-proxy-agent": "^1.1.0",
diff --git a/src/i18n/strings/en_US.json b/src/i18n/strings/en_US.json
index 8b47936fbc..bb955a59d1 100644
--- a/src/i18n/strings/en_US.json
+++ b/src/i18n/strings/en_US.json
@@ -32,5 +32,6 @@
"Unable to load config file: please refresh the page to try again.": "Unable to load config file: please refresh the page to try again.",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Your Element configuration contains invalid JSON. Please correct the problem and reload the page.",
"Your Element is misconfigured": "Your Element is misconfigured",
- "Missing indexeddb worker script!": "Missing indexeddb worker script!"
+ "Missing indexeddb worker script!": "Missing indexeddb worker script!",
+ "Switch to space by number": "Switch to space by number"
}
diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json
index a64ffb3c9e..675e46f652 100644
--- a/src/i18n/strings/fr.json
+++ b/src/i18n/strings/fr.json
@@ -33,5 +33,6 @@
"Your browser can't run %(brand)s": "Votre navigateur ne peut pas exécuter %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s nécessite des fonctionnalités avancées que votre navigateur actuel ne prend pas en charge.",
"Powered by Matrix": "Propulsé par Matrix",
- "Use %(brand)s on mobile": "Utiliser %(brand)s sur téléphone"
+ "Use %(brand)s on mobile": "Utiliser %(brand)s sur téléphone",
+ "Switch to space by number": "Afficher un espace par son numéro"
}
diff --git a/src/i18n/strings/fy.json b/src/i18n/strings/fy.json
new file mode 100644
index 0000000000..fa55c9dc5d
--- /dev/null
+++ b/src/i18n/strings/fy.json
@@ -0,0 +1,36 @@
+{
+ "Sign In": "Ynskriuwe",
+ "Failed to start": "Iepenjen mislearre",
+ "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.": "Jo kinne fierder gean mei jo eigen browser, mar guon funksjes kinne net wurkje en uterlik kin de applikaasje der ôfwikend út sjen.",
+ "Please install Chrome, Firefox, or Safari for the best experience.": "Graach Chrome, Firefox, ofSafari ynstallearre foar de beste ûnderfining.",
+ "%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s brûkt avansearre browser funksjes dy net stipe wurde troch de browser dy jo no brûke.",
+ "Powered by Matrix": "Fersoarge troch Matrix",
+ "%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)",
+ "Previous/next recently visited room or community": "Foarige/Folgjende resintlik besochte keamer as mienskip",
+ "Switch to space by number": "Wikselje fan romte mei nûmer",
+ "Unexpected error preparing the app. See console for details.": "Ûnferwachte flater by it klearmeitsjen fan de applikaasje. Sjoch yn'e konsole foar details.",
+ "The message from the parser is: %(message)s": "It berjocht fan de ferwurker is: %(message)s",
+ "Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Jo Element konfiguraasje hat ûnjildige JSON. Nei dat jo dit oplost ha kin dizze side ferfarske wurde.",
+ "Use %(brand)s on mobile": "Brûk %(brand)s op mobyl",
+ "Decentralised, encrypted chat & collaboration powered by [matrix]": "Desintralisearre, fersifere chat & gearwurking fersoarge troch [matrix]",
+ "You need to be using HTTPS to place a screen-sharing call.": "Jo moatte HTTPS brûke om te skiljen en jo skermynhâld te dielen.",
+ "%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
+ "Go to your browser to complete Sign In": "Gean nei jo browser om it ynskriuwen ôf te rûnen",
+ "Download Completed": "Klear mei Delheljen",
+ "Unable to load config file: please refresh the page to try again.": "Kin konfiguraasje bestân net lade: ferfarskje de side en probearje it noch ris.",
+ "Open user settings": "Brûkersynstellingen iepenje",
+ "Dismiss": "Negearre",
+ "Explore rooms": "Keamers ûntdekke",
+ "Create Account": "Account Meitsje",
+ "Welcome to Element": "Wolkom by Element",
+ "I understand the risks and wish to continue": "Ik begryp de risiko's en wol graach fierder gean",
+ "Go to element.io": "Gean nei element.io",
+ "Your browser can't run %(brand)s": "Jo browser kin %(brand)s net útfiere",
+ "Unsupported browser": "Net stipe browser",
+ "Unknown device": "Ûnbekend apparaat",
+ "Open": "Iepenje",
+ "Invalid JSON": "Ûnjildiche JSON",
+ "Your Element is misconfigured": "Jo Element is net goed konfigurearre",
+ "Invalid configuration: no default server specified.": "Ûnjildiche konfiguraasje: gjin standert tsjinner selektearre.",
+ "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Ûnjildige konfiguraasje: kin allinnich kieze út default_server_config, default_server_name, as default_hs_url."
+}
diff --git a/src/i18n/strings/lv.json b/src/i18n/strings/lv.json
index 6268c3f37b..b3afc2caf9 100644
--- a/src/i18n/strings/lv.json
+++ b/src/i18n/strings/lv.json
@@ -1,36 +1,38 @@
{
- "Dismiss": "Aizvērt",
+ "Dismiss": "Aizvērt/atcelt",
"powered by Matrix": "Tiek darbināta ar Matrix",
"Unknown device": "Nezināma ierīce",
- "You need to be using HTTPS to place a screen-sharing call.": "Lai veiktu ekrāna kopīgošanas zvanu, nepieciešams izmantot HTTPS savienojumu.",
- "Welcome to Element": "Esiet laipni gaidīti Element",
- "Decentralised, encrypted chat & collaboration powered by [matrix]": "Decentralizēta, šifrēta čata & kopdarbošanās sistēma uz [matrix] bāzes",
- "Sign In": "Pierakstīties",
+ "You need to be using HTTPS to place a screen-sharing call.": "Ekrāna kopīgošanai nepieciešams izmantot HTTPS savienojumu.",
+ "Welcome to Element": "Esiet laipni gaidīti Elementā",
+ "Decentralised, encrypted chat & collaboration powered by [matrix]": "Decentralizēta, šifrēta tērziņu & kopdarbības vide uz [matrix] bāzes",
+ "Sign In": "Ierakstīties",
"Create Account": "Izveidot kontu",
- "Explore rooms": "Pārlūkot istabas",
+ "Explore rooms": "Pārlūkot telpas",
"Unexpected error preparing the app. See console for details.": "Negaidīta kļūda, sagatavojot lietotni. Sīkāku informāciju skatiet konsolē.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Kļūdaina konfigurācija: var norādīt tikai vienu no parametriem default_server_config, default_server_name, vai default_hs_url.",
"Invalid configuration: no default server specified.": "Kļūdaina konfigurācija: nav norādīts noklusējuma serveris.",
- "The message from the parser is: %(message)s": "Ziņojums no parsētāja ir: %(message)s",
+ "The message from the parser is: %(message)s": "No pārsētāja ir ziņa: %(message)s",
"Invalid JSON": "Kļūdains JSON",
- "Unable to load config file: please refresh the page to try again.": "Neizdevās ielādēt konfigurācijas datni. Lūdzu, pārlādējiet lapu, lai mēģinātu vēlreiz.",
+ "Unable to load config file: please refresh the page to try again.": "Neizdevās ielādēt konfigurācijas failu. Lai atkārtotu mēģinātu, lūdzu pārlādējiet lapu.",
"Open user settings": "Atvērt lietotāja iestatījumus",
- "Go to your browser to complete Sign In": "Pārejiet uz pārlūku, lai pabeigtu pierakstīšanos",
+ "Go to your browser to complete Sign In": "Dodieties uz pārlūku, lai pabeigtu pierakstīšanos",
"Unsupported browser": "Neatbalstīts pārlūks",
- "Please install Chrome, Firefox, or Safari for the best experience.": "Labākajai izmantošanas pieredzei, lūdzu, instalējiet Chrome, Firefox vai Safari pārlūku.",
- "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.": "Jūs varat turpināt lietot savu pašreizējo pārlūku, bet dažas vai visas funkcijas nestrādās, un lietotnes izskats var būt nepareizs.",
- "I understand the risks and wish to continue": "Es pieņemu riskus un vēlos turpināt",
- "Go to element.io": "Ej uz element.io",
+ "Please install Chrome, Firefox, or Safari for the best experience.": "Lai gūtu labāko lietošanas pieredzi, lūdzu, instalējiet Chromium, Firefox vai Safari pārlūku.",
+ "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.": "Jūs varat turpināt lietot savu pašreizējo pārlūku, bet dažas funkcijas nestrādās un lietotnes izskats/saskarne var būt atspoguļoti nekorekti.",
+ "I understand the risks and wish to continue": "Es apzinos riskus un vēlos turpināt",
+ "Go to element.io": "Doties uz element.io",
"Failed to start": "Neizdevās palaist",
- "Powered by Matrix": "Darbojas uz Matrix",
- "Previous/next recently visited room or community": "Iepriekšējā/nākošā nesen apmeklētā istaba vai kopiena",
- "%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s izmanto pārlūku papildus funkcijas, kas netiek atbalstītas šajā pārlūkā.",
+ "Powered by Matrix": "Griežas uz Matrix tehnoloģijas",
+ "Previous/next recently visited room or community": "Iepriekšējā/nākošā nesen apmeklētā telpa vai kopiena",
+ "%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s izmanto pārlūku papildfunkcijas, kuras netiek atbalstītas šajā pārlūkā.",
"Your browser can't run %(brand)s": "Jūsu pārlūks nevar palaist %(brand)s",
"Missing indexeddb worker script!": "Trūkst indexeddb worker skripta!",
"Open": "Atvērt",
- "Download Completed": "Lejupielāde pabeigta",
- "Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Jūsu Element konfigurācija satur kļūdainu JSON. Lūdzu, salabojiet problēmu un pārlādējiet lapu.",
+ "Download Completed": "Lejuplāde pabeigta",
+ "Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Jūsu Element konfigurācija satur kļūdainu JSON. Lūdzu, izlabojiet un pārlādējiet lapu.",
"Your Element is misconfigured": "Jūsu Element ir nokonfigurēts kļūdaini",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
- "%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)"
+ "%(brand)s Desktop (%(platformName)s)": "%(brand)s Galdvirsmas (%(platformName)s)",
+ "Switch to space by number": "Pārslēgties uz atstarpi/tukšumu ar numuru",
+ "Use %(brand)s on mobile": "Mobilajā tālrunī izmanojiet %(brand)s"
}
diff --git a/src/i18n/strings/nl.json b/src/i18n/strings/nl.json
index 47322348e0..8c3f756228 100644
--- a/src/i18n/strings/nl.json
+++ b/src/i18n/strings/nl.json
@@ -7,7 +7,7 @@
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Gedecentraliseerd en versleuteld chatten & samenwerken dankzij [matrix]",
"Sign In": "Inloggen",
"Create Account": "Registreren",
- "Explore rooms": "Gesprekken ontdekken",
+ "Explore rooms": "Kamers ontdekken",
"Unexpected error preparing the app. See console for details.": "Er is een onverwachte fout opgetreden bij het voorbereiden van de app. Zie de console voor details.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuratiefout: kan slechts één van default_server_config, default_server_name, of default_hs_url opgeven.",
"Invalid configuration: no default server specified.": "Configuratie ongeldig: geen standaardserver opgegeven.",
diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json
index 361cd53e9d..b6fdd56ff7 100644
--- a/src/i18n/strings/ru.json
+++ b/src/i18n/strings/ru.json
@@ -33,5 +33,6 @@
"Your browser can't run %(brand)s": "Ваш браузер не может запустить %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s использует расширенные возможности, которые не поддерживаются вашим браузером.",
"Powered by Matrix": "На технологии Matrix",
- "Use %(brand)s on mobile": "Воспользуйтесь %(brand)s на мобильном телефоне"
+ "Use %(brand)s on mobile": "Воспользуйтесь %(brand)s на мобильном телефоне",
+ "Switch to space by number": "Переключение на пространство по номеру"
}
diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json
index c11a6e1a31..90e73ddef3 100644
--- a/src/i18n/strings/zh_Hans.json
+++ b/src/i18n/strings/zh_Hans.json
@@ -11,8 +11,8 @@
"The message from the parser is: %(message)s": "语法分析器的信息:%(message)s",
"Invalid JSON": "无效的 JSON",
"Unexpected error preparing the app. See console for details.": "软件准备时出错,详细信息请查看控制台。",
- "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "无效的配置:只能设置 default_server_config,default_server_name 或 default_hs_url 中的一个。",
- "Invalid configuration: no default server specified.": "无效的配置:没有设置默认服务器。",
+ "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "配置无效: 只能设置 default_server_config、default_server_name 或 default_hs_url。",
+ "Invalid configuration: no default server specified.": "配置无效:没有设置默认服务器。",
"Missing indexeddb worker script!": "缺少 IndexedDB 辅助脚本!",
"Unable to load config file: please refresh the page to try again.": "无法加载配置文件:请再次刷新页面。",
"Open user settings": "打开用户设置",
diff --git a/tsconfig.json b/tsconfig.json
index e16688adb3..0e02b25bb1 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -12,11 +12,6 @@
"outDir": "./lib",
"declaration": true,
"jsx": "react",
- "types": [
- "node",
- "react",
- "flux"
- ],
"lib": [
"es2019",
"dom",
diff --git a/webpack.config.js b/webpack.config.js
index 18d389d854..fb21e3f0ef 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -8,6 +8,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload');
+const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
dotenv.config();
let ogImageUrl = process.env.RIOT_OG_IMAGE_URL;
@@ -46,7 +47,7 @@ module.exports = (env, argv) => {
nodeEnv = "production";
}
const devMode = nodeEnv !== 'production';
- const useCssHotReload = process.env.CSS_HOT_RELOAD === '1' && devMode;
+ const useHMR = process.env.CSS_HOT_RELOAD === '1' && devMode;
const development = {};
if (argv.mode === "production") {
@@ -89,7 +90,7 @@ module.exports = (env, argv) => {
"mobileguide": "./src/vector/mobile_guide/index.ts",
"jitsi": "./src/vector/jitsi/index.ts",
"usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.js",
- ...(useCssHotReload ? {} : cssThemes),
+ ...(useHMR ? {} : cssThemes),
},
optimization: {
@@ -173,7 +174,7 @@ module.exports = (env, argv) => {
/olm[\\/](javascript[\\/])?olm\.js$/,
],
rules: [
- useCssHotReload && {
+ useHMR && {
test: /devcss\.ts$/,
loader: 'string-replace-loader',
options: {
@@ -207,6 +208,9 @@ module.exports = (env, argv) => {
loader: 'babel-loader',
options: {
cacheDirectory: true,
+ plugins: [
+ useHMR && require.resolve('react-refresh/babel'),
+ ].filter(Boolean),
},
},
{
@@ -266,7 +270,7 @@ module.exports = (env, argv) => {
* of the JS/TS files.
* Should be MUCH better with webpack 5, but we're stuck to this solution for now.
*/
- useCssHotReload ? {
+ useHMR ? {
loader: 'style-loader',
/**
* If we refactor the `theme.js` in `matrix-react-sdk` a little bit,
@@ -465,8 +469,8 @@ module.exports = (env, argv) => {
// This exports our CSS using the splitChunks and loaders above.
new MiniCssExtractPlugin({
- filename: useCssHotReload ? "bundles/[name].css" : "bundles/[hash]/[name].css",
- chunkFilename: useCssHotReload ? "bundles/[name].css" : "bundles/[hash]/[name].css",
+ filename: useHMR ? "bundles/[name].css" : "bundles/[hash]/[name].css",
+ chunkFilename: useHMR ? "bundles/[name].css" : "bundles/[hash]/[name].css",
ignoreOrder: false, // Enable to remove warnings about conflicting order
}),
@@ -526,8 +530,9 @@ module.exports = (env, argv) => {
new HtmlWebpackInjectPreload({
files: [{ match: /.*Inter.*\.woff2$/ }],
}),
+ useHMR && new ReactRefreshWebpackPlugin(),
- ],
+ ].filter(Boolean),
output: {
path: path.join(__dirname, "webapp"),
diff --git a/yarn.lock b/yarn.lock
index 601a1363bf..1bdbec1f31 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1410,6 +1410,18 @@
dependencies:
"@octokit/openapi-types" "^9.3.0"
+"@pmmmwh/react-refresh-webpack-plugin@^0.4.3":
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.3.tgz#1eec460596d200c0236bf195b078a5d1df89b766"
+ integrity sha512-br5Qwvh8D2OQqSXpd1g/xqXKnK0r+Jz6qVKBbWmpUcrbGOxUrf39V5oZ1876084CGn18uMdR5uvPqBv9UqtBjQ==
+ dependencies:
+ ansi-html "^0.0.7"
+ error-stack-parser "^2.0.6"
+ html-entities "^1.2.1"
+ native-url "^0.2.6"
+ schema-utils "^2.6.5"
+ source-map "^0.7.3"
+
"@principalstudio/html-webpack-inject-preload@^1.2.7":
version "1.2.7"
resolved "https://registry.yarnpkg.com/@principalstudio/html-webpack-inject-preload/-/html-webpack-inject-preload-1.2.7.tgz#0c1f0b32a34d814b36ce84111f89990441cc64e8"
@@ -2078,7 +2090,7 @@ ansi-escapes@^4.2.1:
dependencies:
type-fest "^0.21.3"
-ansi-html@0.0.7:
+ansi-html@0.0.7, ansi-html@^0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e"
integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4=
@@ -4325,6 +4337,13 @@ error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.1"
+error-stack-parser@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.6.tgz#5a99a707bd7a4c58a797902d48d82803ede6aad8"
+ integrity sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==
+ dependencies:
+ stackframe "^1.1.1"
+
es-abstract@^1.17.2, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2:
version "1.18.3"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0"
@@ -5709,7 +5728,7 @@ html-encoding-sniffer@^2.0.1:
dependencies:
whatwg-encoding "^1.0.5"
-html-entities@^1.3.1, html-entities@^1.4.0:
+html-entities@^1.2.1, html-entities@^1.3.1, html-entities@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc"
integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==
@@ -8050,6 +8069,13 @@ nanomatch@^1.2.9:
snapdragon "^0.8.1"
to-regex "^3.0.1"
+native-url@^0.2.6:
+ version "0.2.6"
+ resolved "https://registry.yarnpkg.com/native-url/-/native-url-0.2.6.tgz#ca1258f5ace169c716ff44eccbddb674e10399ae"
+ integrity sha512-k4bDC87WtgrdD362gZz6zoiXQrl40kYlBmpfmSjwRO1VU0V5ccwJTlxuE72F6m3V0vc1xOf6n3UCP9QyerRqmA==
+ dependencies:
+ querystring "^0.2.0"
+
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
@@ -9776,6 +9802,11 @@ querystring@0.2.0:
resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=
+querystring@^0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd"
+ integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==
+
querystringify@^2.1.1:
version "2.2.0"
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6"
@@ -9910,6 +9941,11 @@ react-redux@^7.2.0:
prop-types "^15.7.2"
react-is "^16.13.1"
+react-refresh@^0.10.0:
+ version "0.10.0"
+ resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.10.0.tgz#2f536c9660c0b9b1d500684d9e52a65e7404f7e3"
+ integrity sha512-PgidR3wST3dDYKr6b4pJoqQFpPGNKDSCDx4cZoshjXipw3LzO7mG1My2pwEzz2JVkF+inx3xRpDeQLFQGH/hsQ==
+
react-transition-group@^4.4.1:
version "4.4.2"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.2.tgz#8b59a56f09ced7b55cbd53c36768b922890d5470"
@@ -10938,6 +10974,11 @@ stack-utils@^2.0.2:
dependencies:
escape-string-regexp "^2.0.0"
+stackframe@^1.1.1:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.2.0.tgz#52429492d63c62eb989804c11552e3d22e779303"
+ integrity sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==
+
static-extend@^0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"