I am building an Angular module manually with Webpack without using the CLI.
When doing normal build it works, when doing AOT build it doesn't!
The tsconfig.aot.json is as follows:
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es5",
"es2015",
"dom"
]
},
"angularCompilerOptions": {
"skipMetadataEmit": true,
"genDir": "aot"
}
}
The errors are mostly related to Typescript:
ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:829:20 TS2304: Cannot find name 'PromiseConstructor'.
ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1486:36 TS2339: Property 'for' does not exist on type 'SymbolConstructor'.
ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1490:43 TS2339: Property 'hasInstance' does not exist on type 'SymbolConstructor'.
ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2305:36 TS2339: Property 'for' does not exist on type 'SymbolConstructor'.
ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2309:43 TS2339: Property 'hasInstance' does not exist on type 'SymbolConstructor'.
ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2313:50 TS2339: Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'.
ERROR in [at-loader] ./node_modules/rxjs/internal/Observable.d.ts:82:59 TS2693: 'Promise' only refers to a type, but is being used as a value here.
@types/core-jsversion?"skipLibCheck": true,tocompilerOptionsin tsconfig.jsonnpm run buildworks fine, when I runnpm run build:prodI get the issues with types. Thanks