-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
AOT should be handled different way #1490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@pleerock This file belongs to the project, no issue with it.
There is no issue with this file in the project since it is not an entry point when not in AOT mode hence it's there but not used. When this file is used, it is in AOT mode which means that the AOT compiler just finished running so the file is referencing an existing file. The error people get is because the The error should be fixed soon once s-panferov/awesome-typescript-loader#364 is set which is the direct cause of the problem See #1378 |
I've never gotten an error related to this anyway using recent versions of this repo. |
@colinskow run typescript compiler without webpack and you'll get it. |
@pleerock that's because the tsconfig is not configured for that task. |
@shlomiassaf , no, it is configured. I'm talking about using typescript compiler without anything else (webpack, ngc, etc.). There are nothing in tsconfig that indicates to skip |
@pleerock I'm not saying the running When I say
I mean that the way you use it is not the way it is intended to be used.
This repository is based on webpack, not You are trying to use one of the tools in the toolchain without providing the proper environment to it, which we do using webpack. Anyway, I can't think of any use case to run |
actually it will depend on use case if you configure it properly. The problem is IDE compiler. IDE uses tsc to compile the code and it does not care about webpack. You'll have this error in IDE until you run webpack which will run ngc which will create "compile" directory with file required for compilation. Bad workflow. |
Which exact command I should execute to get |
This file should not really be in this project. The problem is that it's depend on
AppModuleNgFactory
which is importedfrom "../compiled/src/app/AppModule.ngfactory";
. But this file is not present in the project until you compile it using ngc. And even if you compile it, what to do with other people having this error? They can run same command, but this is not an option. Another option is to commit these files, but its also bad idea. Having always the error that this file is missing absolutely not an option.AFAIK angular-cli does not require you to create this file and handles aot specifics by its own.
The text was updated successfully, but these errors were encountered: