After replacing Moment.js with date-fns using this guide from the antd documentation I get the next server error:
SyntaxError: Cannot use import statement outside a module
I've tried things like adding 'type': 'module' to the package.json and putting 'module': 'commonjs' in tsconfig.json and many other things but none seem to work.