4 ms·
This is really an Angular progressive web app, it doesn't do AOT minified compilation so the deployment size will be huge. Depends what you're building but for
by hazza1 9y ago
This is really an Angular progressive web app, it doesn't do AOT minified compilation so the deployment size will be huge.
Depends what you're building but for most PWAs I'd recommend a much smaller library such as Preact probably in conjunction with https://github.com/NekR/offline-plugin https://github.com/NekR/offline-plugin
- onion2k 9y agoAngular 2 typescript apps can use AOT compilation, so that could be added if it's not there already, but regardless of that isn't one huge benefit of a PWA that the code is cached so it can be used offline, and a service worker is used to control what needs to be downloaded on subsequent loads? That means that, while it's good not to be wasteful, the initial download size isn't really that important. Adding a one-time download few hundred KB of code isn't going to make a big difference to the user.
- hazza1 9y agoThe files still have to be parsed even if they are cached, PWAs are aimed at mobile users so this can be particularly important. If you want an native like feel your initial processing should be as light as possible.
- mattmanser 9y agoThe word 'huge' looks suspicious to me. Also, if it is progressive why couldn't you still AOT the client side? You could be completely right, but your comment smells dodgy. Note that as it's typescript it will be transformed to JavaScript anyway, all the comments stripped, etc. so very much doubt it will be huge. And minification is becoming ever more irrelevant in the modern age because of http2.
- hazza1 9y agoHuge in the context is a few hundred kb, not great for a simple webpage. https://blog.nrwl.io/angular-is-aot-worth-it-8fa02eaf64d4 https://blog.nrwl.io/angular-is-aot-worth-it-8fa02eaf64d4 You could and should AOT the client side, my point was this quickstart project doesn't. Typescript isn't the problem here Angular is, without AOT it includes an in browser compiler. Minification doesn't change with http2, you are probably thinking of concatenation/bundling.
- aussieguy1234 9y agoOne thing to remember is that it is a quick start rather than a full production setup, so minification/uglification etc could be added as desired by whoever clones the repo as a base for their own up.
- aussieguy1234 9y agoHttp2 is what I was thinking. Progressive web apps are cutting edge, browsers that support them will also support Http2. It will load a large number of assets over a single connection, more efficiently than using concatenation. It dones struggle on bad network connections more than Http 1.1, but the service worker should account for that.