-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Using services in providers, Build got failed while using 'ng build ---aot' #15392
Comments
@kumaresan-subramani, can you please provide a link with the most possible code to get that error? Thanks. |
Hi @alan-agius4 , Repo stepsPlease find issue reproducing steps here: Step1: download sample - step2: Run below commands:
You will see an error,When you set"target" to "es5" it works fine. I think, class expression got tree-shaken awayOld Issue - #14577 (comment) |
HI @alan-agius4 , Due to this #14577,
you have added this fix . i think this causes issue now.Thanks in advance |
I think I found the problem, I will land a PR soon. |
Hi @alan-agius4 , Could you please update when the fix will be moved to npm, which will helpful for me to proceed further. Please add release notes, if you have made any major changes related to tree-shaking which will be helpful for me to work at my end. |
Release notes are located here: https://github.com/angular/angular-cli/releases |
is this fix got published?. if yes, please tell me |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
yes
Description
I have set "target": "es6", when i try to serve my application using below command
It throws below error:
If i change target to "es2015" and try to run using below commands
it throws a same error.
Working fine
When using "ng serve" with target es2015 and es6
And all commands are working fine with target as es5
🔬 Minimal Reproduction
Download sample- issueSample.zip
Run "npm i"
The give anyone command from below list:
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
Reported issue occurs only when i use services in providers like below:
When i add service like below it doesn't throws error even service also not get injected.
#4043 (comment)
i have used above reference like below:
It wont throw error and also my service not injected.
The text was updated successfully, but these errors were encountered: