Skip to content

provideAngularQuery should support lazy import/ initialization #7237

Discussion options

You must be logged in to vote

Hi, provideAngularQuery allows you to easily configure and provide a QueryClient. In almost all applications a single QueryClient would be used throughout the whole application and this is what that function is designed for. I just checked and the compressed difference in main bundle size between a minimal Angular application and an application with only provideAngularQuery without any queries is 5,67 KB. injectQuery, injectMutation etc. are tree-shaken and not included in the main bundle. It is similar to provideRouter from Angular itself which adds some KBs to the main bundle as well even if you would not define any routes.

There is rarely a need to optimize beyond this point and if the…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by NateRadebaugh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment