So AOT changes the name of my components, for example my-component.component.ts
to my-component.component.ngfactory.ts
but then on the generated file includes the file doing so
import * as import2 from './my-component.component';
which is wrong cause this file is not there anymore.
If I change the import on the file to be like
import * as import2 from './contact-us.component.ngfactory';
then I can see how for example my IDE stops complaining cause this file does exists.
Does someone now how to make the AOT compiler either not modify the file names or modify the import accordingly? LEt me know if you need to see any config file
This is how my tsconfig looks like
{
"compilerOptions": {
"baseUrl": "",
"declaration": false,
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es2015", "dom"],
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"./node_modules/@types/"
],
"outDir": "dist/out-tsc"
},
"files": [
"app/app.module.ts",
"main-aot.ts"
],
"angularCompilerOptions": {
"genDir": "../aot",
"skipMetadataEmit" : true
}
}
And the received error is
Error at C:/Projects/my-project/aot/app/app.module.ngfactory.ts:74:27: Cannot find module './components/my-component.component'.