Replies: 2 comments 4 replies
-
Setting up views and actions on a model is a method call itself, so you could theoretically defer the call to Although depending on how you bundle things up, I don't think this will really improve your bundle size, since your code is still going to import them somewhere in the bundle. It may improve your app startup time if the models don't need those views and actions until later on at runtime. |
Beta Was this translation helpful? Give feedback.
3 replies
-
would types.lazy apply? #2156 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Some of our models have a lot of code in e.g. views and actions, and this results in large bundle sizes
However, the only thing that "really needs to be eagerly loaded" are the actual types.model type
Is there a way to lazily import the views, actions, and things like this?
Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions