Moment.js drop unused languages

Add plugin to webpack.config.js

javascript

// Drop unused moment.js languages 
new webpack.ContextReplacementPlugin( 
    /moment[\/\\]locale$/, 
    /en|fr|de/ 
), 

Read more:
https://webpack.js.org/plugins/context-replacement-plugin/

Leave a Reply

Your email address will not be published. Required fields are marked *