I've been experimenting with loading WebAssembly into EW, for which I need to
use webpack's default wasm loader. Currently we're overriding that for *all*
files called `*.wasm`, which is too broad.
There are currently two `*.wasm` artifacts in EW: `decoderWorker.min.wasm`, and
`olm.wasm`. `decoderWorker` has its own rule, so the `*.wasm` rule is only used
for `olm.wasm`. So, let's tighten up the test for that rule so that it doesn't
catch other innocent `.wasm`s in the cross-fire.
* Rename PostCSS files to `.pcss`
* Make Stylelint happy
* Make Stylelint happy v2
* Update CompatibilityView.tsx
* Update res/css/structures/ErrorView.pcss
Co-authored-by: Michael Weimann <mail@michael-weimann.eu>
* Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/pcss
Conflicts:
package.json
res/css/_components.scss
res/css/structures/_NotificationPanel.pcss
res/css/views/dialogs/_SpotlightDialog.pcss
res/css/views/rooms/_EventTile.pcss
res/css/views/rooms/_ReadReceiptGroup.pcss
yarn.lock
* Only use CI_PACKAGE mode on develop, it skips minification which can find some errors
* Keep name to not break existing PRs
Co-authored-by: Michael Weimann <mail@michael-weimann.eu>
This is the same system as the customisations override, however deliberately using a different JSON file to avoid conflicts.
Forks would be expected to use the customisations file, not the components file, to override/add components.
* Revert "Revert "Update minification and sourcemap settings on CI builds for sentry (#19583)" (#19601)"
This reverts commit 516e38c82d.
* Disable minification in CI as it exceeds memory limits for poor buildkite
With previous settings, our JS files for develop are so large that sentry's webserver rejects the upload.
* re-enable minification to reduce the size of the files
* update the CI sourcemap setting from eval-source-map to source-map to move the embedded source out of the .js payload and into .js.map files
Fixes https://github.com/vector-im/element-web/issues/19485
The variable should be set when it needs to by CI, but in every other environment it's not important. Simply setting it to *something* makes EnvironmentPlugin happy. We print a warning just in case people expect it to be set, and use a clear value in case the environment variable doesn't get properly set.
The key must match the theme name, otherwise the getThemesImports() function
will exit with an error.
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
This described in https://github.com/vector-im/element-web/issues/17330#issuecomment-842530812, this should prevent the newly introduced version of `html-webpack-plugin` from minifying `.html` files, like e.g. `index.html`, `jitsi.html`, et cetera …
Quoting @jryans via: https://github.com/vector-im/element-web/issues/17330#issuecomment-842415694
> The content of the `index.html` file is not a supported API surface, so it might change at any time.
>
> This document minification was not done on purpose, but instead it happened as a side effect of upgrading. We would happily accept a PR to fix this, but it is also not a priority for the core team.
Could please someone test and, hopefully, accept this change back to not minifying the `.html` files?
While it sounds like a useful warning at first, it turns out the warnings it
prints are ones we're unlike to ever act on, such as adding percentages and
pixels, which seem fine to have. This resets to default behaviour, which leaves
the warning off.
With the approach in https://github.com/vector-im/element-web/pull/16969,
Webpack seems to sometimes do what we want, sometimes not... I haven't quite
worked out why. Perhaps there's some conflict or race in Webpack's defaults...?
This new approach seems to work as expected when running
`./scripts/ci_package.sh`, which matches what development deployments are doing.
When running Nightly build we want to benefit from the fast runtime that React production offers and get rid of the runtime overhead that comes with development.
We are setting NODE_ENV and not "webpack.mode" to not loose sourcemaps and have minified sources in that environment
This adjusts our asset path handling to group KaTeX fonts in a more sensible way
alongside the other fonts we have. It also resolves production build issues on
Windows.
Fixes https://github.com/vector-im/element-web/issues/15911
We don't need to manually define `NODE_ENV` in the Webpack config, nor do we
need to set it outside Webpack with `cross-env` either, as Webpack's modes will
take care of this for us.
Effectively fixes https://github.com/vector-im/riot-web/issues/11074
Effectively fixes https://github.com/vector-im/riot-web/issues/7112
Fixes https://github.com/vector-im/riot-web/issues/6930
Fixes Jitsi widgets not working for guests (https://github.com/vector-im/riot-web/issues/8933)
Fixes https://github.com/vector-im/riot-web/issues/5048
Previously we were relying on an integration manager to be defined, functional, and alive in order to join Jitsi calls. This commit changes this so we aren't reliant on an integration manager for Jitsi calls at all, and gives people the option of choosing a Jitsi server via the config.json.
This side is just the wrapper/shell: the logic is mostly in the react-sdk (to be linked via PRs). This layer simply has an HTML file exported that can be used to render a Jitsi widget, and the react-sdk constructs a URL to access it locally. This is similar to how the mobile apps handle Jitsi widgets: instead of iframing the widget URL directly into the app, they pull apart the widget information and natively render it. We're effectively doing the same here by parsing the widget options and using our local wrapper instead of whatever happens to be defined in the widget state event.
Integration managers should still continue to offer a widget URL for Jitsi widgets as this is what the spec requires.
A large part of this is based upon Dimension's handling of Jitsi and widgets in general: a license has been granted to allow Riot (and therefore the react-sdk) to use the code and be inspired by it.