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.
pull/2518/head
Richard van der Hoff 2016-10-27 10:16:10 +01:00
vecāks b174d49f9d
revīzija a86f2720bc
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām

Parādīt failu

@ -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"]);
}