Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b338f823 authored by Richard Steinmetz's avatar Richard Steinmetz Committed by backportbot[bot]
Browse files

Shim ICAL to prevent using the global object



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).

Signed-off-by: default avatarRichard Steinmetz <richard@steinmetz.cloud>
parent bfa60fb5
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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