I thought you were updating a new one ngc
, and it changes the optimization, and then forRoot
cannot cancel the ngModule
annotation.
, . , , angular/route
forRoot
forChild
. tsconfig
webpack
.
tsconfig.yourbuild.ts.
"compilerOptions": {
"declaration": true,
"stripInternal": true,
"moduleResolution": "node",
"module": "es2015",
"target": "es5",
"lib": [
"es2015",
"es2017",
"dom"
],
"skipLibCheck": true,
"types": [],
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"sourceMap": true,
"inlineSources": true,
"baseUrl": "./tmp",
"rootDir": "./tmp",
"outDir": "dist/"
},
"angularCompilerOptions": {
"annotationsAs": "decorators",
"annotateForClosureCompiler": false,
"strictMetadataEmit": false,
"skipTemplateCodegen": true,
"flatModuleOutFile": "router.js",
"flatModuleId": "@angular/router"
}