x)- [ ] bug report -> please search issues before submitting
- [ x ] feature request
@angular/cli: 1.0.0
node: 6.9.5
os: linux x64
@angular/animations: 4.1.0
@angular/common: 4.1.0
@angular/compiler: 4.1.0
@angular/core: 4.1.0
@angular/flex-layout: 2.0.0-rc.1
@angular/forms: 4.1.0
@angular/http: 4.1.0
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 4.1.0
@angular/platform-browser-dynamic: 4.1.0
@angular/router: 4.1.0
@angular/cli: 1.0.0
@angular/compiler-cli: 4.1.0
I've seen this morning prepack (github |聽website) which seems very interesting for optimizing runtime perfs.
A tool for making JavaScript code run faster.
I know it's early stage and official website says it all :
Prepack is still in an early development stage and not ready for production use just yet. Please try it out, give feedback, and help fix bugs.
So I'm opening this issue to launch the discussion about that tool and see if it might be interesting to have it running on every production builds :smile:.
@TheLarkInn wrote a Tweet about prepack and webpack :

It seems that some people are working on closure compiler integration with angular (and the cli ?) and it's great ! But as far as I understand, we could use closure compiler to reduce bundle size and prepack after that to optimize code for runtime (?) :
The Closure Compiler also optimizes JavaScript code. Prepack goes further by truly running the global code that initialization phase, unrolling loops and recursion. Prepack focuses on runtime performance, while the Closure Compiler emphasizes JavaScript code size.
I tried to run it manually on a build and opened an issue on prepack repo.
It's too early to go for this.
Check this Twitter thread from Dan Abramov from the Facebook team (best known for making Redux):
https://twitter.com/dan_abramov/status/860084340352528385
Quoting:
Important thing about Prepack: it鈥檚 not a silver bullet. This is a solution in very early stage, with its own set of tradeoffs. WIP.
I鈥檓 excited it shipped, but it鈥檚 early preview for people already deep into experimenting with toolchains (bundler, library authors).
He explicitly says:
It鈥檚 not something you鈥檇 add to your web app today.
It might work eventually, and become suitable for production, but this is not the case today.
@Meligy that's why I wrote :

It's to launch discussion and have a thread opened if some people try it in their app so we might have some feedback and implement it or not later :smile:
Will be interesting to see how it works for ejected CLI Webpack configs
I also think that it's too early, and it's very unlikely that we can safely change the build process for 1.x, but the discussion would be nice.
why not including this under an "experimental" flag?
This seems not to hurt anybody and adding opt-in support will allow the rest of us to test the feature without much hussle
@hansl any explanation? Not happening I guess?
Prepack is still considered experimental and not recommended for production.
It is also possible to use the prepack command line tool to run it against the built output of the CLI. This effectively makes an integration unnecessary as anyone that wishes to experiment can use it directly (and also allows complete configurability).
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._
Most helpful comment
why not including this under an "experimental" flag?
This seems not to hurt anybody and adding opt-in support will allow the rest of us to test the feature without much hussle