diff --git a/babel.config.js b/babel.config.js index d51d180e4931e..d8d15499e33a4 100644 --- a/babel.config.js +++ b/babel.config.js @@ -95,6 +95,16 @@ module.exports = function getBabelConfig(api) { filenameIncludes: 'src/AdapterDateFnsV3/', }, ]); + plugins.push([ + 'babel-plugin-replace-imports', + { + test: /date-fns-jalali/i, + replacer: 'date-fns-jalali-v3', + // This option is provided by the `patches/babel-plugin-replace-imports@1.0.2.patch` patch + filenameIncludes: 'src/AdapterDateFnsJalaliV3/', + }, + 'replace-date-fns-jalali-imports', + ]); } if (process.env.NODE_ENV === 'production') {