Creating AOT leaves component templates in the last package

After doing the AOT build with webpack, each template template does a lot more than it needs to be done twice, as the templates are included as strings that cannot be minified by UglifyJS.

I expect component templates to be excluded as strings. They are already handled by ngc and built into the compiled components.

Does anyone know why this is happening or how to fix it?

+3
angular webpack angular2-aot


source to share


1 answer


I found that the angular2-template-loader 'webpack loader was generating unnecessary component templates in the AOT package.



The solution is to remove this bootloader when using AOT.

+1


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics