stable

Clone or download

Read-only

request #16614: Polyfill of Intl.RelativeTimeFormat should not be loaded with locale data hardcoded to fr and en

Using dynamic loading to load the locale data that we need make sure we will not blocked by the hardcoding of the two currently supported by default locales. With this change we get support for any locale supported by the polyfill out of the box. Tracking this type of hardcoding is not easy when you have to do it afterwards. A side effect is that it makes less data to load for browsers needing the polyfill (one vs two locale to load). To keep the output of webpack reasonable and usable, any chunk containing the word "polyfill" in its name is not more displayed in the statistics. No functional change is expected, browsers with no support of Intl.RelativeTimeFormat should still be able to display correctly a date with the relative-time custom element of Tuleap. Change-Id: Iffe1e679ae8c7c48ef927eb7212ef9c0d1255a5d

Modified Files

Name
M src/themes/tlp/src/js/custom-elements/relative-date/polyfills.ts +61 −28 Go to diff View file
M tools/utils/scripts/webpack-configurator.js +1 −0 Go to diff View file