nciao
nciao

Reputation: 601

Does Ahead-of-Time Compilation need angular-cli as a production dependency?

Going from the official instructions found here https://angular.io/guide/aot-compiler, it recommends installing the following npm dependencies with the command:

npm install @angular/compiler-cli @angular/platform-server --save

This adds both @angular/compiler-cli and @angular/platform-server to the dependencies section of your package.json

Are these dependencies needed for production? Or can they equivalently go in the dev-dependencies section of the package.json file?

Upvotes: 0

Views: 315

Answers (1)

Maciej Treder
Maciej Treder

Reputation: 12352

Quick answer is: No.

@angular/compiler-cli doesn't need to be saved as a dependency it can be devDependency - it is needed only at the compile-time.

This is how it works in my project, but I am not using CLI at all. Instead of that I am using webpack together with @ngtools/webpack plugin.

You can find example here: https://github.com/maciejtreder/angular-universal-pwa

Upvotes: 0

Related Questions