Page MenuHomePhabricator

[web] Add `@matrix-org/olm` dependency
ClosedPublic

Authored by atul on Jan 26 2023, 11:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 27, 1:40 AM
Unknown Object (File)
Mon, Jun 24, 6:35 PM
Unknown Object (File)
Mon, Jun 24, 10:14 AM
Unknown Object (File)
Sun, Jun 23, 11:32 PM
Unknown Object (File)
Sun, Jun 23, 2:11 AM
Unknown Object (File)
Mon, Jun 17, 5:02 AM
Unknown Object (File)
Sun, Jun 16, 3:36 AM
Unknown Object (File)
Sat, Jun 15, 1:41 PM
Subscribers
None

Details

Summary

We need the Olm dependency in order to get device public key to include in SIWE message. (We may end up using the dependency for more things later on, but this is the only use case atm)

Including this dependency in browser isn't documented well, so I tried to get it to work based off of what I saw in other repos (eg jitsi-meet, element-web)

Test Plan

Was able to import the dependency in web/account/siwe.react.js and run window.Olm.init() without issue.

Tested with dev and prod to ensure that we're able to init() Olm as expected.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Jan 26 2023, 11:55 AM
atul added inline comments.
web/webpack.config.cjs
14–23 ↗(On Diff #21384)
36–38 ↗(On Diff #21384)
This revision is now accepted and ready to land.Jan 26 2023, 12:03 PM

now it works on prod:

7bd741.png (372×870 px, 65 KB)

2c80db.png (502×1 px, 105 KB)

atul attached a referenced file: F346171: 7bd741.png. (Show Details)
atul added inline comments.
web/webpack.config.cjs
62 ↗(On Diff #21393)

Without spreading ...baseBrowserConfig.plugins, plugins would get overridden.

This revision was landed with ongoing or failed builds.Jan 26 2023, 12:57 PM
This revision was automatically updated to reflect the committed changes.