Here i used moment :^2.24.0
I want to use specific locals in my code .I used this solution
const webpack = require('webpack');
module.exports = {
//...
plugins: [
// load moment/locale/ja.js and moment/locale/it.js
new webpack.ContextReplacementPlugin(/moment[/\]locale$/, /ja|it/),
],
};
It didn't work for me , it still load other locals also.Please check.Thanks.
Here i used moment :^2.24.0 I want to use specific locals in my code .I used this solution const webpack = require('webpack'); module.exports = { //... plugins: [ // load
moment/locale/ja.js
andmoment/locale/it.js
new webpack.ContextReplacementPlugin(/moment[/\]locale$/, /ja|it/), ], }; It didn't work for me , it still load other locals also.Please check.Thanks.