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.