Skip to content

Commit

Permalink
Merge pull request #4 from vuoriliikaluoma/feature/windows-compatible…
Browse files Browse the repository at this point in the history
…-regexp

Added windows support.
  • Loading branch information
gilmoreorless authored Feb 13, 2019
2 parents 90aba0e + 261304c commit e54276a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ function MomentTimezoneDataPlugin(options = {}) {
const matchZones = options.matchZones || /./;

return new webpack.NormalModuleReplacementPlugin(
/data\/packed\/latest\.json$/,
/data[\\/]packed[\\/]latest\.json$/,
resource => {
if (resource.context.match(/node_modules\/moment-timezone$/)) {
if (resource.context.match(/node_modules[\\/]moment-timezone$/)) {
const config = { matchZones, startYear, endYear };
const tzdata = require('moment-timezone/data/packed/latest.json');
const file = cacheFile(tzdata, config);
Expand Down

0 comments on commit e54276a

Please sign in to comment.