You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-28 09:24:05 +03:00
Avoid errors if olm is missing
If olm isn't installed, webpack prints out scary warnings (though it still actually succeeds). Let's avoid scaring people by quietly removing it from the list of things to process.
This commit is contained in:
@@ -102,3 +102,12 @@ module.exports = {
|
||||
],
|
||||
devtool: 'source-map'
|
||||
};
|
||||
|
||||
// olm is an optional dependency. Ignore it if it's not installed, to avoid a
|
||||
// scary-looking error.
|
||||
try {
|
||||
require('olm');
|
||||
} catch (e) {
|
||||
console.log("Olm is not installed; not shipping it");
|
||||
delete(module.exports.entry["olm"]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user