angular-aot-demo icon indicating copy to clipboard operation
angular-aot-demo copied to clipboard

angular2-template-compiler

Open manfredsteyer opened this issue 8 years ago • 5 comments

Hi,

first of all, thank you for this repo. It really helped me to get started with AOT.

I've noticed, that you are using the angular2-template-compiler in the common webpack-config-file and so you are also lining in the templates when using AOT. If I see this right, omiting it could bring some bytes for AOT-scenarios.

Wishes, Manfred

manfredsteyer avatar Sep 15 '16 20:09 manfredsteyer

Oh, sorry, I mean angular2-template-loader and not angular2-template-compiler ...

manfredsteyer avatar Sep 17 '16 09:09 manfredsteyer

@manfredsteyer I'm using this loader so webpack can load and bundle the HTML template files, when using templateUrl.

Do you have another option in mind?

manekinekko avatar Sep 20 '16 18:09 manekinekko

In general, this is a good thing. But your config is also using it in aot-mode although IMHO you don't need to inline templates in aot mode, cause they are getting compiled anyway. I've played around with it a bit and managed to reduce filesize in aot mode by omitting it.

manfredsteyer avatar Sep 23 '16 07:09 manfredsteyer

Oh. Right. That make sense in AOT. Do you have a PR ready?

manekinekko avatar Sep 23 '16 07:09 manekinekko

I will create one thouse days.

manfredsteyer avatar Sep 24 '16 17:09 manfredsteyer