When i use the moment.js (latest version) in an angular library, i am facing the following problem:
vendor.js:sourcemap:106713 ERROR TypeError: (moment__WEBPACK_IMPORTED_MODULE_2___namespace_cache || (intermediate value)(intermediate value)) is not a function. When i debug in the browser the moment().year() for example it works.
Can anyone have an idea, what is the reason for this error? maybe the EcmaScript version.
I will appreciate for any help.
> "compilerOptions": {
> "declaration": false,
> "downlevelIteration": true,
> "experimentalDecorators": true,
> "lib": [ "es6", "dom" ],
> "mapRoot": "./",
> "module": "esnext",
> "skipLibCheck": true,
> "moduleResolution": "node",
> "outDir": "../dist/out-tsc",
> "sourceMap": true,
> "target": "ES2015",
> "typeRoots": [
> "../node_modules/@types"
> ],