You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by vo...@apache.org on 2024/07/24 17:50:59 UTC

(druid) branch master updated: Prune date-fns locales, bump sass TODO (#16792)

This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 6ff0cbfa545 Prune date-fns locales, bump sass TODO (#16792)
6ff0cbfa545 is described below

commit 6ff0cbfa5450f7607bcee542381d1ebd9cc7880c
Author: John Gozde <jo...@gozde.ca>
AuthorDate: Wed Jul 24 11:50:53 2024 -0600

    Prune date-fns locales, bump sass TODO (#16792)
---
 web-console/webpack.config.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/web-console/webpack.config.js b/web-console/webpack.config.js
index 618a929aaea..d6518623a47 100644
--- a/web-console/webpack.config.js
+++ b/web-console/webpack.config.js
@@ -24,6 +24,8 @@ const webpack = require('webpack');
 
 const { version } = require('./package.json');
 
+const supportedLocales = ['en-US'];
+
 function friendlyErrorFormatter(e) {
   return `${e.severity}: ${e.content} [TS${e.code}]\n    at (${e.file}:${e.line}:${e.character})`;
 }
@@ -47,6 +49,13 @@ module.exports = env => {
       'global': {},
       'NODE_ENV': JSON.stringify(mode),
     }),
+
+    // Prune date-fns locales to only those that are supported
+    // https://date-fns.org/v2.30.0/docs/webpack
+    new webpack.ContextReplacementPlugin(
+      /^date-fns[/\\]locale$/,
+      new RegExp(`\\.[/\\\\](${supportedLocales.join('|')})[/\\\\]index\\.js$`),
+    ),
   ];
 
   return {
@@ -137,7 +146,7 @@ module.exports = env => {
                     // have access to them at this point. None of the components that use svg icons
                     // via CSS are themselves being used by the web console, so we can safely omit the icons.
                     //
-                    // TODO: Re-evaluate after upgrading to Blueprint v5
+                    // TODO: Re-evaluate after upgrading to Blueprint v6
                     'svg-icon($_icon, $_path)': () => new SassString('transparent'),
                   },
                 },


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org