mistercrunch commented on PR #30099:
URL: https://github.com/apache/superset/pull/30099#issuecomment-2329515543

   Took the time to understand the new optimization in `webpack.config.js`, 
it's a build time optimization specific to moment's (time processing library) 
i18n. I looks in the folder for language subfolders and do it based on that. 
Presumalby moment's support many more language than Superset does (about 20) so 
that trims the excess.
   
   Note that we have a `LANGUAGES` config that is used by the admin to set 
which languages are made available in their environment, ideally that 
optimization would be in-line with that list instead of looking at subfolders 
in the repo. It can be a  bit tricky to share config between the backend and 
frontend, currently the main mechanism for this is the backend sends a payload 
"bootstrap_data" encoded in the html of the page sent to start the 
"single-page-app", but that doesn't work for build time. We would need to have 
something like languages.json that both the backend's config and the frontend 
webpack.confic.js could read from. 
   
   Overall unclear how much this matters (could be good to know the bundle size 
without any locale, with the 20 we support, and with all locales). I vote to 
keep things simple and simply adding a setting `ARG build_translations=false` 
(or similar) and allow to skip some of the complexity and weight for those who 
use `en` only. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to