react-app-rewire-moment-locales-plugin

Add moment-locales-webpack-plugin to react-app-rewired config.

Install

npm install --save-dev react-app-rewire-moment-locales-plugin

Usage

const rewireMomentLocalesPlugin = require('react-app-rewire-moment-locales-plugin')

module.exports = function override(config, env) {
  // ...

  if (env === 'production') {
    config = rewireMomentLocalesPlugin(config, env, {
      localesToKeep: ['es-us', 'ru'] // optional
    })
  }

  return config
}

License

MIT © Bohdan Khodakivskyi