From 55870be101d2f77543c75f758c1c11c1bd5b6e00 Mon Sep 17 00:00:00 2001 From: Tom French Date: Sun, 17 Jul 2022 16:57:51 +0100 Subject: [PATCH] chore: silence erroneous warning for missing moment.js install --- packages/desktop-client/config/webpack.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/desktop-client/config/webpack.config.js b/packages/desktop-client/config/webpack.config.js index 626cb97..6420825 100644 --- a/packages/desktop-client/config/webpack.config.js +++ b/packages/desktop-client/config/webpack.config.js @@ -526,6 +526,10 @@ module.exports = function(webpackEnv) { // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack // You can remove this if you don't use Moment.js: new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + // Pikaday throws a warning if Moment.js is not installed however it doesn't + // actually require it to be installed. As we don't use Moment.js ourselves + // then we can just silence this warning. + new webpack.IgnorePlugin(/moment$/, /pikaday$/), !(isEnvDevelopment || process.env.PERF_BUILD) && new webpack.IgnorePlugin(/perf-deets\/frontend/), // Generate a service worker script that will precache, and keep up to date,