Skip to content
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

fix(build): use baseUrl and paths from tsconfig #2470

Merged
merged 1 commit into from
Oct 2, 2016

Conversation

filipesilva
Copy link
Contributor

@filipesilva filipesilva commented Oct 2, 2016

Supersedes #2210 #2392 #2428.

Uses same base mechanism as @abner's #2210, but edits the new webpack-build-typescript.ts and adds tests.

Does NOT currently work for --aot (/cc @hansl).

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@hansl hansl merged commit 32e60b7 into angular:master Oct 2, 2016
@filipesilva filipesilva deleted the use-baseurl-and-paths branch October 2, 2016 16:13
JJayet pushed a commit to JJayet/angular-cli that referenced this pull request Oct 2, 2016
@glipecki
Copy link

glipecki commented Oct 3, 2016

That's awesome ;) Thanks!

deebloo pushed a commit to deebloo/angular-cli that referenced this pull request Oct 3, 2016
@abner
Copy link
Contributor

abner commented Oct 4, 2016

Awesome!!!!

@arlowhite
Copy link

@filipesilva What issue can I follow that tracks support for --aot with @app tsconfig paths?

I use @app paths and ng build -prod is broken.

@altschuler
Copy link

@filipesilva Would you have any pointers as to what could be done as a workaround for aot support? Thanks!

@filipesilva
Copy link
Contributor Author

@arlowhite @altschuler I'm not sure what the problem you are describing is, AFAIK TS paths work for aot. Can you open a new issue with a repro of what you're experiencing?

@arlowhite
Copy link

@filipesilva I'm not sure custom paths are the root cause. You can ignore my comment.

Just FYI...

My AOT build with -prod broke a while back ~1.0.0. At the time, the error message made me think it was related to my @app path in tsconfig.json. But I think it is unrelated. The -prod aot build seems to have become much more strict since 1.0.0

I started to work on fixing the -prod build and made some progress. One issue was

  animations: [
    trigger('fade', [
      state('hide' as FadeState, style({

The as FadeState cast doesn't work with AOT. The error was cryptic and I thought it was an issue with importing my FadeState type. Removing the cast fixes the import error I was seeing.

After fixing that, I got hundreds of errors reporting that Component fields were private that needed to be public for AOT. I haven't had time to work through those issues yet, so don't know if the build will actually work now.

@altschuler
Copy link

@filipesilva Please ignore, problem turned out to be something completely different, baseUrl and paths work great with aot :)

@filipesilva
Copy link
Contributor Author

@arlowhite there was a bug pre-1.0 that was hiding a lot of AOT errors (like the private members), and was discussed #5623. This did result in a lot more AOT errors being reported in 1.0. They were mostly 'real' AOT errors though, and a few that weren't were fixed.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants