diff --git a/webpack.js b/webpack.js index 68b953c372..8d816068d9 100644 --- a/webpack.js +++ b/webpack.js @@ -55,7 +55,14 @@ webpackConfig.plugins.push( pattern: './src/assets/iconfont/*.svg' } }), - new webpack.IgnorePlugin(/^\.\/locale(s)?$/, /(moment)$/) + new webpack.IgnorePlugin(/^\.\/locale(s)?$/, /(moment)$/), + new webpack.ProvidePlugin({ + // Shim ICAL to prevent using the global object (window.ICAL). + // The library ical.js heavily depends on instanceof checks which will + // break if two separate versions of the library are used (e.g. bundled one + // and global one). + ICAL: 'ical.js', + }), ) module.exports = webpackConfig