I have migrated am AngularJS application to an hybrid AngularJS/Angular 17 application and got it working fine in dev and prod until I tried to enable the optimization
from the angular.json
file.
I have the error Error: [$injector:unpr] Unknown provider: eProvider <- e <- inputDirective
.
It looks like to me that this directive is an internal one from AngularJs, so even if I have ensured that all my source code files are using the inline array dependencies, the app fails while using it.
I tried to use ng-annotate in a post-build
script but it fails with the error
error: couldn't process source due to parse error
'import' and 'export' may appear only with 'sourceType: module' (1:0)
So it's like I have to use babel to transpile my ES6 code...
inputDirective
is internal to AngularJS?Thank you in advance!
Actually there is a angular.module('name').directive('input', ...)
in my project, and I wasn't aware of this naming convention.
After updating it in order to use a string dependencies array, it works!
Thanks folks for your help.