|
|
|
|
|
by Bahamut
3380 days ago
|
|
There just isn't enough documentation/articles out there on implementing AOT compilation. A lot of people are not using the CLI, since it wasn't mature enough when they started their Angular applications - Webpack is quite common these days. There is a nice plugin for Webpack maintained by the Angular team, @ngtools/webpack, but when trying to wire it in, the error messages are cryptic. I was fortunate to have some key help at times from Rob Wormald of the Angular team, giving me some key insights about making sure my classes, interfaces, etc. are all exported publicly so they can be statically analyzed, and making sure to split my webpack configs & tsconfigs for dev & prod builds since AOT compilation is too slow for typical dev workflows (although you also want to be able to do it on dev to debug AOT compilation related errors) - I ended up with 4 different webpack configs for sanity's sake. That said, the CLI does support AOT compilation and has that support built into it now - if I were starting an application now, I would probably just use the CLI. |
|