Reputation: 391
I am getting below warnings when upgrade from Angular 12 to 13. Any idea about this issue?
package.json:
"moment": "2.24.0",
"@angular-builders/custom-webpack": "^13.1.0",
custom-webpack-config: // To use the lang en while build
const webpack = require('webpack');
module.exports = {
plugins: [
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/)
]
};
angular.json:
"allowedCommonJsDependencies": ["moment", "moment-business"]
Note: we are not getting warning if we choose the lang other than 'en' Tried 'zh' lang
ex: new webpack.ContextReplacementPlugin(/moment[/\]locale$/, /zh/)
Solutions tried/Referred:
1,
"compilerOptions": {"allowSyntheticDefaultImports": true,
} in tsconfig.json
2, https://github.com/moment/moment/issues/5758
Upvotes: 0
Views: 155