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

remove compiler from AoT client bundle #43

Closed
andresantos123 opened this issue Jul 28, 2017 · 6 comments
Closed

remove compiler from AoT client bundle #43

andresantos123 opened this issue Jul 28, 2017 · 6 comments

Comments

@andresantos123
Copy link

andresantos123 commented Jul 28, 2017

I'm submitting a ... (check one with "x")

[ x ] bug report => check the README and search github for a similar issue or PR before submitting
[ ] support request => check the README and search github for a similar issue or PR before submitting
[ ] feature request

Current behavior
When run "npm run build:universal-prod" the client package contains the @angular/compiler

Expected/desired behavior
The client package dont need the compiler on AOT compilations

Minimal reproduction of the problem with instructions
Use webpack bundle analyzer plugin to check client bundle

What is the motivation / use case for changing the behavior?
Remove more them 300kb on client blundle

Please tell us about your environment:
Fedor Linux

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    all
@fulls1z3
Copy link
Owner

@andresantos123 thanks for the idea, I'll try and test this on the first opportunity.

@fulls1z3 fulls1z3 changed the title Remove Compiler from AOT client bundle [enhancement] remove compiler from AoT client bundle Jul 29, 2017
@andresantos123
Copy link
Author

Hi,
I made a quick test and appears that the AOT is not working. With bundle analyzer, we cant see the ng-factory generated files. Changing the webpack/tsconfig made the bundle generate the compiled files.

@fulls1z3
Copy link
Owner

fulls1z3 commented Aug 2, 2017

@andresantos123 actually AoT was working on @angular v4.2.4 and @ngtools/webpack v.1.3.3; however after the latest PR's their versions have been upgraded and this causes the AoT to be broken.

I'm working on this now, if none works I'll roolback the @angular version to v4.2.4.

@fulls1z3
Copy link
Owner

fulls1z3 commented Aug 2, 2017

@andresantos123 @theomathieubhvr Well, I solved this. Also it fixes the earlier #29 and #39.

Furthermore, mentioned the solution at angular/angular-cli#6833.

@fulls1z3
Copy link
Owner

fulls1z3 commented Aug 2, 2017

@andresantos123 now the AoT got solved, do you have any suggestions on this topic?
@theomathieubhvr I'd like to hear your opinions also.

Also, this might be connected with @ngx-universal/state-transfer fulls1z3/ngx-universal#9

@andresantos123
Copy link
Author

@fulls1z3 Now AOT is working like a charm! Tried a way to remove the compiler based on another starters without success.

@fulls1z3 fulls1z3 changed the title [enhancement] remove compiler from AoT client bundle remove compiler from AoT client bundle Sep 16, 2017
@fulls1z3 fulls1z3 added this to the v5.0.0 milestone Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants