Skip to content

Commit

Permalink
Merge pull request #3682 from nextcloud/fix/noid/shim-ical
Browse files Browse the repository at this point in the history
Shim ICAL to prevent using the global object
  • Loading branch information
st3iny authored Nov 23, 2021
2 parents bfa60fb + 1cc13f4 commit 9309fa5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9309fa5

Please sign in to comment.