Skip to content

Commit 5e84a6c

Browse files
authored
Merge pull request element-hq#2518 from vector-im/rav/ignore_olm_if_missing
Avoid errors if olm is missing
2 parents b174d49 + a86f272 commit 5e84a6c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

webpack.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,12 @@ module.exports = {
102102
],
103103
devtool: 'source-map'
104104
};
105+
106+
// olm is an optional dependency. Ignore it if it's not installed, to avoid a
107+
// scary-looking error.
108+
try {
109+
require('olm');
110+
} catch (e) {
111+
console.log("Olm is not installed; not shipping it");
112+
delete(module.exports.entry["olm"]);
113+
}

0 commit comments

Comments
 (0)