-
Notifications
You must be signed in to change notification settings - Fork 12k
1.7.0-beta.3 or higher breaks production build in existing application #9667
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
I've updated the original description with a minimal repro that resembles what I have in my applications. |
I believe this is related to this issue |
I thought that as well, but I'm already using |
I found I had to target es5 in the tsconfig.json file and also in the tsconfig.app.json file and it will fixed my problem. I never realized there was a separate tsconfig file in the app root as well as the main root. Both have to be targeting es5. I figured it out by creating a new app with cli and adding a very basic HttpClient call to the main app.component. Once it was working, I was able to find the difference in my app.
From: João Dias [mailto:[email protected]]
Sent: Monday, February 19, 2018 1:25 PM
To: angular/angular-cli
Cc: dldavis; Comment
Subject: Re: [angular/angular-cli] 1.7.0-beta.3 or higher breaks production build in existing application (#9667)
I thought that as well, but I'm already using es5 as target as you can see in the repo I linked. ):
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#9667 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AUIjsuN_mKljPh6ytyock-smqQptsTauks5tWcp7gaJpZM4SJZyN> .Image removed by sender.
|
As I said the target is already @clydin is it ok to use |
I’ve traced the root cause to an improper interaction in the import eliding transformer regarding the usage of a shorthand property assignment that also happens to be an import. A fix is incoming and should be available in the next patch release. |
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. |
I'm going to report on the latest version because that's what we want to be fixed but the issue being reported started on
1.7.0-beta.3
and manifests in all versions after.Versions
macOS 10.13.13 (High Sierra)
Repro steps
npm install
npm run serve
(this works)npm run serve:prod
(this breaks)Observed behavior
I've created a minimal repro closest to what I have in my applications. See the repro steps above.
Not quite sure how to explain, but it seems like Webpack or Rollup or something along those lines is not replacing imports/exports correctly in all cases.
Example source:
Gets transpiled to something like:
Browser stack trace:
If I rename that
query
on the import, for example:import { query as BrokenQuery } from './query';
then the import is correctly used and this error will go away, but another one appears in something unrelated, which I try to work around until an error in some vendor module appears which I can't work around. ):Desired behavior
Same behaviour as any version before
1.7.0-beta.3
. The application gets transpiled correctly and everything works fine.The text was updated successfully, but these errors were encountered: