Skip to content

Commit

Permalink
Use moment-timezone-data-webpack-plugin to optimize timezones shipped…
Browse files Browse the repository at this point in the history
… in wp/date
  • Loading branch information
jsnajdr committed Jun 15, 2023
1 parent cd234e8 commit d46d09c
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 0 deletions.
98 changes: 98 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
"metro-react-native-babel-transformer": "0.70.3",
"mkdirp": "0.5.1",
"mock-match-media": "0.4.2",
"moment-timezone-data-webpack-plugin": "1.5.1",
"nock": "12.0.3",
"node-fetch": "2.6.1",
"node-watch": "0.7.0",
Expand Down
5 changes: 5 additions & 0 deletions tools/webpack/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
const CopyWebpackPlugin = require( 'copy-webpack-plugin' );
const MomentTimezoneDataPlugin = require( 'moment-timezone-data-webpack-plugin' );
const { join } = require( 'path' );

/**
Expand Down Expand Up @@ -156,5 +157,9 @@ module.exports = {
.concat( bundledPackagesPhpConfig )
.concat( vendorsCopyConfig ),
} ),
new MomentTimezoneDataPlugin( {
startYear: 2000,
endYear: 2030,
} ),
].filter( Boolean ),
};

0 comments on commit d46d09c

Please sign in to comment.