Channel
Interviewed Person
Anthony Fu
How Vite becomes great using the mindset of on-demand.
ViteConf
Interviewed: Anthony Fu
I don't know everyone I'm so happy we finally have the first ever vidconf so today I would like to talk about beats the on-demand developer experience it's about how vid becomes great using the mindset of on-demand my name is Anthony Foo and I'm a coding member of it View and Knox I'm also a creator of v-test we'll use Uno says
selective and unplug it I'm currently working at nuts labs in the framework team and if you prefer visually these are their icons so you can find me on GitHub at ntfu or Twitter at mtvfu7 so before we dive into on-demand let's first see what the heck the on-demand is so this was my childhood back that times let's say when I want to watch a movie I need to download the
whole files in order to play it it's not already taking 39 years to download but indeed it takes a few hours and it could be a nightmare if I want to pick a good one out of a thousand more movies so nowadays thanks for the on-demand streaming service like YouTube or Netflix Our Lives becomes much easier so if I have to give a definition to on-demand I would say provide what you need upon the request
compared to the traditional OS wins approach I think on demand is offering a few Pros the first is efficients is that you only load the parts you need and the second one is the responsive and customizable for example if you are watching the same movies on two different device the one on your phone will get lower resolution streams than your desktop since it has a smaller string screen to consume that
would make things more efficient and then we could find that the web itself is actually also on demand that makes the total sense for a build tool to also doing so but things are not perfect indeed it comes with some cams the first is overhead like Network requires water flows Etc for example in a very poor network connection it will be a terrible experience to watch your YouTube videos online right and then and second one is the capacity
it requires actual work to implement and maintain the functionality of on-demand since there is no Silver Bullet let's see how Viet made those trade-offs we are talking about on-demand in a few different aspects the first and probably the most well-known one is that fit is on demand on processing it only transpire the modules you need for the request Pages or so-called bundle disk this allows V to keep fast
as your project grows and the second one I would like to call it On Demand on strategies we actually have different needs on development and production in development we are changing our code constantly and having a good feedback loop will be important to see the changes and that will be developer experience and in production we are more focusing on the runtime performance and the size of the bundle and that will be user experience
so vids provide two different modes Dev and build to provide the best to the both world so in development fit is offering bundle lists hot module replacement and the dev server to make those things happens on demand on the other hand in Productions fit is actually used in Europe to bundle the app and providing all optimizations like treasure king called splitting and minification on top of that even though there are two