From 4d2247a7e17e658633489dab09560aae5d0e2c58 Mon Sep 17 00:00:00 2001 From: Ross Mabbett <92495987+rtexelm@users.noreply.github.com> Date: Mon, 29 Apr 2024 13:27:06 -0400 Subject: [PATCH] fix(Webpack dev-server build warning): Create false value alias for `moment-with-locales` (#28229) --- superset-frontend/webpack.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/superset-frontend/webpack.config.js b/superset-frontend/webpack.config.js index d71fa2a19..b2e574b93 100644 --- a/superset-frontend/webpack.config.js +++ b/superset-frontend/webpack.config.js @@ -288,6 +288,12 @@ const config = { // TODO: remove Handlebars alias once Handlebars NPM package has been updated to // correctly support webpack import (https://github.com/handlebars-lang/handlebars.js/issues/953) handlebars: 'handlebars/dist/handlebars.js', + /* + Temporary workaround to prevent Webpack from resolving moment locale + files, which are unnecessary for this project and causing build warnings. + This prevents "Module not found" errors for moment locale files. + */ + 'moment/min/moment-with-locales': false, }, extensions: ['.ts', '.tsx', '.js', '.jsx', '.yml'], fallback: {