Remove code which loads legacy libolm
Now that we use the Rust crypto stack (https://github.com/matrix-org/matrix-react-sdk/pull/12630), the legacy olm library is unneeded. Remove all the dedicated cruft for loading it. (All this crap is why matrix-sdk-crypto-wasm has to base64 its wasm artifact, cf https://github.com/matrix-org/matrix-rust-sdk/pull/1167.)
This commit is contained in:
parent
d379103352
commit
7c7cbe655a
3 changed files with 5 additions and 70 deletions
|
@ -274,10 +274,6 @@ module.exports = (env, argv) => {
|
|||
// there is no need for webpack to parse them - they can just be
|
||||
// included as-is.
|
||||
/highlight\.js[\\/]lib[\\/]languages/,
|
||||
|
||||
// olm takes ages for webpack to process, and it's already heavily
|
||||
// optimised, so there is little to gain by us uglifying it.
|
||||
/olm[\\/](javascript[\\/])?olm\.js$/,
|
||||
],
|
||||
rules: [
|
||||
useHMR && {
|
||||
|
@ -443,20 +439,6 @@ module.exports = (env, argv) => {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
// the olm library wants to load its own wasm, rather than have webpack do it.
|
||||
// We therefore use the `file-loader` to tell webpack to dump the contents to
|
||||
// a separate file and return the name, and override the default `type` for `.wasm` files
|
||||
// (which is `webassembly/experimental` under webpack 4) to stop webpack trying to interpret
|
||||
// the filename as webassembly. (see also https://github.com/webpack/webpack/issues/6725)
|
||||
test: /olm\.wasm$/,
|
||||
loader: "file-loader",
|
||||
type: "javascript/auto",
|
||||
options: {
|
||||
name: "[name].[hash:7].[ext]",
|
||||
outputPath: ".",
|
||||
},
|
||||
},
|
||||
{
|
||||
// Fix up the name of the opus-recorder worker (react-sdk dependency).
|
||||
// We more or less just want it to be clear it's for opus and not something else.
|
||||
|
@ -498,8 +480,11 @@ module.exports = (env, argv) => {
|
|||
},
|
||||
},
|
||||
{
|
||||
// Same deal as olm.wasm: the decoderWorker wants to load the wasm artifact
|
||||
// itself.
|
||||
// The decoderWorker wants to load its own wasm, rather than have webpack do it.
|
||||
// We therefore use the `file-loader` to tell webpack to dump the contents to
|
||||
// a separate file and return the name, and override the default `type` for `.wasm` files
|
||||
// (which is `webassembly/experimental` under webpack 4) to stop webpack trying to interpret
|
||||
// the filename as webassembly. (see also https://github.com/webpack/webpack/issues/6725)
|
||||
test: /decoderWorker\.min\.wasm$/,
|
||||
loader: "file-loader",
|
||||
type: "javascript/auto",
|
||||
|
@ -750,7 +735,6 @@ module.exports = (env, argv) => {
|
|||
{ from: "vector-icons/**", context: path.resolve(__dirname, "res") },
|
||||
{ from: "decoder-ring/**", context: path.resolve(__dirname, "res") },
|
||||
{ from: "media/**", context: path.resolve(__dirname, "node_modules/matrix-react-sdk/res/") },
|
||||
"node_modules/@matrix-org/olm/olm_legacy.js",
|
||||
{ from: "config.json", noErrorOnMissing: true },
|
||||
"contribute.json",
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue