I am currently in the process of manually constructing an Angular module with Webpack, opting not to use the CLI.
While a normal build is functioning without any issues, encountering errors during an AOT build!
Here's how my tsconfig.aot.json file looks:
{
"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 compilation errors primarily involve 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.