Merge branch 'develop' of github.com:vector-im/element-web into t3chguy/fix/18088

This commit is contained in:
Michael Telatynski 2021-09-08 15:29:11 +01:00
commit 1d5d7751f7
31 changed files with 997 additions and 690 deletions

View file

@ -38,6 +38,8 @@ import { createClient } from "matrix-js-sdk/src/matrix";
let lastLocationHashSet: string = null;
console.log(`Application is running in ${process.env.NODE_ENV} mode`);
// Parse the given window.location and return parameters that can be used when calling
// MatrixChat.showScreen(screen, params)
function getScreenFromLocation(location: Location) {

View file

@ -15,15 +15,16 @@ limitations under the License.
*/
/**
* This code will be autoremoved on production builds.
* The purpose of this code is that the webpack's `string-replace-loader`
* pretty much search for this string in this specific file and replaces it
* like a macro before any previous compilations, which allows us to inject
* some css requires statements that are specific to the themes we have turned
* on by ourselves. Without that very specific workaround, webpack would just
* import all the CSSes, which would make the whole thing useless, as on my
* machine with i9 the recompilation for all themes turned ou would take way
* over 30s, which is definitely too high for nice css reloads speed.
* This code is removed on production builds.
*
* Webpack's `string-replace-loader` searches for the `use theming` string
* in this specific file, and replaces it with CSS requires statements that
* are specific to the themes we have enabled.
*
* Without this workaround, webpack would import the CSS of all themes, which
* would defeat the purpose of hot-reloading since all themes would be compiled,
* which would result in compilation times on the order of 30s, even on a
* powerful machine.
*
* For more details, see webpack.config.js:184 (string-replace-loader)
*/

View file

@ -26,9 +26,9 @@ require('highlight.js/styles/github.css');
require('katex/dist/katex.css');
/**
* This require is necessary only for purposes of CSS hot reload, as otherwise
* webpack has some incredibly problems figuring out which css files should be
* hot reloaded, even with proper hints for the loader.
* This require is necessary only for purposes of CSS hot-reload, as otherwise
* webpack has some incredible problems figuring out which CSS files should be
* hot-reloaded, even with proper hints for the loader.
*
* On production build it's going to be an empty module, so don't worry about that.
*/