Commit 6c6d5042 authored by Vitaly Slobodin's avatar Vitaly Slobodin Committed by Kushal Pandya

Ignore moment.js dependency for pikaday

Pikaday has a dependency on moment.js but moment.js
was removed from our codebase and build outputs
an error in the browser's console. Potential fix is to wait when
upstream removes moment.js as a direct dependency
but Pikaday looks unmaintained (last commit in 2018).
Another fix is to add IgnorePlugin from webpack
to ignore moment.js when processing Pikaday.
parent 95ef9e5a
......@@ -514,6 +514,14 @@ module.exports = {
// This one is used to check against "EE" properly in application code
IS_EE: IS_EE ? 'window.gon && window.gon.ee' : JSON.stringify(false),
}),
/* Pikaday has a optional dependency to moment.
We are currently not utilizing moment.
Ignoring this import removes warning from our development build.
Upstream reference:
https://github.com/Pikaday/Pikaday/blob/5c1a7559be/pikaday.js#L14
*/
new webpack.IgnorePlugin(/moment/, /pikaday/),
].filter(Boolean),
devServer: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment