Is a "src" dir required under the top-level ng2 app dir for aot?

53 views Asked by At

I'm trying to get my app running with AOT per the documentation: https://angular.io/guide/aot-compiler

I execute the following AOT compile command from 'MyApp' dir:

"node_modules/.bin/ngc" -p ./ng2/tsconfig-aot.json

And am returned the following error:

Error File 'C:/CODE/MyApp/ng2/src/app/app.module.ts' not found.

It looks like the command is expecting a 'src' dir as the first subdir under my main ng2 app dir. This ng2 app exists within the context of a parent .NET MVC app, which has a lot of its own special dirs. I suspect the default ng2 parent app dir is generally named 'src' and this is causing confusion in the look up.

Do you know if there's a command option I can pass to exclude 'src' from the dir path that the compiler is attempting to execute against? Or if there's another AOT workaround for this or if I'm doing something incorrectly here?

0

There are 0 answers