Compare commits
77 Commits
rav/bump_p
...
v1.11.57
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cd4a4faac | ||
|
|
e0abf63d87 | ||
|
|
e1715e2c00 | ||
|
|
285ba42316 | ||
|
|
aaeb1081c7 | ||
|
|
3000a48907 | ||
|
|
c02f153c2a | ||
|
|
feba18abd4 | ||
|
|
db78839e86 | ||
|
|
0aed37a2e5 | ||
|
|
19ed4a86c6 | ||
|
|
71840ee63c | ||
|
|
cde1e1ecb8 | ||
|
|
3fe0325eab | ||
|
|
5dd1ed9aac | ||
|
|
3867576137 | ||
|
|
e2371c0244 | ||
|
|
bfe40d6a1b | ||
|
|
927b3165ab | ||
|
|
5b6f5e8c4c | ||
|
|
c5bf7f405c | ||
|
|
bb3954c235 | ||
|
|
1669477d87 | ||
|
|
9ca55b76b0 | ||
|
|
e5d0c2ae7b | ||
|
|
62b65744e5 | ||
|
|
74d52f535a | ||
|
|
a410f96802 | ||
|
|
6d9efbab7a | ||
|
|
0afcc88763 | ||
|
|
8afab3c3f6 | ||
|
|
9a1956c187 | ||
|
|
1ee644aab1 | ||
|
|
c2fa3d8f04 | ||
|
|
d7ab867af3 | ||
|
|
500f3485e0 | ||
|
|
97412e5e12 | ||
|
|
cc6b519d98 | ||
|
|
4b36e06cfe | ||
|
|
3f578ad80a | ||
|
|
7cd2f78e3a | ||
|
|
d6437b2db0 | ||
|
|
e938d8d0f4 | ||
|
|
3582e2a3ae | ||
|
|
3c31f55e87 | ||
|
|
9526a94ffc | ||
|
|
3a97c74074 | ||
|
|
9ea88438f9 | ||
|
|
d5047b708f | ||
|
|
fa3d8341a9 | ||
|
|
b91d0a6a5a | ||
|
|
04a2d3c9ba | ||
|
|
75aefff539 | ||
|
|
18fee2e650 | ||
|
|
ee5a3ce4a9 | ||
|
|
dee2a8ca29 | ||
|
|
e5a7bb89e2 | ||
|
|
c02af77655 | ||
|
|
d3ff627134 | ||
|
|
e73eba5b28 | ||
|
|
96bbe07e22 | ||
|
|
136a41bf7b | ||
|
|
0e0f5f06c2 | ||
|
|
4101d36bfb | ||
|
|
5c66bc860e | ||
|
|
91a09d97b1 | ||
|
|
ded9d6b55d | ||
|
|
4032304f01 | ||
|
|
a5caa5055e | ||
|
|
3f159934e4 | ||
|
|
436790cfd8 | ||
|
|
a012fb282f | ||
|
|
68fec606f2 | ||
|
|
03a624f788 | ||
|
|
922f16812c | ||
|
|
9ee7440dfd | ||
|
|
2d26c46c1c |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -3,6 +3,8 @@ on:
|
||||
pull_request: {}
|
||||
push:
|
||||
branches: [develop, master]
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
# develop pushes and repository_dispatch handled in build_develop.yaml
|
||||
env:
|
||||
# These must be set for fetchdep.sh to get the right branch
|
||||
|
||||
2
.github/workflows/build_debian.yaml
vendored
2
.github/workflows/build_debian.yaml
vendored
@@ -61,7 +61,7 @@ jobs:
|
||||
dpkg-gencontrol -v"$VERSION" -ldebian/tmp/DEBIAN/changelog
|
||||
dpkg-deb -Zxz --root-owner-group --build debian/tmp element-web.deb
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: element-web.deb
|
||||
path: element-web.deb
|
||||
|
||||
2
.github/workflows/build_develop.yml
vendored
2
.github/workflows/build_develop.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
- run: mv dist/element-*.tar.gz dist/develop.tar.gz
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: webapp
|
||||
path: dist/develop.tar.gz
|
||||
|
||||
2
.github/workflows/dockerhub.yaml
vendored
2
.github/workflows/dockerhub.yaml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5
|
||||
uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5
|
||||
with:
|
||||
images: |
|
||||
vectorim/element-web
|
||||
|
||||
4
.github/workflows/docs.yml
vendored
4
.github/workflows/docs.yml
vendored
@@ -99,7 +99,7 @@ jobs:
|
||||
run: mdbook build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v2
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./book
|
||||
|
||||
@@ -112,4 +112,4 @@ jobs:
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v3
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
17
.github/workflows/downstream-artifacts.yml
vendored
Normal file
17
.github/workflows/downstream-artifacts.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
name: Build downstream artifacts
|
||||
on:
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
pull_request: {}
|
||||
push:
|
||||
branches: [develop, master]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
build-element-web:
|
||||
name: Build element-web
|
||||
uses: matrix-org/matrix-react-sdk/.github/workflows/element-web.yaml@develop
|
||||
with:
|
||||
element-web-sha: ${{ github.sha }}
|
||||
react-sdk-repository: matrix-org/matrix-react-sdk
|
||||
58
.github/workflows/end-to-end-tests.yaml
vendored
Normal file
58
.github/workflows/end-to-end-tests.yaml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
# Triggers after the "Downstream artifacts" build has finished, to run the
|
||||
# matrix-react-sdk playwright tests (with access to repo secrets)
|
||||
|
||||
name: matrix-react-sdk End to End Tests
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build downstream artifacts"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.run_id }}
|
||||
cancel-in-progress: ${{ github.event.workflow_run.event == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
playwright:
|
||||
name: Playwright
|
||||
# We only want to run the playwright tests on merge queue to prevent regressions
|
||||
# from creeping in. They take a long time to run and consume multiple concurrent runners.
|
||||
if: github.event.workflow_run.event == 'merge_group'
|
||||
uses: matrix-org/matrix-react-sdk/.github/workflows/end-to-end-tests.yaml@develop
|
||||
permissions:
|
||||
actions: read
|
||||
issues: read
|
||||
statuses: write
|
||||
pull-requests: read
|
||||
deployments: write
|
||||
with:
|
||||
react-sdk-repository: matrix-org/matrix-react-sdk
|
||||
secrets:
|
||||
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||
|
||||
# We want to make the Playwright tests a required check for the merge queue.
|
||||
#
|
||||
# Unfortunately, github doesn't distinguish between "checks needed for branch
|
||||
# protection" (ie, the things that must pass before the PR will even be added
|
||||
# to the merge queue) and "checks needed in the merge queue". We just have to add
|
||||
# the check to the branch protection list.
|
||||
#
|
||||
# Ergo, if we know we're not going to run the Playwright tests, we need to add a
|
||||
# passing status check manually.
|
||||
mark_skipped:
|
||||
if: github.event.workflow_run.event != 'merge_group'
|
||||
permissions:
|
||||
statuses: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: Sibz/github-status-action@071b5370da85afbb16637d6eed8524a06bc2053e # v1
|
||||
with:
|
||||
authToken: "${{ secrets.GITHUB_TOKEN }}"
|
||||
state: success
|
||||
description: Playwright skipped
|
||||
|
||||
# Keep in step with the `context` that is updated by `Sibz/github-status-action`
|
||||
# in matrix-org/matrix-react-sdk/.github/workflows/end-to-end-tests.yaml.
|
||||
context: "${{ github.workflow }} / end-to-end-tests"
|
||||
|
||||
sha: "${{ github.event.workflow_run.head_sha }}"
|
||||
2
.github/workflows/pull_request.yaml
vendored
2
.github/workflows/pull_request.yaml
vendored
@@ -2,6 +2,8 @@ name: Pull Request
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, edited, labeled, unlabeled, synchronize]
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
jobs:
|
||||
action:
|
||||
uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop
|
||||
|
||||
1
.github/workflows/sonarqube.yml
vendored
1
.github/workflows/sonarqube.yml
vendored
@@ -13,3 +13,4 @@ jobs:
|
||||
uses: matrix-org/matrix-js-sdk/.github/workflows/sonarcloud.yml@develop
|
||||
secrets:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||
|
||||
2
.github/workflows/static_analysis.yaml
vendored
2
.github/workflows/static_analysis.yaml
vendored
@@ -3,6 +3,8 @@ on:
|
||||
pull_request: {}
|
||||
push:
|
||||
branches: [develop, master]
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
repository_dispatch:
|
||||
types: [element-web-notify]
|
||||
env:
|
||||
|
||||
20
.github/workflows/tests.yaml
vendored
20
.github/workflows/tests.yaml
vendored
@@ -3,6 +3,8 @@ on:
|
||||
pull_request: {}
|
||||
push:
|
||||
branches: [develop, master]
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
repository_dispatch:
|
||||
types: [element-web-notify]
|
||||
env:
|
||||
@@ -33,9 +35,25 @@ jobs:
|
||||
run: "yarn coverage --ci --max-workers ${{ steps.cpu-cores.outputs.count }}"
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage
|
||||
path: |
|
||||
coverage
|
||||
!coverage/lcov-report
|
||||
|
||||
skip_sonar:
|
||||
name: Skip SonarCloud in merge queue
|
||||
if: github.event_name == 'merge_group'
|
||||
runs-on: ubuntu-latest
|
||||
needs: jest
|
||||
steps:
|
||||
- name: Skip SonarCloud
|
||||
uses: Sibz/github-status-action@071b5370da85afbb16637d6eed8524a06bc2053e # v1
|
||||
with:
|
||||
authToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
state: success
|
||||
description: SonarCloud skipped
|
||||
context: SonarCloud Code Analysis
|
||||
sha: ${{ github.sha }}
|
||||
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
|
||||
2
.github/workflows/triage-incoming.yml
vendored
2
.github/workflows/triage-incoming.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
automate-project-columns:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43
|
||||
- uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36
|
||||
with:
|
||||
project: Issue triage
|
||||
column: Incoming
|
||||
|
||||
2
.github/workflows/triage-unlabelled.yml
vendored
2
.github/workflows/triage-unlabelled.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
fi
|
||||
fi
|
||||
- name: Move issue
|
||||
uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43
|
||||
uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36
|
||||
if: ${{ env.ALREADY_IN_BOARD == 'true' && env.SKIP_ACTION != 'true' }}
|
||||
with:
|
||||
project: Issue triage
|
||||
|
||||
@@ -28,6 +28,7 @@ src/vector/modernizr.js
|
||||
|
||||
# This file is owned, parsed, and generated by allchange, which doesn't comply with prettier
|
||||
/CHANGELOG.md
|
||||
/docs/changelogs
|
||||
|
||||
# Downloaded and already minified
|
||||
res/jitsi_external_api.min.js
|
||||
|
||||
9006
CHANGELOG.md
9006
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -124,7 +124,7 @@ must include:
|
||||
|
||||
1. Comprehensive unit tests written in Jest. These are located in `/test`.
|
||||
2. "happy path" end-to-end tests.
|
||||
These are located in `/cypress/e2e` in `matrix-react-sdk`, and
|
||||
These are located in `/playwright/e2e` in `matrix-react-sdk`, and
|
||||
are run using `element-web`. Ideally, you would also include tests for edge
|
||||
and error cases.
|
||||
|
||||
|
||||
1867
docs/changelogs/CHANGELOG-2022.md
Normal file
1867
docs/changelogs/CHANGELOG-2022.md
Normal file
File diff suppressed because it is too large
Load Diff
1017
docs/changelogs/CHANGELOG-2023.md
Normal file
1017
docs/changelogs/CHANGELOG-2023.md
Normal file
File diff suppressed because it is too large
Load Diff
6035
docs/changelogs/CHANGELOG-pre-2022.md
Normal file
6035
docs/changelogs/CHANGELOG-pre-2022.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -137,7 +137,7 @@ complete re-branding/private labeling, a more personalised experience can be ach
|
||||
This setting is ignored if your homeserver provides `/.well-known/matrix/client` in its well-known location, and the JSON file
|
||||
at that location has a key `m.tile_server` (or the unstable version `org.matrix.msc3488.tile_server`). In this case, the
|
||||
configuration found in the well-known location is used instead.
|
||||
10. `welcome_user_id`: An optional user ID to start a DM with after creating an account. Defaults to nothing (no DM created).
|
||||
10. `welcome_user_id`: **DEPRECATED** An optional user ID to start a DM with after creating an account. Defaults to nothing (no DM created).
|
||||
11. `custom_translations_url`: An optional URL to allow overriding of translatable strings. The JSON file must be in a format of
|
||||
`{"affected|translation|key": {"languageCode": "new string"}}`. See https://github.com/matrix-org/matrix-react-sdk/pull/7886 for details.
|
||||
12. `branding`: Options for configuring various assets used within the app. Described in more detail down below.
|
||||
|
||||
23
package.json
23
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "element-web",
|
||||
"version": "1.11.53",
|
||||
"version": "1.11.57",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "New Vector Ltd.",
|
||||
"repository": {
|
||||
@@ -74,11 +74,11 @@
|
||||
"@matrix-org/olm": "3.2.15",
|
||||
"@matrix-org/react-sdk-module-api": "^2.2.1",
|
||||
"gfm.css": "^1.1.2",
|
||||
"jsrsasign": "^10.5.25",
|
||||
"jsrsasign": "^11.0.0",
|
||||
"katex": "^0.16.0",
|
||||
"lodash": "^4.17.21",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
|
||||
"matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop",
|
||||
"matrix-js-sdk": "31.2.0",
|
||||
"matrix-react-sdk": "3.91.0",
|
||||
"matrix-widget-api": "^1.3.1",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
@@ -141,15 +141,16 @@
|
||||
"allchange": "^1.0.6",
|
||||
"babel-jest": "^29.0.0",
|
||||
"babel-loader": "^9.0.0",
|
||||
"babel-plugin-jsx-remove-data-test-id": "^3.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"chokidar": "^3.5.1",
|
||||
"concurrently": "^8.0.0",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"copy-webpack-plugin": "^12.0.0",
|
||||
"cronstrue": "^2.41.0",
|
||||
"css-loader": "^5.2.7",
|
||||
"css-minimizer-webpack-plugin": "^5.0.1",
|
||||
"dotenv": "^16.0.2",
|
||||
"eslint": "8.55.0",
|
||||
"eslint": "8.56.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-deprecate": "0.8.4",
|
||||
@@ -157,7 +158,7 @@
|
||||
"eslint-plugin-matrix-org": "^1.0.0",
|
||||
"eslint-plugin-react": "^7.28.0",
|
||||
"eslint-plugin-react-hooks": "^4.3.0",
|
||||
"eslint-plugin-unicorn": "^49.0.0",
|
||||
"eslint-plugin-unicorn": "^50.0.0",
|
||||
"fake-indexeddb": "^5.0.0",
|
||||
"fetch-mock": "9.11.0",
|
||||
"fetch-mock-jest": "^1.5.1",
|
||||
@@ -179,13 +180,13 @@
|
||||
"postcss-easings": "^2.0.0",
|
||||
"postcss-hexrgba": "2.0.1",
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-loader": "^4.0.0",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-mixins": "^6.2.3",
|
||||
"postcss-nested": "^4.2.3",
|
||||
"postcss-preset-env": "^6.7.0",
|
||||
"postcss-scss": "^4.0.4",
|
||||
"postcss-simple-vars": "^5.0.2",
|
||||
"prettier": "3.1.1",
|
||||
"prettier": "3.2.2",
|
||||
"process": "^0.11.10",
|
||||
"proxy-agent": "^6.3.0",
|
||||
"raw-loader": "^4.0.2",
|
||||
@@ -194,8 +195,8 @@
|
||||
"setimmediate": "^1.0.5",
|
||||
"string-replace-loader": "3",
|
||||
"style-loader": "3",
|
||||
"stylelint": "^16.0.0",
|
||||
"stylelint-config-standard": "^35.0.0",
|
||||
"stylelint": "^16.1.0",
|
||||
"stylelint-config-standard": "^36.0.0",
|
||||
"stylelint-scss": "^6.0.0",
|
||||
"terser-webpack-plugin": "^5.3.9",
|
||||
"ts-node": "^10.9.1",
|
||||
|
||||
@@ -108,5 +108,11 @@
|
||||
<audio id="remoteAudio"></audio>
|
||||
<!-- let CSS themes pass constants to the app -->
|
||||
<div id="mx_theme_accentColor"></div><div id="mx_theme_secondaryAccentColor"></div><div id="mx_theme_tertiaryAccentColor"></div>
|
||||
|
||||
<!-- We eagerly create these containers to ensure their CSS stacking context order is sensible -->
|
||||
<div id="mx_PersistedElement_container"></div>
|
||||
<div id="mx_Dialog_StaticContainer"></div>
|
||||
<div id="mx_Dialog_Container"></div>
|
||||
<div id="mx_ContextualMenu_Container"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -8,15 +8,8 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
|
||||
const HtmlWebpackInjectPreload = require("@principalstudio/html-webpack-inject-preload");
|
||||
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
|
||||
const crypto = require("crypto");
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
|
||||
// XXX: mangle Crypto::createHash to replace md4 with sha256, output.hashFunction is insufficient as multiple bits
|
||||
// of webpack hardcode md4. The proper fix it to upgrade to webpack 5.
|
||||
const createHash = crypto.createHash;
|
||||
crypto.createHash = (algorithm, options) => createHash(algorithm === "md4" ? "sha256" : algorithm, options);
|
||||
|
||||
// Environment variables
|
||||
// RIOT_OG_IMAGE_URL: specifies the URL to the image which should be used for the opengraph logo.
|
||||
// CSP_EXTRA_SOURCE: specifies a URL which should be appended to each CSP directive which uses 'self',
|
||||
@@ -319,6 +312,7 @@ module.exports = (env, argv) => {
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
cacheDirectory: true,
|
||||
plugins: enableMinification ? ["babel-plugin-jsx-remove-data-test-id"] : [],
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -337,35 +331,34 @@ module.exports = (env, argv) => {
|
||||
ident: "postcss",
|
||||
options: {
|
||||
"sourceMap": true,
|
||||
"postcssOptions": {
|
||||
"plugins": () => [
|
||||
// Note that we use significantly fewer plugins on the plain
|
||||
// CSS parser. If we start to parse plain CSS, we end with all
|
||||
// kinds of nasty problems (like stylesheets not loading).
|
||||
//
|
||||
// You might have noticed that we're also sending regular CSS
|
||||
// through PostCSS. This looks weird, and in fact is probably
|
||||
// not what you'd expect, however in order for our CSS build
|
||||
// to work nicely we have to do this. Because down the line
|
||||
// our SCSS stylesheets reference plain CSS we have to load
|
||||
// the plain CSS through PostCSS so it can find it safely. This
|
||||
// also acts like a babel-for-css by transpiling our (S)CSS
|
||||
// down/up to the right browser support (prefixes, etc).
|
||||
// Further, if we don't do this then PostCSS assumes that our
|
||||
// plain CSS is SCSS and it really doesn't like that, even
|
||||
// though plain CSS should be compatible. The chunking options
|
||||
// at the top of this webpack config help group the SCSS and
|
||||
// plain CSS together for the bundler.
|
||||
"plugins": () => [
|
||||
// Note that we use significantly fewer plugins on the plain
|
||||
// CSS parser. If we start to parse plain CSS, we end with all
|
||||
// kinds of nasty problems (like stylesheets not loading).
|
||||
//
|
||||
// You might have noticed that we're also sending regular CSS
|
||||
// through PostCSS. This looks weird, and in fact is probably
|
||||
// not what you'd expect, however in order for our CSS build
|
||||
// to work nicely we have to do this. Because down the line
|
||||
// our SCSS stylesheets reference plain CSS we have to load
|
||||
// the plain CSS through PostCSS so it can find it safely. This
|
||||
// also acts like a babel-for-css by transpiling our (S)CSS
|
||||
// down/up to the right browser support (prefixes, etc).
|
||||
// Further, if we don't do this then PostCSS assumes that our
|
||||
// plain CSS is SCSS and it really doesn't like that, even
|
||||
// though plain CSS should be compatible. The chunking options
|
||||
// at the top of this webpack config help group the SCSS and
|
||||
// plain CSS together for the bundler.
|
||||
|
||||
require("postcss-simple-vars")(),
|
||||
require("postcss-hexrgba")(),
|
||||
require("postcss-simple-vars")(),
|
||||
require("postcss-hexrgba")(),
|
||||
|
||||
// It's important that this plugin is last otherwise we end
|
||||
// up with broken CSS.
|
||||
require("postcss-preset-env")({ stage: 3, browsers: "last 2 versions" }),
|
||||
],
|
||||
"parser": "postcss-scss",
|
||||
},
|
||||
// It's important that this plugin is last otherwise we end
|
||||
// up with broken CSS.
|
||||
require("postcss-preset-env")({ stage: 3, browsers: "last 2 versions" }),
|
||||
],
|
||||
"parser": "postcss-scss",
|
||||
"local-plugins": true,
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -421,22 +414,21 @@ module.exports = (env, argv) => {
|
||||
ident: "postcss",
|
||||
options: {
|
||||
"sourceMap": true,
|
||||
"postcssOptions": {
|
||||
"plugins": () => [
|
||||
// Note that we use slightly different plugins for PostCSS.
|
||||
require("postcss-import")(),
|
||||
require("postcss-mixins")(),
|
||||
require("postcss-simple-vars")(),
|
||||
require("postcss-nested")(),
|
||||
require("postcss-easings")(),
|
||||
require("postcss-hexrgba")(),
|
||||
"plugins": () => [
|
||||
// Note that we use slightly different plugins for PostCSS.
|
||||
require("postcss-import")(),
|
||||
require("postcss-mixins")(),
|
||||
require("postcss-simple-vars")(),
|
||||
require("postcss-nested")(),
|
||||
require("postcss-easings")(),
|
||||
require("postcss-hexrgba")(),
|
||||
|
||||
// It's important that this plugin is last otherwise we end
|
||||
// up with broken CSS.
|
||||
require("postcss-preset-env")({ stage: 3, browsers: "last 2 versions" }),
|
||||
],
|
||||
"parser": "postcss-scss",
|
||||
},
|
||||
// It's important that this plugin is last otherwise we end
|
||||
// up with broken CSS.
|
||||
require("postcss-preset-env")({ stage: 3, browsers: "last 2 versions" }),
|
||||
],
|
||||
"parser": "postcss-scss",
|
||||
"local-plugins": true,
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -708,9 +700,11 @@ module.exports = (env, argv) => {
|
||||
files: [{ match: /.*Inter.*\.woff2$/ }],
|
||||
}),
|
||||
|
||||
// upload to sentry if sentry env is present
|
||||
// Upload to sentry if sentry env is present
|
||||
// This plugin throws an error on import on some platforms like ppc64le & s390x even if the plugin isn't called,
|
||||
// so we require it conditionally.
|
||||
process.env.SENTRY_DSN &&
|
||||
sentryWebpackPlugin({
|
||||
require("@sentry/webpack-plugin").sentryWebpackPlugin({
|
||||
release: process.env.VERSION,
|
||||
sourcemaps: {
|
||||
paths: "./webapp/bundles/**",
|
||||
|
||||
Reference in New Issue
Block a user