1.0.0 • Published 7 years ago
react-app-rewire-moment-locales-plugin v1.0.0
react-app-rewire-moment-locales-plugin
Add
moment-locales-webpack-plugin
toreact-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
1.0.0
7 years ago