1.0.0 • Published 7 years ago

react-app-rewire-moment-locales-plugin v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

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 Khoadkivskyi