mirror of
https://github.com/discourse/discourse.git
synced 2025-06-19 15:31:33 +08:00
DEV: Refactor moment.js loading (#32337)
- Load moment and moment-timezone-with-data via webpack import instead of including copies in every locale file - Fetch static files from node_modules instead of `vendor/` This cuts the size of locale-specific JS files in half, since they no longer include moment itself.
This commit is contained in:
@ -69,16 +69,6 @@ def dependencies
|
||||
{ source: "chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.min.js", public: true },
|
||||
{ source: "magnific-popup/dist/jquery.magnific-popup.min.js", public: true },
|
||||
{ source: "pikaday/pikaday.js", public: true },
|
||||
{ source: "moment/moment.js" },
|
||||
{ source: "moment/locale/.", destination: "moment-locale" },
|
||||
{
|
||||
source: "moment-timezone/builds/moment-timezone-with-data-10-year-range.js",
|
||||
destination: "moment-timezone-with-data.js",
|
||||
},
|
||||
{
|
||||
source: "@discourse/moment-timezone-names-translations/locales/.",
|
||||
destination: "moment-timezone-names-locale",
|
||||
},
|
||||
{
|
||||
source: "squoosh/codecs/mozjpeg/enc/mozjpeg_enc.js",
|
||||
destination: "squoosh",
|
||||
|
Reference in New Issue
Block a user