using Moment with Angular library 13 causes an error
Solution 1:
The devdocs has a solution to this problem:
So, you need add in library tsconfig.lib.json
and in project tsconfig.json
:
"compilerOptions": {
...
"allowSyntheticDefaultImports": true,
...
}
And then use the syntax
import moment from 'moment';