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

feat(AoT): ✨ ✨ added initial AoT support any many other things #151

Merged
merged 3 commits into from Apr 4, 2017

Conversation

MarkPieszak
Copy link
Member

@MarkPieszak MarkPieszak commented Apr 4, 2017

Made this one a PR since it's quite a massive change, I'm also going to drop some of the older naming conventions and stick with ones from the Angular style guideline. main.server.ts for example as opposed to boot-server

Added Bootstrap with SCSS / SASS support
Added ng2-bootstrap
Passing Server originURL so that URLs can use it (when 4.1 comes out (Closes #146 )
with HttpInterceptors this will be even easier to do)

AoT added ! for prod (npm run build:aot) (Closes #10)

  • Note: We still need to test this for Azure deployments etc

Removed es6-shim added core-js

Few other misc things...

Closes #61
Closes #149
Closes #92

currently facing issues like
angular/angular-cli#5802
cannot find browser-app.module.ngfactory
Added Bootstrap with SCSS / SASS support
Added ng2-bootstrap
Passing Server originURL so that URLs can use it (when 4.1 comes out
with HttpInterceptors this will be even easier to do)

:sparkles: AoT added ! for prod (npm run build:aot)
- Still need to test this for Azure deployments etc

Removed es6-shim added core-js
@hheexx
Copy link

hheexx commented Apr 4, 2017

@MarkPieszak
No more vendor bundle?

@MarkPieszak
Copy link
Member Author

At the moment no, had to get it working first had some hurdles to get around 🙈
There are ways of splitting it without doing a separate file we can do eventually.

@hheexx
Copy link

hheexx commented Apr 4, 2017

HMR code in main.browser.ts is patched in memory by ngtools?

@hheexx
Copy link

hheexx commented Apr 4, 2017

@MarkPieszak
Also, why you have seperate entry file for aot on server and not in a browser?
Is there a benefit of running aot on server?

@hheexx
Copy link

hheexx commented Apr 4, 2017

You did not hit this bug angular/angular-cli#5329 ?

@MarkPieszak
Copy link
Member Author

Ng tools automatically handles the browsers AoT files, server will be able to do the same thing soon, but that's the only reason there are duplicate (sort of) files for server and server.aot and the tsconfigs.

HMR memory isn't here yet.

@MarkPieszak
Copy link
Member Author

I didn't get that issue, you're on windows 10?

@hheexx
Copy link

hheexx commented Apr 5, 2017

Ok, we need HMR. I am using ngtools only for production and keeping old loader stack for dev.
Also I am keeping JIT under node. I don't know if there is any benefit of running AOT except maybe faster startup ?

Yea, I hit that bug under win10.
I had to add:
aotPlugin._compilerHost._resolve = function (path_to_resolve) { path_1 = require("path"); path_to_resolve = aotPlugin._compilerHost._normalizePath(path_to_resolve); if (path_to_resolve[0] == '.') { return aotPlugin._compilerHost._normalizePath(path_1.join(aotPlugin._compilerHost.getCurrentDirectory(), path_to_resolve)); } else if (path_to_resolve[0] == '/' || path_to_resolve.match(/^\w:\//)) { return path_to_resolve; } else { return aotPlugin._compilerHost._normalizePath(path_1.join(aotPlugin._compilerHost._basePath, path_to_resolve)); } };

@MarkPieszak
Copy link
Member Author

MarkPieszak commented Apr 5, 2017

The express engine I'm building here (which will be on npm soon) needs to be updated to only do AoT actually, doing JIT during SSR is just slower and there's no benefits to it. Still plenty to work on, never enough time! 😓

There's still HMR, it just doesn't hold the app state currently, didn't add back those hacks in.
PRs always welcome!

@MarkPieszak MarkPieszak deleted the aot-upgrade branch April 5, 2017 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants