-
Notifications
You must be signed in to change notification settings - Fork 12k
Cannot "import as" with prod build #13577
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
Hi, kindly update Duplicate of |
why doesn't I submitted an issue for this: #13581 |
Also, I updated @angular-devkit/build-angular, now I'm getting this build error:
Edit: just saw someone submitted a bug for this. #13582 |
I have this error also. How can I fix this issue? |
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. |
Regression?
I believe so, however, I do not recall the exact last version that it worked
Description
In all of my routing modules, I have the following import:
import { AuthGuardService as AuthGuard } from './../auth/auth-guard.service'
And I use it like so:
When I do a prod build, such as:
ng build --prod --source-map
I get the following error when I attempt to access my application (served via Express.js):
Note: I do not have this problem with a regular, non-prod build, e.g. 'ng build'
Also, removing the "as" part of the import, and simply importing the class name itself, does in fact work. So it appears to be in issue with doing import "as". In other words, it works if I change the import to this:
import { AuthGuardService } from './../auth/auth-guard.service'
Here's my environment:
The text was updated successfully, but these errors were encountered: