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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to