diff --git a/webpack.config.js b/webpack.config.js index bfd233b586..e1336f40fb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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"]); +}